bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
public void paint(Graphics g, JComponent c) { JViewport v = (JViewport)c; Component view = v.getView(); if (view == null) return; Point pos = v.getViewPosition(); Rectangle viewBounds = view.getBounds(); Rectangle portBounds = v.getBounds(); if (viewBounds.width == 0 || viewBo...
public void paint(Graphics g, JComponent c) { JViewport v = (JViewport)c; Component view = v.getView(); if (view == null) return; Point pos = v.getViewPosition(); Rectangle viewBounds = view.getBounds(); Rectangle portBounds = v.getBounds(); if (viewBounds.width == 0 || viewBo...
24,426
public void paint(Graphics g, JComponent c) { JViewport v = (JViewport)c; Component view = v.getView(); if (view == null) return; Point pos = v.getViewPosition(); Rectangle viewBounds = view.getBounds(); Rectangle portBounds = v.getBounds(); if (viewBounds.width == 0 || viewBo...
public void paint(Graphics g, JComponent c) { JViewport v = (JViewport)c; Component view = v.getView(); if (view == null) return; Point pos = port.getViewPosition(); Rectangle viewBounds = view.getBounds(); Rectangle portBounds = v.getBounds(); if (viewBounds.width == 0 || vie...
24,427
public void paint(Graphics g, JComponent c) { JViewport v = (JViewport)c; Component view = v.getView(); if (view == null) return; Point pos = v.getViewPosition(); Rectangle viewBounds = view.getBounds(); Rectangle portBounds = v.getBounds(); if (viewBounds.width == 0 || viewBo...
public void paint(Graphics g, JComponent c) { JViewport v = (JViewport)c; Component view = v.getView(); if (view == null) return; Point pos = v.getViewPosition(); Rectangle viewBounds = view.getBounds(); Rectangle portBounds = port.getBounds(); if (viewBounds.width == 0 || vie...
24,428
public void paint(Graphics g, JComponent c) { JViewport v = (JViewport)c; Component view = v.getView(); if (view == null) return; Point pos = v.getViewPosition(); Rectangle viewBounds = view.getBounds(); Rectangle portBounds = v.getBounds(); if (viewBounds.width == 0 || viewBo...
public void paint(Graphics g, JComponent c) { JViewport v = (JViewport)c; Component view = v.getView(); if (view == null) return; Point pos = v.getViewPosition(); Rectangle viewBounds = view.getBounds(); Rectangle portBounds = v.getBounds(); if (viewBounds.width == 0 || viewBo...
24,429
public void paint(Graphics g, JComponent c) { JViewport v = (JViewport)c; Component view = v.getView(); if (view == null) return; Point pos = v.getViewPosition(); Rectangle viewBounds = view.getBounds(); Rectangle portBounds = v.getBounds(); if (viewBounds.width == 0 || viewBo...
public void paint(Graphics g, JComponent c) { JViewport v = (JViewport)c; Component view = v.getView(); if (view == null) return; Point pos = v.getViewPosition(); Rectangle viewBounds = view.getBounds(); Rectangle portBounds = v.getBounds(); if (viewBounds.width == 0 || viewBo...
24,430
public void paint(Graphics g, JComponent c) { JViewport v = (JViewport)c; Component view = v.getView(); if (view == null) return; Point pos = v.getViewPosition(); Rectangle viewBounds = view.getBounds(); Rectangle portBounds = v.getBounds(); if (viewBounds.width == 0 || viewBo...
public void paint(Graphics g, JComponent c) { JViewport v = (JViewport)c; Component view = v.getView(); if (view == null) return; Point pos = v.getViewPosition(); Rectangle viewBounds = view.getBounds(); Rectangle portBounds = v.getBounds(); if (viewBounds.width == 0 || viewBo...
24,431
public void read(java.io.InputStream istream) throws MARSHAL { try { byte[] xMagic = new byte[ MAGIC.length ]; istream.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) { MARSHAL m = new MARSHAL("Not a GIOP message"); m.minor = Minor.Giop; ...
public void read(java.io.InputStream istream) throws MARSHAL { try { byte[] xMagic = new byte[ MAGIC.length ]; istream.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) { MARSHAL m = new MARSHAL("Not a GIOP message"); m.minor = Minor.Giop; ...
24,432
public void write(java.io.OutputStream out) { try { abstractDataOutputStream dout; if (isBigEndian()) dout = new BigEndianOutputStream(out); else dout = new LittleEndianOutputStream(out); // Write magic sequence. dout.write(MAGIC); // Write version ...
public void write(java.io.OutputStream out) { try { AbstractDataOutput dout; if (isBigEndian()) dout = new BigEndianOutputStream(out); else dout = new LittleEndianOutputStream(out); // Write magic sequence. dout.write(MAGIC); // Write version number...
24,433
public Dimension getPreferredSize(JComponent c) { JLabel lab = (JLabel) c; Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); Insets insets = lab.getInsets(); FontMetrics fm = lab.getFontMetrics(lab.getFont()); layoutCL(lab, fm, lab.getText(), ...
public Dimension getPreferredSize(JComponent c) { JLabel lab = (JLabel) c; Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); Insets insets = lab.getInsets(); FontMetrics fm = lab.getFontMetrics(lab.getFont()); layoutCL(lab, fm, lab.getText(), ...
24,434
public Dimension getPreferredSize(JComponent c) { JLabel lab = (JLabel) c; Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); Insets insets = lab.getInsets(); FontMetrics fm = lab.getFontMetrics(lab.getFont()); layoutCL(lab, fm, lab.getText(), ...
public Dimension getPreferredSize(JComponent c) { JLabel lab = (JLabel) c; Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); Insets insets = lab.getInsets(); FontMetrics fm = lab.getFontMetrics(lab.getFont()); layoutCL(lab, fm, lab.getText(), ...
24,435
public void paint(Graphics g, JComponent c) { JLabel b = (JLabel) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); FontMetrics fm = g.getFontMetrics(); vr = SwingUtilities.calculateInnerArea(c, vr); if (vr.width < 0) vr.width = 0; if (vr....
public void paint(Graphics g, JComponent c) { JLabel b = (JLabel) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); FontMetrics fm = g.getFontMetrics(); vr = SwingUtilities.calculateInnerArea(c, vr); if (vr.width < 0) vr.width = 0; if (vr....
24,437
public IllegalAccessException() { super(); }
public IllegalAccessException() { super(); }
24,441
public synchronized void addTextListener(TextListener listener) { textListener = AWTEventMulticaster.add(textListener, listener); enableEvents(AWTEvent.TEXT_EVENT_MASK); }
addTextListener(TextListener listener) { textListener = AWTEventMulticaster.add(textListener, listener); enableEvents(AWTEvent.TEXT_EVENT_MASK); }
24,443
public synchronized int getCaretPosition() { TextComponentPeer tcp = (TextComponentPeer) getPeer(); if (tcp != null) return (tcp.getCaretPosition()); else return (0); }
public synchronized int getCaretPosition() { TextComponentPeer tcp = (TextComponentPeer) getPeer(); if (tcp != null) return (tcp.getCaretPosition()); else return (0); }
24,444
public synchronized String getSelectedText() { String alltext = getText(); int start = getSelectionStart(); int end = getSelectionEnd(); return (alltext.substring(start, end)); }
getSelectedText() { String alltext = getText(); int start = getSelectionStart(); int end = getSelectionEnd(); return (alltext.substring(start, end)); }
24,445
protected void processTextEvent(TextEvent event) { if (textListener != null) textListener.textValueChanged(event); }
processTextEvent(TextEvent event) { if (textListener != null) textListener.textValueChanged(event); }
24,446
public synchronized void removeTextListener(TextListener listener) { textListener = AWTEventMulticaster.remove(textListener, listener); }
removeTextListener(TextListener listener) { textListener = AWTEventMulticaster.remove(textListener, listener); }
24,447
public synchronized void select(int selectionStart, int endSelection) { if (selectionStart < 0) selectionStart = 0; if (selectionStart > getText().length()) selectionStart = text.length(); if (selectionEnd > text.length()) selectionEnd = text.length(); if (selectionStart > getSelectionEnd()) selectionStart...
select(int selectionStart, int selectionEnd) { if (selectionStart < 0) selectionStart = 0; if (selectionStart > getText().length()) selectionStart = text.length(); if (selectionEnd > text.length()) selectionEnd = text.length(); if (selectionStart > getSelectionEnd()) selectionStart = selectionEnd; this.se...
24,448
public synchronized void select(int selectionStart, int endSelection) { if (selectionStart < 0) selectionStart = 0; if (selectionStart > getText().length()) selectionStart = text.length(); if (selectionEnd > text.length()) selectionEnd = text.length(); if (selectionStart > getSelectionEnd()) selectionStart...
public synchronized void select(int selectionStart, int endSelection) { if (selectionStart < 0) selectionStart = 0; if (selectionStart > getText().length()) selectionStart = text.length(); if (selectionEnd > text.length()) selectionEnd = text.length(); if (selectionStart > getSelectionEnd()) selectionStart...
24,449
public synchronized void selectAll() { select(0, getText().length()); }
selectAll() { select(0, getText().length()); }
24,450
public synchronized void setCaretPosition(int caretPosition) { if (caretPosition < 0) throw new IllegalArgumentException(); TextComponentPeer tcp = (TextComponentPeer) getPeer(); if (tcp != null) tcp.setCaretPosition(caretPosition); }
setCaretPosition(int caretPosition) { if (caretPosition < 0) throw new IllegalArgumentException(); TextComponentPeer tcp = (TextComponentPeer) getPeer(); if (tcp != null) tcp.setCaretPosition(caretPosition); }
24,451
public synchronized void setEditable(boolean editable) { this.editable = editable; TextComponentPeer tcp = (TextComponentPeer) getPeer(); if (tcp != null) tcp.setEditable(editable); }
setEditable(boolean editable) { this.editable = editable; TextComponentPeer tcp = (TextComponentPeer) getPeer(); if (tcp != null) tcp.setEditable(editable); }
24,452
public synchronized void setSelectionEnd(int selectionEnd) { select(getSelectionStart(), selectionEnd); }
setSelectionEnd(int selectionEnd) { select(getSelectionStart(), selectionEnd); }
24,453
public synchronized void setSelectionStart(int selectionStart) { select(selectionStart, getSelectionEnd()); }
setSelectionStart(int selectionStart) { select(selectionStart, getSelectionEnd()); }
24,454
public PrivateKey decodePrivateKey(byte[] input) { log.entering("DSSKeyPairPKCS8Codec", "decodePrivateKey"); if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue der...
public PrivateKey decodePrivateKey(byte[] input) { if (Configuration.DEBUG) log.entering(this.getClass().getName(), "decodePrivateKey"); if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); tr...
24,455
public PrivateKey decodePrivateKey(byte[] input) { log.entering("DSSKeyPairPKCS8Codec", "decodePrivateKey"); if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue der...
public PrivateKey decodePrivateKey(byte[] input) { log.entering("DSSKeyPairPKCS8Codec", "decodePrivateKey"); if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue der...
24,456
public PrivateKey decodePrivateKey(byte[] input) { log.entering("DSSKeyPairPKCS8Codec", "decodePrivateKey"); if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue der...
public PrivateKey decodePrivateKey(byte[] input) { log.entering("DSSKeyPairPKCS8Codec", "decodePrivateKey"); if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue der...
24,457
public PrivateKey decodePrivateKey(byte[] input) { log.entering("DSSKeyPairPKCS8Codec", "decodePrivateKey"); if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue der...
public PrivateKey decodePrivateKey(byte[] input) { log.entering("DSSKeyPairPKCS8Codec", "decodePrivateKey"); if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue der...
24,458
public PrivateKey decodePrivateKey(byte[] input) { log.entering("DSSKeyPairPKCS8Codec", "decodePrivateKey"); if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue der...
public PrivateKey decodePrivateKey(byte[] input) { log.entering("DSSKeyPairPKCS8Codec", "decodePrivateKey"); if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue der...
24,459
public byte[] encodePrivateKey(PrivateKey key) { if (! (key instanceof DSSPrivateKey)) throw new InvalidParameterException("Wrong key type"); DERValue derVersion = new DERValue(DER.INTEGER, BigInteger.ZERO); DERValue derOID = new DERValue(DER.OBJECT_IDENTIFIER, DSA_ALG_OID); DSSPrivateKey pk = (DSSP...
public byte[] encodePrivateKey(PrivateKey key) { if (! (key instanceof DSSPrivateKey)) throw new InvalidParameterException("Wrong key type"); DERValue derVersion = new DERValue(DER.INTEGER, BigInteger.ZERO); DERValue derOID = new DERValue(DER.OBJECT_IDENTIFIER, DSA_ALG_OID); DSSPrivateKey pk = (DSSP...
24,460
public byte[] getEncoded() { return getEncoded(IKeyPairCodec.RAW_FORMAT); }
public byte[] getEncoded() { byte[] result; switch (format) { case IKeyPairCodec.RAW_FORMAT: result = new DHKeyPairRawCodec().encodePublicKey(this); break; case IKeyPairCodec.X509_FORMAT: result = new DHKeyPairX509Codec().encodePublicKey(this); break; default: throw new IllegalArgumentException("Unsupported encod...
24,461
public static GnuDHPublicKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is che...
public static GnuDHPublicKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is che...
24,462
public static GnuDHPublicKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is che...
public static GnuDHPublicKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is che...
24,463
public static GnuDHPublicKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is che...
public static GnuDHPublicKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is che...
24,464
public void layoutContainer(Container parent) { // Position editor component to the left of arrow button if combo box is // editable int arrowSize = comboBox.getHeight(); int editorWidth = comboBox.getBounds().width - arrowSize; if (comboBox.isEditable()) editor.setBounds(0, 0, e...
public void layoutContainer(Container parent) { // Position editor component to the left of arrow button if combo box is // editable Insets i = getInsets(); int arrowSize = comboBox.getHeight() - (i.top + i.bottom); int editorWidth = comboBox.getBounds().width - arrowSize; if (comboBox....
24,466
public void layoutContainer(Container parent) { // Position editor component to the left of arrow button if combo box is // editable int arrowSize = comboBox.getHeight(); int editorWidth = comboBox.getBounds().width - arrowSize; if (comboBox.isEditable()) editor.setBounds(0, 0, e...
public void layoutContainer(Container parent) { // Position editor component to the left of arrow button if combo box is // editable int arrowSize = comboBox.getHeight(); int editorWidth = comboBox.getBounds().width - arrowSize; if (comboBox.isEditable()) editor.setBounds(0, 0, e...
24,467
public void layoutContainer(Container parent) { // Position editor component to the left of arrow button if combo box is // editable int arrowSize = comboBox.getHeight(); int editorWidth = comboBox.getBounds().width - arrowSize; if (comboBox.isEditable()) editor.setBounds(0, 0, e...
public void layoutContainer(Container parent) { // Position editor component to the left of arrow button if combo box is // editable int arrowSize = comboBox.getHeight(); int editorWidth = comboBox.getBounds().width - arrowSize; if (comboBox.isEditable()) editor.setBounds(0, 0, e...
24,468
public Dimension minimumLayoutSize(Container parent) { return preferredLayoutSize(parent); }
public Dimension minimumLayoutSize(Container parent) { return parent.getMinimumSize(); }
24,469
public Dimension preferredLayoutSize(Container parent) { return getPreferredSize((JComponent) parent); }
public Dimension preferredLayoutSize(Container parent) { return parent.getPreferredSize(); }
24,470
public void focusGained(FocusEvent e) { // Lets assume every change invalidates the minimumsize. isMinimumSizeDirty = true; hasFocus = true; comboBox.repaint(); }
public void focusGained(FocusEvent e) { // Lets assume every change invalidates the minimumsize. hasFocus = true; comboBox.repaint(); }
24,471
public void focusLost(FocusEvent e) { // Lets assume every change invalidates the minimumsize. isMinimumSizeDirty = true; hasFocus = false; setPopupVisible(comboBox, false); comboBox.repaint(); }
public void focusLost(FocusEvent e) { // Lets assume every change invalidates the minimumsize. hasFocus = false; setPopupVisible(comboBox, false); comboBox.repaint(); }
24,472
public void itemStateChanged(ItemEvent e) { // Lets assume every change invalidates the minimumsize. isMinimumSizeDirty = true; if (e.getStateChange() == ItemEvent.SELECTED && comboBox.isEditable()) comboBox.getEditor().setItem(e.getItem()); comboBox.repaint(); }
public void itemStateChanged(ItemEvent e) { // Lets assume every change invalidates the minimumsize. isMinimumSizeDirty = true; if (e.getStateChange() == ItemEvent.SELECTED && comboBox.isEditable()) comboBox.getEditor().setItem(e.getItem()); comboBox.repaint(); }
24,474
public void intervalAdded(ListDataEvent e) { // Lets assume every change invalidates the minimumsize. isMinimumSizeDirty = true; ComboBoxModel model = comboBox.getModel(); ListCellRenderer renderer = comboBox.getRenderer(); if (displaySize == null) displaySize = getDisplaySize(); ...
public void intervalAdded(ListDataEvent e) { // Lets assume every change invalidates the minimumsize. int start = e.getIndex0(); int end = e.getIndex1(); if (start == 0 && comboBox.getItemCount() - (end - start + 1) == 0) { contentsChanged(e); } else if (start != -1 || end != -1) { ListCellRenderer re...
24,477
public void intervalAdded(ListDataEvent e) { // Lets assume every change invalidates the minimumsize. isMinimumSizeDirty = true; ComboBoxModel model = comboBox.getModel(); ListCellRenderer renderer = comboBox.getRenderer(); if (displaySize == null) displaySize = getDisplaySize(); ...
public void intervalAdded(ListDataEvent e) { // Lets assume every change invalidates the minimumsize. isMinimumSizeDirty = true; ComboBoxModel model = comboBox.getModel(); ListCellRenderer renderer = comboBox.getRenderer(); if (displaySize == null) displaySize = getDisplaySize(); ...
24,478
public void intervalRemoved(ListDataEvent e) { // Lets assume every change invalidates the minimumsize. isMinimumSizeDirty = true; // recalculate display size of the JComboBox. displaySize = getDisplaySize(); comboBox.repaint(); }
public void intervalRemoved(ListDataEvent e) { // Lets assume every change invalidates the minimumsize. isMinimumSizeDirty = true; // recalculate display size of the JComboBox. displaySize = getDisplaySize(); comboBox.repaint(); }
24,479
public void configureArrowButton() { arrowButton.setEnabled(comboBox.isEnabled()); arrowButton.setFont(comboBox.getFont()); arrowButton.setFocusable(false); }
public void configureArrowButton() { arrowButton.setEnabled(comboBox.isEnabled()); arrowButton.setFocusable(false); }
24,482
protected void configureEditor() { editor.setFont(comboBox.getFont()); comboBox.getEditor().setItem(comboBox.getSelectedItem()); // FIXME: Need to implement. Set font and add listeners. }
protected void configureEditor() { editor.setFont(comboBox.getFont()); if (popupKeyListener != null) editor.addKeyListener(popupKeyListener); comboBox.configureEditor(comboBox.getEditor(), comboBox.getSelectedItem()); // FIXME: Need to implement. Set font and add listeners. }
24,484
protected JButton createArrowButton() { return new BasicArrowButton(BasicArrowButton.SOUTH, buttonBackground, buttonShadow, buttonDarkShadow, buttonHighlight); }
protected JButton createArrowButton() { return new BasicArrowButton(BasicArrowButton.SOUTH, buttonBackground, buttonShadow, buttonDarkShadow, buttonHighlight); }
24,485
protected ListCellRenderer createRenderer() { return new BasicComboBoxRenderer(); }
protected ListCellRenderer createRenderer() { return new BasicComboBoxRenderer.UIResource(); }
24,486
protected Dimension getDefaultSize() { // There is nothing in the spec to say how this method should be // implemented...so I've done some guessing, written some Mauve tests, // and written something that gives dimensions that are close to the // reference implementation. FontMetrics fm = comboBox.ge...
protected Dimension getDefaultSize() { // There is nothing in the spec to say how this method should be // implemented...so I've done some guessing, written some Mauve tests, // and written something that gives dimensions that are close to the // reference implementation. FontMetrics fm = comboBox.ge...
24,487
protected Dimension getDisplaySize() { if (!comboBox.isEditable()) { Object prototype = comboBox.getPrototypeDisplayValue(); if (prototype != null) { // calculate result based on prototype ListCellRenderer renderer = comboBox.getRenderer(); Component comp = renderer.getListCe...
protected Dimension getDisplaySize() { if (comboBox.isEditable() && comboBox.getModel().getSize() == 0) return new Dimension(100, editor.getPreferredSize().height); Dimension dim = new Dimension(); ListCellRenderer renderer = comboBox.getRenderer(); ComboBoxModel model = comboBox.getModel(); if (renderer != null...
24,488
protected Dimension getDisplaySize() { if (!comboBox.isEditable()) { Object prototype = comboBox.getPrototypeDisplayValue(); if (prototype != null) { // calculate result based on prototype ListCellRenderer renderer = comboBox.getRenderer(); Component comp = renderer.getListCe...
protected Dimension getDisplaySize() { if (!comboBox.isEditable()) { Object prototype = comboBox.getPrototypeDisplayValue(); if (prototype != null) { // calculate result based on prototype ListCellRenderer renderer = comboBox.getRenderer(); Component comp = renderer.getListCe...
24,489
protected Dimension getDisplaySize() { if (!comboBox.isEditable()) { Object prototype = comboBox.getPrototypeDisplayValue(); if (prototype != null) { // calculate result based on prototype ListCellRenderer renderer = comboBox.getRenderer(); Component comp = renderer.getListCe...
protected Dimension getDisplaySize() { if (!comboBox.isEditable()) { Object prototype = comboBox.getPrototypeDisplayValue(); if (prototype != null) { // calculate result based on prototype ListCellRenderer renderer = comboBox.getRenderer(); Component comp = renderer.getListCe...
24,490
protected Dimension getDisplaySize() { if (!comboBox.isEditable()) { Object prototype = comboBox.getPrototypeDisplayValue(); if (prototype != null) { // calculate result based on prototype ListCellRenderer renderer = comboBox.getRenderer(); Component comp = renderer.getListCe...
protected Dimension getDisplaySize() { if (!comboBox.isEditable()) { Object prototype = comboBox.getPrototypeDisplayValue(); if (prototype != null) { // calculate result based on prototype ListCellRenderer renderer = comboBox.getRenderer(); Component comp = renderer.getListCe...
24,491
protected Dimension getDisplaySize() { if (!comboBox.isEditable()) { Object prototype = comboBox.getPrototypeDisplayValue(); if (prototype != null) { // calculate result based on prototype ListCellRenderer renderer = comboBox.getRenderer(); Component comp = renderer.getListCe...
protected Dimension getDisplaySize() { if (!comboBox.isEditable()) { Object prototype = comboBox.getPrototypeDisplayValue(); if (prototype != null) { // calculate result based on prototype ListCellRenderer renderer = comboBox.getRenderer(); Component comp = renderer.getListCe...
24,492
protected Insets getInsets() { return new Insets(0, 0, 0, 0); }
protected Insets getInsets() { return comboBox.getInsets(); }
24,494
public Dimension getMaximumSize(JComponent c) { return MAXIMUM_SIZE; }
public Dimension getMaximumSize(JComponent c) { Dimension size = getPreferredSize(c); size.width = 32767; return size; }
24,495
public Dimension getMinimumSize(JComponent c) { if (isMinimumSizeDirty) { Dimension d = getDisplaySize(); int arrowButtonWidth = d.height; cachedMinimumSize = new Dimension(d.width + arrowButtonWidth, d.height); isMinimumSizeDirty = false; } return new Dimension(cachedMinimumSize); }
public Dimension getMinimumSize(JComponent c) { if (isMinimumSizeDirty) { Dimension d = getDisplaySize(); int arrowButtonWidth = d.height; cachedMinimumSize = new Dimension(d.width + arrowButtonWidth, d.height); isMinimumSizeDirty = false; } return new Dimension(cachedMinimumSize); }
24,496
public Dimension getPreferredSize(JComponent c) { // note: overriding getMinimumSize() (for example in the MetalComboBoxUI // class) affects the getPreferredSize() result, so it seems logical that // this method is implemented by delegating to the getMinimumSize() method return getMinimumSize(c); }
public Dimension getPreferredSize(JComponent c) { // note: overriding getMinimumSize() (for example in the MetalComboBoxUI // class) affects the getPreferredSize() result, so it seems logical that // this method is implemented by delegating to the getMinimumSize() method Dimension size = getMinimumSize...
24,497
protected void installComponents() { // create drop down list of items popup = createPopup(); listBox = popup.getList(); // set editor and renderer for the combo box. Editor is used // only if combo box becomes editable, otherwise renderer is used // to paint the selected item; combobox is not edit...
protected void installComponents() { // create drop down list of items popup = createPopup(); listBox = popup.getList(); // set editor and renderer for the combo box. Editor is used // only if combo box becomes editable, otherwise renderer is used // to paint the selected item; combobox is not edit...
24,498
protected void installComponents() { // create drop down list of items popup = createPopup(); listBox = popup.getList(); // set editor and renderer for the combo box. Editor is used // only if combo box becomes editable, otherwise renderer is used // to paint the selected item; combobox is not edit...
protected void installComponents() { // create drop down list of items popup = createPopup(); listBox = popup.getList(); // set editor and renderer for the combo box. Editor is used // only if combo box becomes editable, otherwise renderer is used // to paint the selected item; combobox is not edit...
24,499
protected void installComponents() { // create drop down list of items popup = createPopup(); listBox = popup.getList(); // set editor and renderer for the combo box. Editor is used // only if combo box becomes editable, otherwise renderer is used // to paint the selected item; combobox is not edit...
protected void installComponents() { // create drop down list of items popup = createPopup(); listBox = popup.getList(); // set editor and renderer for the combo box. Editor is used // only if combo box becomes editable, otherwise renderer is used // to paint the selected item; combobox is not edit...
24,500
protected void installComponents() { // create drop down list of items popup = createPopup(); listBox = popup.getList(); // set editor and renderer for the combo box. Editor is used // only if combo box becomes editable, otherwise renderer is used // to paint the selected item; combobox is not edit...
protected void installComponents() { // create drop down list of items popup = createPopup(); listBox = popup.getList(); // set editor and renderer for the combo box. Editor is used // only if combo box becomes editable, otherwise renderer is used // to paint the selected item; combobox is not edit...
24,501
protected void installDefaults() { LookAndFeel.installColorsAndFont(comboBox, "ComboBox.background", "ComboBox.foreground", "ComboBox.font"); // fetch the button color scheme buttonBackground = UIManager.getColor("ComboBox.buttonBackground"); buttonShadow = UIManag...
protected void installDefaults() { LookAndFeel.installColorsAndFont(comboBox, "ComboBox.background", "ComboBox.foreground", "ComboBox.font"); // fetch the button color scheme buttonBackground = UIManager.getColor("ComboBox.buttonBackground"); buttonShadow = UIManag...
24,502
protected void installListeners() { // install combo box's listeners propertyChangeListener = createPropertyChangeListener(); comboBox.addPropertyChangeListener(propertyChangeListener); focusListener = createFocusListener(); editor.addFocusListener(focusListener); itemListener = createItemListener(...
protected void installListeners() { // install combo box's listeners propertyChangeListener = createPropertyChangeListener(); comboBox.addPropertyChangeListener(propertyChangeListener); focusListener = createFocusListener(); editor.addFocusListener(focusListener); itemListener = createItemListener(...
24,503
public void installUI(JComponent c) { super.installUI(c); if (c instanceof JComboBox) { comboBox = (JComboBox) c; comboBox.setOpaque(true); comboBox.setLayout(createLayoutManager()); installDefaults(); installComponents(); installListeners(); installKeyboardActions(); } }
public void installUI(JComponent c) { super.installUI(c); if (c instanceof JComboBox) { comboBox = (JComboBox) c; comboBox.setOpaque(true); comboBox.setLayout(createLayoutManager()); installDefaults(); installComponents(); installListeners(); installKeyboardActions(); } }
24,505
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { if (! comboBox.isEditable()) { Object currentValue = comboBox.getSelectedItem(); boolean isPressed = arrowButton.getModel().isPressed(); /* Gets the component to be drawn for the current value. * If there is currently no selecte...
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { if (! comboBox.isEditable()) { Object currentValue = comboBox.getSelectedItem(); boolean isPressed = arrowButton.getModel().isPressed(); /* Gets the component to be drawn for the current value. * If there is currently no selecte...
24,508
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { if (! comboBox.isEditable()) { Object currentValue = comboBox.getSelectedItem(); boolean isPressed = arrowButton.getModel().isPressed(); /* Gets the component to be drawn for the current value. * If there is currently no selecte...
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { if (! comboBox.isEditable()) { Object currentValue = comboBox.getSelectedItem(); boolean isPressed = arrowButton.getModel().isPressed(); /* Gets the component to be drawn for the current value. * If there is currently no selecte...
24,509
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { if (! comboBox.isEditable()) { Object currentValue = comboBox.getSelectedItem(); boolean isPressed = arrowButton.getModel().isPressed(); /* Gets the component to be drawn for the current value. * If there is currently no selecte...
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { if (! comboBox.isEditable()) { Object currentValue = comboBox.getSelectedItem(); boolean isPressed = arrowButton.getModel().isPressed(); /* Gets the component to be drawn for the current value. * If there is currently no selecte...
24,510
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { if (! comboBox.isEditable()) { Object currentValue = comboBox.getSelectedItem(); boolean isPressed = arrowButton.getModel().isPressed(); /* Gets the component to be drawn for the current value. * If there is currently no selecte...
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { if (! comboBox.isEditable()) { Object currentValue = comboBox.getSelectedItem(); boolean isPressed = arrowButton.getModel().isPressed(); /* Gets the component to be drawn for the current value. * If there is currently no selecte...
24,511
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { if (! comboBox.isEditable()) { Object currentValue = comboBox.getSelectedItem(); boolean isPressed = arrowButton.getModel().isPressed(); /* Gets the component to be drawn for the current value. * If there is currently no selecte...
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { if (! comboBox.isEditable()) { Object currentValue = comboBox.getSelectedItem(); boolean isPressed = arrowButton.getModel().isPressed(); /* Gets the component to be drawn for the current value. * If there is currently no selecte...
24,512
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { if (! comboBox.isEditable()) { Object currentValue = comboBox.getSelectedItem(); boolean isPressed = arrowButton.getModel().isPressed(); /* Gets the component to be drawn for the current value. * If there is currently no selecte...
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { if (! comboBox.isEditable()) { Object currentValue = comboBox.getSelectedItem(); boolean isPressed = arrowButton.getModel().isPressed(); /* Gets the component to be drawn for the current value. * If there is currently no selecte...
24,513
public void setPopupVisible(JComboBox c, boolean v) { if (v) popup.show(); else popup.hide(); if (comboBox.isEditable()) editor.requestFocus(); else comboBox.requestFocus(); }
public void setPopupVisible(JComboBox c, boolean v) { if (v) popup.show(); else popup.hide(); if (comboBox.isEditable()) editor.requestFocus(); else comboBox.requestFocus(); }
24,516
protected void uninstallComponents() { // uninstall arrow button unconfigureArrowButton(); comboBox.remove(arrowButton); arrowButton = null; listBox = null; popup = null; comboBox.setRenderer(null); // if the editor is not an instanceof UIResource, it was not set by the // UI delegate, so ...
protected void uninstallComponents() { // uninstall arrow button unconfigureArrowButton(); comboBox.remove(arrowButton); arrowButton = null; popup = null; comboBox.setRenderer(null); // if the editor is not an instanceof UIResource, it was not set by the // UI delegate, so don't clear it....
24,519
protected void uninstallDefaults() { if (comboBox.getFont() instanceof UIResource) comboBox.setFont(null); if (comboBox.getForeground() instanceof UIResource) comboBox.setForeground(null); if (comboBox.getBackground() instanceof UIResource) comboBox.setBackground(null); buttonBackgroun...
protected void uninstallDefaults() { if (comboBox.getFont() instanceof UIResource) comboBox.setFont(null); if (comboBox.getForeground() instanceof UIResource) comboBox.setForeground(null); if (comboBox.getBackground() instanceof UIResource) comboBox.setBackground(null); buttonBackgroun...
24,521
protected void uninstallListeners() { comboBox.removePropertyChangeListener(propertyChangeListener); propertyChangeListener = null; comboBox.removeFocusListener(focusListener); listBox.removeFocusListener(focusListener); focusListener = null; comboBox.removeItemListener(itemListener); itemListen...
protected void uninstallListeners() { comboBox.removePropertyChangeListener(propertyChangeListener); propertyChangeListener = null; comboBox.removeFocusListener(focusListener); listBox.removeFocusListener(focusListener); focusListener = null; comboBox.removeItemListener(itemListener); itemListen...
24,522
public void uninstallUI(JComponent c) { uninstallKeyboardActions(); uninstallListeners(); uninstallComponents(); uninstallDefaults(); comboBox = null; }
public void uninstallUI(JComponent c) { uninstallKeyboardActions(); uninstallListeners(); uninstallDefaults(); comboBox = null; }
24,524
float determineMaxLineLength() { // if the longest line is cached, return the cached value if (maxLineLength != -1) return maxLineLength; // otherwise we have to go through all the lines and find it Element el = getElement(); Segment seg = getLineBuffer(); float span = 0; for (int i = 0...
float determineMaxLineLength() { // if the longest line is cached, return the cached value if (maxLineLength != -1) return maxLineLength; // otherwise we have to go through all the lines and find it Element el = getElement(); Segment seg = getLineBuffer(); float span = 0; for (int i = 0...
24,527
float determineMaxLineLength() { // if the longest line is cached, return the cached value if (maxLineLength != -1) return maxLineLength; // otherwise we have to go through all the lines and find it Element el = getElement(); Segment seg = getLineBuffer(); float span = 0; for (int i = 0...
float determineMaxLineLength() { // if the longest line is cached, return the cached value if (maxLineLength != -1) return maxLineLength; // otherwise we have to go through all the lines and find it Element el = getElement(); Segment seg = getLineBuffer(); float span = 0; for (int i = 0...
24,528
protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) { Element el = getElement(); ElementChange ec = changes.getChange(el); // If ec is null then no lines were added or removed, just // repaint the changed line if (ec == null) { int line = getElement().getElement...
protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) { Element el = getElement(); ElementChange ec = changes.getChange(el); // If ec is null then no lines were added or removed, just // repaint the changed line if (ec == null) { int line = getElement().getElement...
24,530
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position ...
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position ...
24,531
protected Assembler() { pseudo = new PseudoInstructions(labels); hwSupport = new X86Support(this, instructions, labels); }
protected Assembler() { pseudo = new PseudoInstructions(labels); hwSupport = new X86Support(this, instructions, labels); }
24,533
protected void validate() throws OptionException { if (fileAndAlias.size() < 1) throw new OptionException(Messages.getString("Main.133")); //$NON-NLS-1$ jarFileName = (String) fileAndAlias.get(0); if (! verify) // must have an ALIAS. use "mykey" if undefined if (fileAndAlias.size() <...
protected void validate() throws OptionException { if (fileAndAlias.size() < 1) throw new OptionException(Messages.getString("Main.133")); //$NON-NLS-1$ jarFileName = (String) fileAndAlias.get(0); if (! verify) // must have an ALIAS. use "mykey" if undefined if (fileAndAlias.size() <...
24,534
private void processArgs(String[] args) throws Exception { log.entering(this.getClass().getName(), "processArgs", args); //$NON-NLS-1$ cmdLineParser = new ToolParser(); cmdLineParser.initializeParser(); cmdLineParser.parse(args, new ToolParserCallback()); setupCommonParams(); if (verify) { ...
private void processArgs(String[] args) throws Exception { log.entering(this.getClass().getName(), "processArgs", args); //$NON-NLS-1$ cmdLineParser = new ToolParser(); cmdLineParser.initializeParser(); cmdLineParser.parse(args, new ToolParserCallback()); setupCommonParams(); if (verify) { ...
24,537
private void processArgs(String[] args) throws Exception { log.entering(this.getClass().getName(), "processArgs", args); //$NON-NLS-1$ cmdLineParser = new ToolParser(); cmdLineParser.initializeParser(); cmdLineParser.parse(args, new ToolParserCallback()); setupCommonParams(); if (verify) { ...
private void processArgs(String[] args) throws Exception { log.entering(this.getClass().getName(), "processArgs", args); //$NON-NLS-1$ cmdLineParser = new ToolParser(); cmdLineParser.initializeParser(); cmdLineParser.parse(args, new ToolParserCallback()); setupCommonParams(); if (verify) { ...
24,538
private void setupSigningParams() throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, UnsupportedCallbackException, UnrecoverableKeyException { log.entering(this.getClass().getName(), "setupSigningParams"); //$NON-NLS-1$ if (ksURL == null || ksURL.trim().length() ==...
private void setupSigningParams() throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, UnsupportedCallbackException, UnrecoverableKeyException { log.entering(this.getClass().getName(), "setupSigningParams"); //$NON-NLS-1$ if (ksURL == null || ksURL.trim().length() ==...
24,541
protected int getRowX(int row, int depth) { return depth * totalChildIndent; }
protected int getRowX(int row, int depth) { return BasicTreeUI.this.getRowX(row, depth); }
24,559
protected Color getHashColor() { return UIManager.getColor("Tree.hash"); }
protected Color getHashColor() { return hashColor; }
24,570
protected void setHashColor(Color color) { // FIXME: Putting something in the UIDefaults map is certainly wrong. UIManager.put("Tree.hash", color); }
protected void setHashColor(Color color) { // FIXME: Putting something in the UIDefaults map is certainly wrong. hashColor = color; }
24,573
private static final BigInteger RSADP(final RSAPrivateKey K, BigInteger c) { // 1. If the representative c is not between 0 and n - 1, output // "representative out of range" and stop. final BigInteger n = K.getModulus(); if (c.compareTo(ZERO) < 0 || c.compareTo(n.subtract(ONE)) > 0) { thr...
private static final BigInteger RSADP(final RSAPrivateKey K, BigInteger c) // 1. If the representative c is not between 0 and n - 1, output // "representative out of range" and stop. final BigInteger n = K.getModulus(); if (c.compareTo(ZERO) < 0 || c.compareTo(n.subtract(ONE)) > 0) throw...
24,574
private static final BigInteger RSADP(final RSAPrivateKey K, BigInteger c) { // 1. If the representative c is not between 0 and n - 1, output // "representative out of range" and stop. final BigInteger n = K.getModulus(); if (c.compareTo(ZERO) < 0 || c.compareTo(n.subtract(ONE)) > 0) { thr...
private static final BigInteger RSADP(final RSAPrivateKey K, BigInteger c) { // 1. If the representative c is not between 0 and n - 1, output // "representative out of range" and stop. final BigInteger n = K.getModulus(); if (c.compareTo(ZERO) < 0 || c.compareTo(n.subtract(ONE)) > 0) { thr...
24,575
private static final BigInteger RSADP(final RSAPrivateKey K, BigInteger c) { // 1. If the representative c is not between 0 and n - 1, output // "representative out of range" and stop. final BigInteger n = K.getModulus(); if (c.compareTo(ZERO) < 0 || c.compareTo(n.subtract(ONE)) > 0) { thr...
private static final BigInteger RSADP(final RSAPrivateKey K, BigInteger c) { // 1. If the representative c is not between 0 and n - 1, output // "representative out of range" and stop. final BigInteger n = K.getModulus(); if (c.compareTo(ZERO) < 0 || c.compareTo(n.subtract(ONE)) > 0) { thr...
24,576
private static final BigInteger RSAEP(final RSAPublicKey K, final BigInteger m) { // 1. If the representative m is not between 0 and n - 1, output // "representative out of range" and stop. final BigInteger n = K.getModulus(); if (m.compareTo(ZERO) < 0 || m.compareTo(n.subtract(ONE)) > 0) { ...
private static final BigInteger RSAEP(final RSAPublicKey K, final BigInteger m) // 1. If the representative m is not between 0 and n - 1, output // "representative out of range" and stop. final BigInteger n = K.getModulus(); if (m.compareTo(ZERO) < 0 || m.compareTo(n.subtract(ONE)) > 0) ...
24,577
private static final BigInteger RSAEP(final RSAPublicKey K, final BigInteger m) { // 1. If the representative m is not between 0 and n - 1, output // "representative out of range" and stop. final BigInteger n = K.getModulus(); if (m.compareTo(ZERO) < 0 || m.compareTo(n.subtract(ONE)) > 0) { ...
private static final BigInteger RSAEP(final RSAPublicKey K, final BigInteger m) { // 1. If the representative m is not between 0 and n - 1, output // "representative out of range" and stop. final BigInteger n = K.getModulus(); if (m.compareTo(ZERO) < 0 || m.compareTo(n.subtract(ONE)) > 0) { ...
24,578
public float getAscent(GlyphView v) { Font font = v.getFont(); FontMetrics fm = v.getContainer().getFontMetrics(font); return fm.getAscent(); }
public float getAscent(GlyphView v) { Font font = v.getFont(); FontMetrics fm = v.getContainer().getFontMetrics(font); return fm.getAscent(); }
24,579
public int getBoundedPosition(GlyphView v, int p0, float x, float len) { TabExpander te = v.getTabExpander(); Segment txt = v.getText(p0, v.getEndOffset()); Font font = v.getFont(); FontMetrics fm = v.getContainer().getFontMetrics(font); int pos = Utilities.getTabbedTextOffset(txt, fm, (...
public int getBoundedPosition(GlyphView v, int p0, float x, float len) { TabExpander te = v.getTabExpander(); Segment txt = v.getText(p0, v.getEndOffset()); Font font = v.getFont(); FontMetrics fm = v.getContainer().getFontMetrics(font); int pos = Utilities.getTabbedTextOffset(txt, fm, (...
24,580
public int getBoundedPosition(GlyphView v, int p0, float x, float len) { TabExpander te = v.getTabExpander(); Segment txt = v.getText(p0, v.getEndOffset()); Font font = v.getFont(); FontMetrics fm = v.getContainer().getFontMetrics(font); int pos = Utilities.getTabbedTextOffset(txt, fm, (...
public int getBoundedPosition(GlyphView v, int p0, float x, float len) { TabExpander te = v.getTabExpander(); Segment txt = v.getText(p0, v.getEndOffset()); Font font = v.getFont(); FontMetrics fm = v.getContainer().getFontMetrics(font); int pos = Utilities.getTabbedTextOffset(txt, fm, (...
24,581
public float getDescent(GlyphView v) { Font font = v.getFont(); FontMetrics fm = v.getContainer().getFontMetrics(font); return fm.getDescent(); }
public float getDescent(GlyphView v) { Font font = v.getFont(); FontMetrics fm = v.getContainer().getFontMetrics(font); return fm.getDescent(); }
24,582
public float getHeight(GlyphView view) { Font font = view.getFont(); FontMetrics metrics = Toolkit.getDefaultToolkit().getFontMetrics(font); float height = metrics.getHeight(); return height; }
public float getHeight(GlyphView view) { Font font = view.getFont(); FontMetrics metrics = Toolkit.getDefaultToolkit().getFontMetrics(font); float height = metrics.getHeight(); return height; }
24,583
public float getSpan(GlyphView view, int p0, int p1, TabExpander te, float x) { Font font = view.getFont(); FontMetrics fm = Toolkit.getDefaultToolkit().getFontMetrics(font); Segment txt = view.getText(p0, p1); int span = Utilities.getTabbedTextWidth(txt, fm, (int) x, ...
public float getSpan(GlyphView view, int p0, int p1, TabExpander te, float x) { Font font = view.getFont(); FontMetrics fm = Toolkit.getDefaultToolkit().getFontMetrics(font); Segment txt = view.getText(p0, p1); int span = Utilities.getTabbedTextWidth(txt, fm, (int) x, ...
24,584