rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
dirtyComponentsWork.clear(); | public void paintDirtyRegions() { // Short cicuit if there is nothing to paint. if (dirtyComponents.size() == 0) return; // Swap dirtyRegions with dirtyRegionsWork to avoid locking. synchronized (dirtyComponents) { HashMap swap = dirtyComponents; dirtyComponents = dirtyCompone... | |
public void paintImmediately(Rectangle r) { Component root = SwingUtilities.getRoot(this); if (root == null || ! root.isShowing()) return; Graphics g = root.getGraphics(); if (g == null) return; Rectangle clip = SwingUtilities.convertRectangle(this, r, root); g.setClip(clip); root.paint(g); g.dispose(); | public void paintImmediately(int x, int y, int w, int h) { paintImmediately(new Rectangle(x, y, w, h)); | public void paintImmediately(Rectangle r) { Component root = SwingUtilities.getRoot(this); if (root == null || ! root.isShowing()) return; Graphics g = root.getGraphics(); if (g == null) return; Rectangle clip = SwingUtilities.convertRectangle(this, r, root); g.setClip(clip); root.paint(... |
throw new java.lang.UnsupportedOperationException("Method extract_Value() not yet implemented."); | try { return ((ValueBaseHolder) has).value; } catch (ClassCastException ex) { return new BAD_OPERATION("Value type expected"); } | public Serializable extract_Value() throws BAD_OPERATION { /**@todo Implement this org.omg.CORBA.Any abstract method*/ throw new java.lang.UnsupportedOperationException("Method extract_Value() not yet implemented."); } |
resetTypes(); | type(typecode); insert_Value(x); | public void insert_Value(Serializable x, TypeCode typecode) { resetTypes(); /**@todo Implement this org.omg.CORBA.Any abstract method*/ } |
public BooleanHolder(boolean initial_value) | public BooleanHolder() | public BooleanHolder(boolean initial_value) { value = initial_value; } |
value = initial_value; | public BooleanHolder(boolean initial_value) { value = initial_value; } | |
public DoubleHolder(double initial_value) | public DoubleHolder() | public DoubleHolder(double initial_value) { value = initial_value; } |
value = initial_value; | public DoubleHolder(double initial_value) { value = initial_value; } | |
public FixedHolder(BigDecimal initial_value) | public FixedHolder() | public FixedHolder(BigDecimal initial_value) { value = initial_value; } |
value = initial_value; | public FixedHolder(BigDecimal initial_value) { value = initial_value; } | |
public FloatHolder(float initial_value) | public FloatHolder() | public FloatHolder(float initial_value) { value = initial_value; } |
value = initial_value; | public FloatHolder(float initial_value) { value = initial_value; } | |
public IntHolder(int initial_value) | public IntHolder() | public IntHolder(int initial_value) { value = initial_value; } |
value = initial_value; | public IntHolder(int initial_value) { value = initial_value; } | |
public LongHolder(long initial_value) | public LongHolder() | public LongHolder(long initial_value) { value = initial_value; } |
value = initial_value; | public LongHolder(long initial_value) { value = initial_value; } | |
public StringHolder(String initial_value) | public StringHolder() | public StringHolder(String initial_value) { value = initial_value; } |
value = initial_value; | public StringHolder(String initial_value) { value = initial_value; } | |
l = l * 31 + Double.doubleToLongBits(m10); | public int hashCode() { long l = Double.doubleToLongBits(m00); l = l * 31 + Double.doubleToLongBits(m10); l = l * 31 + Double.doubleToLongBits(m01); l = l * 31 + Double.doubleToLongBits(m11); l = l * 31 + Double.doubleToLongBits(m02); l = l * 31 + Double.doubleToLongBits(m12); return (int) ((l >> 32) ^ l); } | |
l = l * 31 + Double.doubleToLongBits(m11); | public int hashCode() { long l = Double.doubleToLongBits(m00); l = l * 31 + Double.doubleToLongBits(m10); l = l * 31 + Double.doubleToLongBits(m01); l = l * 31 + Double.doubleToLongBits(m11); l = l * 31 + Double.doubleToLongBits(m02); l = l * 31 + Double.doubleToLongBits(m12); return (int) ((l >> 32) ^ l); } | |
l = l * 31 + Double.doubleToLongBits(m10); l = l * 31 + Double.doubleToLongBits(m11); | public int hashCode() { long l = Double.doubleToLongBits(m00); l = l * 31 + Double.doubleToLongBits(m10); l = l * 31 + Double.doubleToLongBits(m01); l = l * 31 + Double.doubleToLongBits(m11); l = l * 31 + Double.doubleToLongBits(m02); l = l * 31 + Double.doubleToLongBits(m12); return (int) ((l >> 32) ^ l); } | |
SizeRequirements.calculateAlignedPositions(target.getWidth(), xTotal, | Insets in = target.getInsets(); int width = target.getWidth() - in.left - in.right; int height = target.getHeight() - in.top - in.bottom; SizeRequirements.calculateAlignedPositions(width, xTotal, | private void checkLayout() { if (offsetsX == null || offsetsY == null || spansX == null || spansY == null) { checkRequirements(); checkTotalRequirements(); int len = target.getComponents().length; offsetsX = new int[len]; offsetsY = new int[len]; spansX = new ... |
SizeRequirements.calculateAlignedPositions(target.getHeight(), yTotal, | SizeRequirements.calculateAlignedPositions(height, yTotal, | private void checkLayout() { if (offsetsX == null || offsetsY == null || spansX == null || spansY == null) { checkRequirements(); checkTotalRequirements(); int len = target.getComponents().length; offsetsX = new int[len]; offsetsY = new int[len]; spansX = new ... |
byte[] blues, int trans) | byte[] blues) | public IndexColorModel(int bits, int size, byte[] reds, byte[] greens, byte[] blues, int trans) { this (bits, size, reds, greens, blues, (byte[]) null); this.trans = trans; } |
this.trans = trans; | public IndexColorModel(int bits, int size, byte[] reds, byte[] greens, byte[] blues, int trans) { this (bits, size, reds, greens, blues, (byte[]) null); this.trans = trans; } | |
throw new BAD_OPERATION(); | BAD_OPERATION bad = new BAD_OPERATION(); bad.initCause(ex); bad.minor = Minor.Any; throw bad; | public static InvalidName extract(Any a) { try { return ((InvalidNameHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { throw new BAD_OPERATION(); } } |
Token t2 = scanner.readToken(); if (t2.type != Token.RCURLY) throw new RTFParseException("expected right curly braces"); | Token t2 = scanner.peekToken(); if (t2.type == Token.RCURLY) { scanner.readToken(); } else { System.err.println("RTF warning: expected right curly braces"); } | private void parseFile() throws IOException, BadLocationException { Token t1 = scanner.readToken(); if (t1.type != Token.LCURLY) throw new RTFParseException("expected left curly braces"); parseHeader(); parseDocument(); Token t2 = scanner.readToken(); if (t2.type != Token.RCURLY) thr... |
focusColor = getFocusColor(); selectColor = getSelectColor(); disabledTextColor = getDisabledTextColor(); | UIDefaults defaults = UIManager.getLookAndFeelDefaults(); focusColor = defaults.getColor(getPropertyPrefix() + "focus"); selectColor = defaults.getColor(getPropertyPrefix() + "select"); disabledTextColor = defaults.getColor(getPropertyPrefix() + "disabledText"); | public MetalToggleButtonUI() { super(); focusColor = getFocusColor(); selectColor = getSelectColor(); disabledTextColor = getDisabledTextColor(); } |
if (instance == null) instance = new MetalToggleButtonUI(); return instance; | return new MetalToggleButtonUI(); | public static ComponentUI createUI(JComponent component) { if (instance == null) instance = new MetalToggleButtonUI(); return instance; } |
UIDefaults def = UIManager.getLookAndFeelDefaults(); return def.getColor(getPropertyPrefix() + ".disabledText"); | return disabledTextColor; | protected Color getDisabledTextColor() { UIDefaults def = UIManager.getLookAndFeelDefaults(); return def.getColor(getPropertyPrefix() + ".disabledText"); } |
UIDefaults def = UIManager.getLookAndFeelDefaults(); return def.getColor(getPropertyPrefix() + ".focus"); | return focusColor; | protected Color getFocusColor() { UIDefaults def = UIManager.getLookAndFeelDefaults(); return def.getColor(getPropertyPrefix() + ".focus"); } |
UIDefaults def = UIManager.getLookAndFeelDefaults(); return def.getColor(getPropertyPrefix() + ".select"); | return selectColor; | protected Color getSelectColor() { UIDefaults def = UIManager.getLookAndFeelDefaults(); return def.getColor(getPropertyPrefix() + ".select"); } |
private void addValue(String name, String value) | public void addValue(String name, String value) | private void addValue(String name, String value) { Header key = new Header(name); String old = (String) super.get(key); if (old == null) { super.put(key, value); } else { super.put(key, old + ", " + value); } } |
Header key = new Header(name); String old = (String) super.get(key); if (old == null) { super.put(key, value); } else { super.put(key, old + ", " + value); } | headers.add(headers.size(), new HeaderElement(name, value)); | private void addValue(String name, String value) { Header key = new Header(name); String old = (String) super.get(key); if (old == null) { super.put(key, value); } else { super.put(key, old + ", " + value); } } |
return (String) super.get(new Header(header)); | for (int i = headers.size() - 1; i >= 0; i--) { HeaderElement e = (HeaderElement)headers.get(i); if (e.name.equalsIgnoreCase(header)) { return e.value; } } return null; | public String getValue(String header) { return (String) super.get(new Header(header)); } |
public Object put(Object key, Object value) | public void put(String name, String value) | public Object put(Object key, Object value) { return super.put(new Header((String) key), value); } |
return super.put(new Header((String) key), value); | for (int i = headers.size() - 1; i >= 0; i--) { HeaderElement e = (HeaderElement)headers.get(i); if (e.name.equalsIgnoreCase(name)) { e.value = value; return; } | public Object put(Object key, Object value) { return super.put(new Header((String) key), value); } |
addValue(name, value); } | public Object put(Object key, Object value) { return super.put(new Header((String) key), value); } | |
public void putAll(Map t) | public void putAll(Headers o) | public void putAll(Map t) { for (Iterator i = t.keySet().iterator(); i.hasNext(); ) { String key = (String) i.next(); String value = (String) t.get(key); put(key, value); } } |
for (Iterator i = t.keySet().iterator(); i.hasNext(); ) | for (Iterator it = o.iterator(); it.hasNext(); ) | public void putAll(Map t) { for (Iterator i = t.keySet().iterator(); i.hasNext(); ) { String key = (String) i.next(); String value = (String) t.get(key); put(key, value); } } |
String key = (String) i.next(); String value = (String) t.get(key); put(key, value); | HeaderElement e = (HeaderElement)it.next(); remove(e.name); addValue(e.name, e.value); | public void putAll(Map t) { for (Iterator i = t.keySet().iterator(); i.hasNext(); ) { String key = (String) i.next(); String value = (String) t.get(key); put(key, value); } } |
public Object remove(Object key) | public void remove(String name) | public Object remove(Object key) { return super.remove(new Header((String) key)); } |
return super.remove(new Header((String) key)); | for (Iterator it = headers.iterator(); it.hasNext(); ) { HeaderElement e = (HeaderElement)it.next(); if (e.name.equalsIgnoreCase(name)) it.remove(); } | public Object remove(Object key) { return super.remove(new Header((String) key)); } |
bad.minor = Minor.Any; | public static DuplicateName extract(Any any) { try { return ((DuplicateNameHolder) any.extract_Streamable()).value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("DuplicateName expected"); bad.initCause(cex); throw bad; } } | |
Log.error("Can't add Axis Object without axisId attribute defined"); | Log.warnln("Warning: Can't add Axis Object without axisId attribute defined"); | private boolean canAddAxisObjToArray(AxisInterface axisToAdd) { if (axisToAdd.getAxisId() == null) { Log.error("Can't add Axis Object without axisId attribute defined"); return false; } return true; } |
public CacheEvent(Object source, int type) { | public CacheEvent(Object source) { | public CacheEvent(Object source, int type) { super(source); this.eventType = type; } |
this.eventType = type; | public CacheEvent(Object source, int type) { super(source); this.eventType = type; } | |
return new TabbedPaneLayout(); | return (tabPane.getTabLayoutPolicy() == JTabbedPane.WRAP_TAB_LAYOUT) ? new MetalTabbedPaneUI.TabbedPaneLayout() : super.createLayoutManager(); | protected LayoutManager createLayoutManager() { return new TabbedPaneLayout(); } |
if ((currentRun == 0 && tabIndex != 0) || (currentRun > 0 && tabIndex != tabRuns[currentRun - 1])) | if (tabIndex != tabRuns[runCount-1]) | protected void paintBottomTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected) { int bottom = h - 1; int right = w - 1; int tabCount = tabPane.getTabCount(); int currentRun = getRunForTab(tabCount, tabIndex); // Paint gap if necessary. if (shou... |
g.drawLine(x + y, rect.y + rect.height + 1, x + 1, y + h + 2); | g.drawLine(x + 1, rect.y + rect.height + 1, x + 1, y + h + 2); | protected void paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) { boolean isOcean = MetalLookAndFeel.getCurrentTheme() instanceof OceanTheme; Color oceanSelectedBorder = ... |
g.drawLine(0, 5, 0, bottom); | g.drawLine(0, 6, 0, bottom); if (tabIndex != firstIndex) { | protected void paintLeftTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected) { g.translate(x, y); int bottom = h - 1; int right = w - 1; int tabCount = tabPane.getTabCount(); int currentRun = getRunForTab(tabCount, tabIndex); int firstIndex... |
if (tabIndex != 0) | if (tabIndex != firstIndex) | protected void paintLeftTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected) { g.translate(x, y); int bottom = h - 1; int right = w - 1; int tabCount = tabPane.getTabCount(); int currentRun = getRunForTab(tabCount, tabIndex); int firstIndex... |
c = UIManager.getColor("TabbedPane.tabAreaBackground"); | c = selectColor; | protected void paintRightTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected) { g.translate(x, y); int bottom = h - 1; int right = w - 1; int tabCount = tabPane.getTabCount(); int currentRun = getRunForTab(tabCount, tabIndex); int firstIndex = ... |
g.drawLine(right, 6, right, bottom); | g.drawLine(right, 7, right, bottom); | protected void paintRightTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected) { g.translate(x, y); int bottom = h - 1; int right = w - 1; int tabCount = tabPane.getTabCount(); int currentRun = getRunForTab(tabCount, tabIndex); int firstIndex = ... |
} else { if (ftpProtocol.connect(systemName.getText(),21)) { | if (ftpProtocol .login( user.getText(), new String(password.getPassword()))) { ftpProtocol.setDecimalChar(getDecimalChar()); ftpProtocol.getFileInfo( hostFile.getText(), intDesc.isSelected()); } } else { | public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("XTFR") || e.getActionCommand().equals("EMAIL")) { saveXTFRFields(); if (e.getActionCommand().equals("EMAIL")) emailIt = true; else emailIt = false; initializeMonit... |
if (ftpProtocol.login(user.getText(),new String(password.getPassword()))) { ftpProtocol.setDecimalChar(getDecimalChar()); ftpProtocol.getFileInfo(hostFile.getText(),intDesc.isSelected()); } } else { | disconnect(); } } } | public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("XTFR") || e.getActionCommand().equals("EMAIL")) { saveXTFRFields(); if (e.getActionCommand().equals("EMAIL")) emailIt = true; else emailIt = false; initializeMonit... |
disconnect(); } } } | if (e.getActionCommand().equals("BROWSEPC")) { | public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("XTFR") || e.getActionCommand().equals("EMAIL")) { saveXTFRFields(); if (e.getActionCommand().equals("EMAIL")) emailIt = true; else emailIt = false; initializeMonit... |
if (e.getActionCommand().equals("BROWSEPC")) { | getPCFile(); | public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("XTFR") || e.getActionCommand().equals("EMAIL")) { saveXTFRFields(); if (e.getActionCommand().equals("EMAIL")) emailIt = true; else emailIt = false; initializeMonit... |
getPCFile(); | } | public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("XTFR") || e.getActionCommand().equals("EMAIL")) { saveXTFRFields(); if (e.getActionCommand().equals("EMAIL")) emailIt = true; else emailIt = false; initializeMonit... |
} | if (e.getActionCommand().equals("CUSTOMIZE")) { | public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("XTFR") || e.getActionCommand().equals("EMAIL")) { saveXTFRFields(); if (e.getActionCommand().equals("EMAIL")) emailIt = true; else emailIt = false; initializeMonit... |
if (e.getActionCommand().equals("CUSTOMIZE")) { | filter.getOutputFilterInstance().setCustomProperties(); | public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("XTFR") || e.getActionCommand().equals("EMAIL")) { saveXTFRFields(); if (e.getActionCommand().equals("EMAIL")) emailIt = true; else emailIt = false; initializeMonit... |
filter.getOutputFilterInstance().setCustomProperties(); | } | public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("XTFR") || e.getActionCommand().equals("EMAIL")) { saveXTFRFields(); if (e.getActionCommand().equals("EMAIL")) emailIt = true; else emailIt = false; initializeMonit... |
} } | } | public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("XTFR") || e.getActionCommand().equals("EMAIL")) { saveXTFRFields(); if (e.getActionCommand().equals("EMAIL")) emailIt = true; else emailIt = false; initializeMonit... |
BorderLayout borderLayout = new BorderLayout(); Border etchedBorder = BorderFactory.createEtchedBorder(); JPanel mp = new JPanel(); mp.setLayout(borderLayout); JPanel sp = new JPanel(); sp.setLayout(new BorderLayout()); sp.setBorder(etchedBorder); as400p = new JPanel(); as400p.setBorder(BorderFactory.createTitled... | BorderLayout borderLayout = new BorderLayout(); Border emptyBorder = BorderFactory.createEmptyBorder(10, 10, 0, 10); JPanel mp = new JPanel(); mp.setLayout(borderLayout); JPanel sp = new JPanel(); sp.setLayout(new BorderLayout()); sp.setBorder(emptyBorder); as400p = new JPanel(); as400p.setBorder( BorderFactory.c... | private void initXTFRInfo() { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); Border etchedBorder = BorderFactory.createEtchedBorder(); // main panel JPanel mp = new JPanel(); mp.setLayout(borderLayout); // system panel JPanel sp = n... |
public void start() throws PluginException { try { InitialNaming.bind(NAME, this); WorkUtils.add(new Work("Start device manager") { public void execute() { loadExtensions(); | public void start(Device device) throws DeviceNotFoundException, DriverException { getDevice(device.getId()); if (!device.isStarted()) { try { BootLog.debug("Starting " + device.getId()); final StopWatch sw = new StopWatch(); device.start(); sw.stop(); if (sw.isElapsedLongerThen(defaultStartTimeout)) { BootLog.error... | public void start() throws PluginException { try { InitialNaming.bind(NAME, this); WorkUtils.add(new Work("Start device manager") { public void execute() { loadExtensions(); } }); } catch (NamingException ex) { ... |
}); } catch (NamingException ex) { throw new PluginException(ex); | BootLog.debug("Started " + device.getId()); } catch (DriverException ex) { BootLog.error("Cannot start " + device.getId(), ex); } catch (Throwable ex) { BootLog.error("Cannot start " + device.getId(), ex); } | public void start() throws PluginException { try { InitialNaming.bind(NAME, this); WorkUtils.add(new Work("Start device manager") { public void execute() { loadExtensions(); } }); } catch (NamingException ex) { ... |
public void stop() throws PluginException { stopDevices(); InitialNaming.unbind(NAME); | public void stop(Device device) throws DeviceNotFoundException, DriverException { getDevice(device.getId()); if (device.isStarted()) { BootLog.debug("Starting " + device.getId()); device.stop(false); BootLog.debug("Stopped " + device.getId()); } | public void stop() throws PluginException { stopDevices(); InitialNaming.unbind(NAME); } |
public DeviceAlreadyRegisteredException(String s) { super(s); | public DeviceAlreadyRegisteredException() { super(); | public DeviceAlreadyRegisteredException(String s) { super(s); } |
public DeviceNotFoundException(String s) { super(s); | public DeviceNotFoundException() { super(); | public DeviceNotFoundException(String s) { super(s); } |
if (! m.isComponentPartOfCurrentMenu(target)) | if (m.getSelectedPath().length > 0 && ! m.isComponentPartOfCurrentMenu(target) && (((JComponent)target).getClientProperty(DONT_CANCEL_POPUP) == null || !((JComponent)target).getClientProperty(DONT_CANCEL_POPUP).equals(Boolean.TRUE))) { | private void mousePressed(MouseEvent ev) { // Autoclose all menus managed by the MenuSelectionManager. MenuSelectionManager m = MenuSelectionManager.defaultManager(); Component target = ev.getComponent(); if (target instanceof Container) target = ((Container) target).findComponentAt(ev... |
} | private void mousePressed(MouseEvent ev) { // Autoclose all menus managed by the MenuSelectionManager. MenuSelectionManager m = MenuSelectionManager.defaultManager(); Component target = ev.getComponent(); if (target instanceof Container) target = ((Container) target).findComponentAt(ev... | |
"Tree.hash", new ColorUIResource(new Color(128, 128, 128)), | "Tree.hash", new ColorUIResource(new Color(184, 207, 228)), | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... |
public Statistic(String name, String description) { this.name = name; this.description = description; | public Statistic(String name) { this(name, null); | public Statistic(String name, String description) { this.name = name; this.description = description; } |
return formatCommandList; | ArrayList commandList = new ArrayList(); Iterator iter = formatCommandList.iterator(); while (iter.hasNext()) { FormattedIOCmd thisCommand = (FormattedIOCmd) iter.next(); if (thisCommand instanceof RepeatFormattedIOCmd) { int count = ((RepeatFormattedIOCmd) thisCommand).getCount().intValue(); while (count-- > 0) { com... | public List getCommands() { return formatCommandList; } |
return (Integer) ((XMLAttribute) attribHash.get("count")).getAttribValue(); | return new Integer((String) ((XMLAttribute) attribHash.get("count")).getAttribValue()); | public Integer getCount() { return (Integer) ((XMLAttribute) attribHash.get("count")).getAttribValue(); } |
((XMLAttribute) attribHash.get("count")).setAttribValue(numCount); | if (numCount.intValue() < 1) { Log.warnln("Cant set repeatFormattedIOCmd count to less than 1, ignoring set request."); } else { ((XMLAttribute) attribHash.get("count")).setAttribValue(numCount); } | public void setCount(Integer numCount) { ((XMLAttribute) attribHash.get("count")).setAttribValue(numCount); } |
else if (ssa.equalsIgnoreCase(Registry.RSA_PSS_SIG)) { result = new RSAPSSSignature(); } else if (ssa.equalsIgnoreCase(Registry.RSA_PKCS1_V1_5_SIG)) { result = new RSAPKCS1V1_5Signature(); } | else if (ssa.startsWith(Registry.RSA_SIG_PREFIX)) result = RSASignatureFactory.getInstance(ssa); | public static final ISignature getInstance(String ssa) { if (ssa == null) { return null; } ssa = ssa.trim(); ISignature result = null; if (ssa.equalsIgnoreCase(Registry.DSA_SIG) || ssa.equals(Registry.DSS_SIG)) { result = new DSSSignature(); } else if (ssa.equalsIgnor... |
public static final Set getNames() | public static synchronized final Set getNames() { if (names == null) | public static final Set getNames() { HashSet hs = new HashSet(); hs.add(Registry.DSS_SIG); hs.add(Registry.RSA_PSS_SIG); hs.add(Registry.RSA_PKCS1_V1_5_SIG); return Collections.unmodifiableSet(hs); } |
hs.add(Registry.RSA_PSS_SIG); hs.add(Registry.RSA_PKCS1_V1_5_SIG); | hs.addAll(RSASignatureFactory.getNames()); | public static final Set getNames() { HashSet hs = new HashSet(); hs.add(Registry.DSS_SIG); hs.add(Registry.RSA_PSS_SIG); hs.add(Registry.RSA_PKCS1_V1_5_SIG); return Collections.unmodifiableSet(hs); } |
return Collections.unmodifiableSet(hs); | names = Collections.unmodifiableSet(hs); | public static final Set getNames() { HashSet hs = new HashSet(); hs.add(Registry.DSS_SIG); hs.add(Registry.RSA_PSS_SIG); hs.add(Registry.RSA_PKCS1_V1_5_SIG); return Collections.unmodifiableSet(hs); } |
return names; } | public static final Set getNames() { HashSet hs = new HashSet(); hs.add(Registry.DSS_SIG); hs.add(Registry.RSA_PSS_SIG); hs.add(Registry.RSA_PKCS1_V1_5_SIG); return Collections.unmodifiableSet(hs); } | |
result = JOptionPane.showOptionDialog( parent, message, LangTool.getString("em.title"), JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0] ); | result = JOptionPane.showOptionDialog(parent, message, LangTool.getString("em.title"), JOptionPane.DEFAULT_OPTION, JOptionPane.PLAIN_MESSAGE, null, options, options[0] ); | public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERRO... |
StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } | if (text.isSelected()) { | public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERRO... |
sem.setAttachment(sb.toString()); | StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++, col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } | public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERRO... |
sendIt(parent,sem); | sem.setAttachment(sb.toString()); } else { | public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERRO... |
sem.release(); sem = null; | File dir = new File(System.getProperty("user.dir")); | public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERRO... |
break; case 1: break; case 2: configureSMTP(parent); break; default: break; } } } } | try { File f = File.createTempFile(tempFile, ".png", dir); System.out.println(f.getName()); System.out.println(f.getCanonicalPath()); f.deleteOnExit(); EncodeComponent.encode( EncodeComponent.PNG, session, f); sem.setFileName(f.getName()); } catch (Exception ex) { System.out.println(ex.getMessage()); } } sendIt... | public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERRO... |
options[0] = LangTool.getString("em.optSendLabel"); options[1] = LangTool.getString("em.optCancelLabel"); | File smtp = new File("SMTPProperties.cfg"); | private void setOptions(String[] options) { options[0] = LangTool.getString("em.optSendLabel"); options[1] = LangTool.getString("em.optCancelLabel"); File smtp = new File("SMTPProperties.cfg"); if (smtp.exists()) options[2] = LangTool.getString("em.optEditLabel"); else option... |
File smtp = new File("SMTPProperties.cfg"); | if (smtp.exists()) options[2] = LangTool.getString("em.optEditLabel"); else options[2] = LangTool.getString("em.optConfigureLabel"); | private void setOptions(String[] options) { options[0] = LangTool.getString("em.optSendLabel"); options[1] = LangTool.getString("em.optCancelLabel"); File smtp = new File("SMTPProperties.cfg"); if (smtp.exists()) options[2] = LangTool.getString("em.optEditLabel"); else option... |
if (smtp.exists()) options[2] = LangTool.getString("em.optEditLabel"); else options[2] = LangTool.getString("em.optConfigureLabel"); } | } | private void setOptions(String[] options) { options[0] = LangTool.getString("em.optSendLabel"); options[1] = LangTool.getString("em.optCancelLabel"); File smtp = new File("SMTPProperties.cfg"); if (smtp.exists()) options[2] = LangTool.getString("em.optEditLabel"); else option... |
JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); | JPanel semp = new JPanel(); semp.setLayout(new GridBagLayout()); | private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); ... |
JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); | text = new JRadioButton(LangTool.getString("em.text")); graphic = new JRadioButton(LangTool.getString("em.graphic")); | private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); ... |
toAddress = new JComboBox(); toAddress.setEditable(true); | ButtonGroup tGroup = new ButtonGroup(); tGroup.add(text); tGroup.add(graphic); | private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); ... |
subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JText... | text.setSelected(true); | private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); ... |
config = null; | JLabel screenDump = new JLabel(LangTool.getString("em.screendump")); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); | private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); ... |
if (session != null) { config = session.getConfiguration(); | toAddress = new JComboBox(); toAddress.setPreferredSize(new Dimension(175, 25)); toAddress.setEditable(true); | private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); ... |
if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } | subject = new JTextField(30); bodyText = new JTextArea(6, 30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTex... | private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); ... |
semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); | text.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { setAttachmentName(); } }); | private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); ... |
return semp; | config = null; | private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); ... |
} | if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"), toAddress); } } gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 10, 5, 5); semp.add(scree... | private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.