bugged stringlengths 6 599k | fixed stringlengths 6 40.8M | __index_level_0__ int64 0 3.24M |
|---|---|---|
protected void paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) { // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... // TODO: get color from UIManager... g.setColor(new Color(153, 153... | protected void paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) { // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... // TODO: get color from UIManager... if (slider.isEnabled()) g.setC... | 6,595 |
protected void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) { // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... // TODO: get color from UIManager... g.setColor(new Color(153, 153, ... | protected void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) { // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... // TODO: get color from UIManager... if (slider.isEnabled()) g.setCol... | 6,596 |
protected void paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) { // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... // TODO: get color from UIManager... g.setColor(new Color(153, 153... | protected void paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) { // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... // TODO: get color from UIManager... if (slider.isEnabled()) g.setC... | 6,597 |
protected void paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) { // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... // TODO: get color from UIManager... g.setColor(new Color(153, 153, ... | protected void paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) { // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... // TODO: get color from UIManager... if (slider.isEnabled()) g.setCol... | 6,598 |
public void paintTrack(Graphics g) { if (slider.getOrientation() == JSlider.HORIZONTAL) { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1, ... | int xPos = xPositionForValue(slider.getValue()); int x = (slider.getInverted() ? xPos : trackRect.x); int w = (slider.getInverted() ? trackX + trackW - xPos : xPos - trackRect.x); g.setColor(MetalLookAndFeel.getControlShadow()); g.fillRect(x + 1, trackY + 1, w - 3, getTrackWidth() - 3); if (slider.isEnabled()) { g.setC... | 6,599 |
public void paintTrack(Graphics g) { if (slider.getOrientation() == JSlider.HORIZONTAL) { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1, ... | public void paintTrack(Graphics g) { if (slider.getOrientation() == JSlider.HORIZONTAL) { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1, ... | 6,600 |
public void paintTrack(Graphics g) { if (slider.getOrientation() == JSlider.HORIZONTAL) { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1, ... | int yPos = yPositionForValue(slider.getValue()); int y = (slider.getInverted() ? trackY : yPos); int h = (slider.getInverted() ? yPos - trackY : trackY + trackH - yPos); g.setColor(MetalLookAndFeel.getControlShadow()); g.fillRect(trackX + 1, y + 1, getTrackWidth() - 3, h - 3); if (slider.isEnabled()) { g.setColor(Metal... | 6,601 |
public void paintTrack(Graphics g) { if (slider.getOrientation() == JSlider.HORIZONTAL) { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1, ... | public void paintTrack(Graphics g) { if (slider.getOrientation() == JSlider.HORIZONTAL) { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1, ... | 6,602 |
private final void emitObjects(NativeStream os, VmArchitecture arch, Object skipMe) throws BuildException { log.info("Emitting objects "); PrintWriter debugOut = null; try { if (debug) { debugOut = new PrintWriter(new FileWriter(debugFile)); } final ObjectEmitter emitter = new ObjectEmitter(clsMgr, os, deb... | private final void emitObjects(NativeStream os, VmArchitecture arch, Object skipMe) throws BuildException { log.info("Emitting objects "); PrintWriter debugOut = null; try { if (debug) { debugOut = new PrintWriter(new FileWriter(debugFile)); } final ObjectEmitter emitter = new ObjectEmitter(clsMgr, os, deb... | 6,604 |
private final void emitObjects(NativeStream os, VmArchitecture arch, Object skipMe) throws BuildException { log.info("Emitting objects "); PrintWriter debugOut = null; try { if (debug) { debugOut = new PrintWriter(new FileWriter(debugFile)); } final ObjectEmitter emitter = new ObjectEmitter(clsMgr, os, deb... | private final void emitObjects(NativeStream os, VmArchitecture arch, Object skipMe) throws BuildException { log.info("Emitting objects "); PrintWriter debugOut = null; try { if (debug) { debugOut = new PrintWriter(new FileWriter(debugFile)); } final ObjectEmitter emitter = new ObjectEmitter(clsMgr, os, deb... | 6,605 |
public final void execute() throws BuildException { final long lmJar = jarFile.lastModified(); final long lmKernel = kernelFile.lastModified(); final long lmDest = destFile.lastModified(); final long lmPIL = getPluginListFile().lastModified(); final PluginList piList; final long lmPI; try { piList = getPlugin... | public final void execute() throws BuildException { final long lmJar = jarFile.lastModified(); final long lmKernel = kernelFile.lastModified(); final long lmDest = destFile.lastModified(); final long lmPIL = getPluginListFile().lastModified(); final PluginList piList; final long lmPI; try { piList = getPlugin... | 6,606 |
protected void storeImage(NativeStream os) throws BuildException { try { log.info("Creating image"); FileOutputStream fos = new FileOutputStream(destFile); fos.write(os.getBytes(), 0, os.getLength()); fos.close(); } catch (IOException ex) { throw new BuildException(ex); } } | protected void storeImage(NativeStream os) throws BuildException { try { log.info("Creating image"); FileOutputStream fos = new FileOutputStream(destFile); fos.write(os.getBytes(), 0, os.getLength()); fos.close(); } catch (IOException ex) { throw new BuildException(ex); } } | 6,608 |
private IntItem(int kind, Register reg, int value, int local) { super(kind, reg, local); this.value = value; } | private IntItem(int kind, Register reg, int value, int local) { super(kind, reg, local); this.value = value; } | 6,610 |
protected WordItem cloneConstant() { return createConst(getValue()); } | protected WordItem cloneConstant() { return createConst(getValue()); } | 6,611 |
public static LifespanPolicyValue from_int(int code) { try { return enume [ code ]; } catch (ArrayIndexOutOfBoundsException ex) { throw new BAD_OPERATION("Invalid enumeration code " + code); } } | public static LifespanPolicyValue from_int(int code) { try { return enume [ code ]; } catch (ArrayIndexOutOfBoundsException ex) { BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code); bad.minor = Minor.PolicyType; throw bad; } } | 6,612 |
protected String basicXMLWriter ( Writer outputWriter, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ... | protected String basicXMLWriter ( Writer outputWriter, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ... | 6,613 |
public String getFormat() { return KeyPairCodecFactory.getEncodingShortName(defaultFormat); } | public String getFormat() { return FormatUtil.getEncodingShortName(defaultFormat); } | 6,614 |
public void setSelectedItem(Object object) { /* Updates the selected item only if the given object * is null or in the list (this is how the JDK behaves). */ if(object == null || list.contains(object)) { selectedItem = object; fireContentsChanged(this, -1, -1); } } | public void setSelectedItem(Object object) { /* Updates the selected item only if the given object * is null or in the list (this is how the JDK behaves). */ if(object == null || list.contains(object)) { selectedItem = object; fireContentsChanged(this, -1, -1); } } | 6,615 |
public final SelectionKey register(Selector selin, int ops, Object att) throws ClosedChannelException { if (! isOpen()) throw new ClosedChannelException(); if ((ops & ~validOps()) != 0) throw new IllegalArgumentException(); SelectionKey key = null; AbstractSelector selector = (AbstractSe... | public final SelectionKey register(Selector selin, int ops, Object att) throws ClosedChannelException { if (! isOpen()) throw new ClosedChannelException(); if ((ops & ~validOps()) != 0) throw new IllegalArgumentException(); SelectionKey key = null; AbstractSelector selector = (AbstractSe... | 6,616 |
public static void main(String[] args) throws InterruptedException { boolean useDoubleBuffer = (args.length > 0) && args[0].equals("buffer"); final Frame wnd = new Frame("AWTTest"); try { //wnd.setSize(GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().ge... | public static void main(String[] args) throws InterruptedException { boolean useDoubleBuffer = (args.length > 0) && args[0].equals("buffer"); final Frame wnd = new Frame("AWTTest"); try { //wnd.setSize(GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().ge... | 6,617 |
public HTTPURLConnection(URL url) throws IOException { super(url); requestHeaders = new Headers(); AccessController.doPrivileged(this.new GetHTTPPropertiesAction()); } | public HTTPURLConnection(URL url) throws IOException { super(url); requestHeaders = new Headers(); proxyHostname = SystemProperties.getProperty("http.proxyHost"); if (proxyHostname != null && proxyHostname.length() > 0) { String port = SystemProperties.getProperty("http.proxyPort"); if (port != null && p... | 6,618 |
public void addRequestProperty(String key, String value) { super.addRequestProperty(key, value); String old = requestHeaders.getValue(key); if (old == null) { requestHeaders.put(key, value); } else { requestHeaders.put(key, old + "," + value); } } | public void addRequestProperty(String key, String value) { super.addRequestProperty(key, value); String old = requestHeaders.getValue(key); if (old == null) { requestHeaders.put(key, value); } else { requestHeaders.put(key, old + "," + value); } } | 6,619 |
public String getHeaderField(int index) { if (!connected) { try { connect(); } catch (IOException e) { return null; } } if (index == 0) { return getStatusLine(response); } Iterator i = response.getHeaders().en... | public String getHeaderField(int index) { if (!connected) { try { connect(); } catch (IOException e) { return null; } } if (index == 0) { return getStatusLine(response); } Iterator i = response.getHeaders().en... | 6,620 |
public String getHeaderFieldKey(int index) { if (!connected) { try { connect(); } catch (IOException e) { return null; } } if (index == 0) { return null; } Iterator i = response.getHeaders().entrySet().iterato... | public String getHeaderFieldKey(int index) { if (!connected) { try { connect(); } catch (IOException e) { return null; } } if (index == 0) { return null; } Iterator i = response.getHeaders().entrySet().iterato... | 6,621 |
public Map getHeaderFields() { if (!connected) { try { connect(); } catch (IOException e) { return null; } } Headers headers = response.getHeaders(); LinkedHashMap ret = new LinkedHashMap(); ret.put(null, Collections.single... | public Map getHeaderFields() { if (!connected) { try { connect(); } catch (IOException e) { return null; } } Headers headers = response.getHeaders(); LinkedHashMap ret = new LinkedHashMap(); ret.put(null, Collections.single... | 6,622 |
public Map getRequestProperties() { if (connected) throw new IllegalStateException("Already connected"); return requestHeaders; } | public Map getRequestProperties() { if (connected) throw new IllegalStateException("Already connected"); Map m = requestHeaders.getAsMap(); return Collections.unmodifiableMap(m); } | 6,623 |
public String getRequestProperty(String key) { if (key == null) return null; return requestHeaders.getValue(key); } | public String getRequestProperty(String key) { if (key == null) return null; return requestHeaders.getValue(key); } | 6,624 |
public Object clone() throws CloneNotSupportedException { BasePRNG result = (BasePRNG) super.clone(); if (this.buffer != null) result.buffer = (byte[])this.buffer.clone(); return result; } | public Object clone() throws CloneNotSupportedException { BasePRNG result = (BasePRNG) super.clone(); if (this.buffer != null) result.buffer = (byte[]) this.buffer.clone(); return result; } | 6,625 |
public void insertIcon(Icon icon) { SimpleAttributeSet atts = new SimpleAttributeSet(); atts.addAttribute(StyleConstants.IconAttribute, icon); atts.addAttribute(StyleConstants.NameAttribute, StyleConstants.IconElementName); try { getDocument().insertString(getCaret().getD... | public void insertIcon(Icon icon) { SimpleAttributeSet atts = new SimpleAttributeSet(); atts.addAttribute(StyleConstants.IconAttribute, icon); atts.addAttribute(StyleConstants.NameAttribute, StyleConstants.IconElementName); try { getDocument().insertString(getCaret().getD... | 6,626 |
public static void load(String filename) { Runtime.getRuntime().load(filename); } | public static void load(String filename) { Runtime.getRuntime().load(filename, VMStackWalker.getCallingClassLoader()); } | 6,627 |
public static void loadLibrary(String libname) { Runtime.getRuntime().loadLibrary(libname); } | public static void loadLibrary(String libname) { Runtime.getRuntime().loadLibrary(libname, VMStackWalker.getCallingClassLoader()); } | 6,628 |
public Position createPosition(final int offset) throws BadLocationException { return new Position() { int off = offset; public int getOffset() { return off; } }; } | public Position createPosition(final int offset) throws BadLocationException { return new Position() { int off = offset; public int getOffset() { return off; } }; } | 6,629 |
public Position createPosition(final int offset) throws BadLocationException { return new Position() { int off = offset; public int getOffset() { return off; } }; } | public Position createPosition(final int offset) throws BadLocationException { return new Position() { int off = offset; public int getOffset() { return off; } }; } | 6,630 |
public void getChars(int where, int len, Segment txt) throws BadLocationException { // check arguments int length = length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); if (... | public void getChars(int where, int len, Segment txt) throws BadLocationException { // check arguments int length = length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); if (... | 6,631 |
public UndoableEdit remove(int where, int nitems) throws BadLocationException { // check arguments int length = length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); if ((whe... | public UndoableEdit remove(int where, int nitems) throws BadLocationException { // check arguments int length = length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); if ((whe... | 6,632 |
public UndoableEdit remove(int where, int nitems) throws BadLocationException { // check arguments int length = length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); if ((whe... | public UndoableEdit remove(int where, int nitems) throws BadLocationException { // check arguments int length = length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); if ((whe... | 6,633 |
protected void replace(int position, int rmSize, Object addItems, int addSize) { // Remove content shiftGap(position); gapEnd += rmSize; // If gap is too small, enlarge the gap. if ((gapEnd - gapStart) < addSize) shiftEnd(addSize); // Add new items to the buffer. Sys... | protected void replace(int position, int rmSize, Object addItems, int addSize) { // Remove content shiftGap(position); gapEnd += rmSize; // If gap is too small, enlarge the gap. if ((gapEnd - gapStart) < addSize) shiftEnd(addSize); // Add new items to the buffer. Sys... | 6,634 |
protected void shiftEnd(int newSize) { char[] newBuf = (char[]) allocateArray(length() + newSize); System.arraycopy(buffer, 0, newBuf, 0, gapStart); System.arraycopy(buffer, gapEnd, newBuf, gapStart + newSize, buffer.length - gapEnd); gapEnd = gapStart + newSize; buffer = newBuf; ... | protected void shiftEnd(int newSize) { char[] newBuf = (char[]) allocateArray(length() + newSize); System.arraycopy(buffer, 0, newBuf, 0, gapStart); System.arraycopy(buffer, gapEnd, newBuf, gapStart + newSize, buffer.length - gapEnd); gapEnd = gapStart + newSize; buffer = newBuf; ... | 6,635 |
protected void shiftGap(int newGapStart) { int newGapEnd = newGapStart + (gapEnd - gapStart); if (newGapStart == gapStart) return; else if (newGapStart < gapStart) { System.arraycopy(buffer, newGapStart, buffer, newGapEnd, gapStart - newGapStart); gapStart = n... | protected void shiftGap(int newGapStart) { int newGapEnd = newGapStart + (gapEnd - gapStart); if (newGapStart == gapStart) return; else if (newGapStart < gapStart) { System.arraycopy(buffer, newGapStart, buffer, newGapEnd, gapStart - newGapStart); gapStart = n... | 6,637 |
protected void shiftGap(int newGapStart) { int newGapEnd = newGapStart + (gapEnd - gapStart); if (newGapStart == gapStart) return; else if (newGapStart < gapStart) { System.arraycopy(buffer, newGapStart, buffer, newGapEnd, gapStart - newGapStart); gapStart = n... | protected void shiftGap(int newGapStart) { int newGapEnd = newGapStart + (gapEnd - gapStart); if (newGapStart == gapStart) return; else if (newGapStart < gapStart) { System.arraycopy(buffer, newGapStart, buffer, newGapEnd, gapStart - newGapStart); gapStart = n... | 6,638 |
public static EditorKit createEditorKitForContentType(String type) { // TODO: Have to handle the case where a ClassLoader was specified // when the EditorKit was registered EditorKit e = null; String className = (String)registerMap.get(type); if (className != null) { try { ... | public static EditorKit createEditorKitForContentType(String type) { // TODO: Have to handle the case where a ClassLoader was specified // when the EditorKit was registered EditorKit e = null; String className = (String) registerMap.get(type); if (className != null) { try { ... | 6,640 |
public long getMicrosecondLength() { long tickLength = getTickLength(); if (divisionType == PPQ) { // FIXME // How can this possible be computed? PPQ is pulses per quarter-note, // which is dependent on the tempo of the Sequencer. throw new UnsupportedOperationException("Can't compu... | public long getMicrosecondLength() { long tickLength = getTickLength(); if (divisionType == PPQ) { // FIXME // How can this possible be computed? PPQ is pulses per quarter-note, // which is dependent on the tempo of the Sequencer. throw new UnsupportedOperationException("Can't compu... | 6,641 |
public boolean addValueList (ValueListInterface valueListObj) { List values = valueListObj.getValues(); // do we have any new values? if (values.size() > 0) { addValueListObj(valueListObj); // append in new values to Parameter obj Iterator iter = values.iterator(); ... | public boolean addValueList (ValueList valueListObj) { List values = valueListObj.getValues(); // do we have any new values? if (values.size() > 0) { addValueListObj(valueListObj); // append in new values to Parameter obj Iterator iter = values.iterator(); while (it... | 6,642 |
protected boolean addValueListObj (ValueListInterface valueListObj) { if (valueListObj == null) return false; valueListObjects.add(valueListObj); hasValueListCompactDescription = true; return true; } | protected boolean addValueListObj (ValueList valueListObj) { if (valueListObj == null) return false; valueListObjects.add(valueListObj); hasValueListCompactDescription = true; return true; } | 6,643 |
public Object clone() throws CloneNotSupportedException { BaseObjectWithValueList cloneObj = (BaseObjectWithValueList) super.clone(); cloneObj.valueListObjects = Collections.synchronizedList(new ArrayList()); int stop = this.valueListObjects.size(); for (int i = 0; i < stop; i++) { clone... | public Object clone() throws CloneNotSupportedException { BaseObjectWithValueList cloneObj = (BaseObjectWithValueList) super.clone(); cloneObj.valueListObjects = Collections.synchronizedList(new ArrayList()); int stop = this.valueListObjects.size(); for (int i = 0; i < stop; i++) { clone... | 6,644 |
public JRadioButton(String text) { this(text, null, false); } | public JRadioButton() { this(text, null, false); } | 6,645 |
public JRadioButton(String text) { this(text, null, false); } | public JRadioButton(String text) { this(null, null, false); } | 6,646 |
public static ComponentUI createUI(JComponent component) { if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalTreeUI instance; if (o == null) { instance = new MetalTreeUI(); instances.put(component, instance); } else instance = (MetalTr... | public static ComponentUI createUI(JComponent component) { if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalTreeUI instance; if (o == null) { instance = new MetalTreeUI(); instances.put(component, instance); } else instance = (MetalTr... | 6,647 |
public CertificateException(String msg) { super(msg); } | public CertificateException() { super(msg); } | 6,648 |
public CertificateException(String msg) { super(msg); } | public CertificateException(String msg) { } | 6,649 |
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JComboBox.ENABLED_CHANGED_PROPERTY)) { arrowButton.setEnabled(comboBox.isEnabled()); if (comboBox.isEditable()) comboBox.getEditor().getEditorComponent().setEnabled(comboBox ... | public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("enabled")) { arrowButton.setEnabled(comboBox.isEnabled()); if (comboBox.isEditable()) comboBox.getEditor().getEditorComponent().setEnabled(comboBox .isE... | 6,650 |
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JComboBox.ENABLED_CHANGED_PROPERTY)) { arrowButton.setEnabled(comboBox.isEnabled()); if (comboBox.isEditable()) comboBox.getEditor().getEditorComponent().setEnabled(comboBox ... | public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JComboBox.ENABLED_CHANGED_PROPERTY)) { arrowButton.setEnabled(comboBox.isEnabled()); if (comboBox.isEditable()) comboBox.getEditor().getEditorComponent().setEnabled(comboBox ... | 6,651 |
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JComboBox.ENABLED_CHANGED_PROPERTY)) { arrowButton.setEnabled(comboBox.isEnabled()); if (comboBox.isEditable()) comboBox.getEditor().getEditorComponent().setEnabled(comboBox ... | public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JComboBox.ENABLED_CHANGED_PROPERTY)) { arrowButton.setEnabled(comboBox.isEnabled()); if (comboBox.isEditable()) comboBox.getEditor().getEditorComponent().setEnabled(comboBox ... | 6,652 |
public void mouseClicked(MouseEvent e) { MenuElement[] me = menuBar.getSubElements(); for (int i = 0; i < me.length; i++) menuBar.getMenu(i).setSelected(false); } | public void mouseClicked(MouseEvent e) { MenuElement[] me = menuBar.getSubElements(); for (int i = 0; i < me.length; i++) { JMenu menu = menuBar.getMenu(i); if (menu != null) menu.setSelected(false); } } | 6,654 |
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("borderPainted")) menuBar.repaint(); if (e.getPropertyName().equals("margin")) menuBar.repaint(); } | public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("borderPainted")) menuBar.repaint(); if (e.getPropertyName().equals("margin")) menuBar.repaint(); } | 6,655 |
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("borderPainted")) menuBar.repaint(); if (e.getPropertyName().equals("margin")) menuBar.repaint(); } | public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("borderPainted")) menuBar.repaint(); if (e.getPropertyName().equals("margin")) menuBar.repaint(); } | 6,656 |
public void mousePressed(MouseEvent e) { if (!SwingUtilities.isRightMouseButton(e) && !isSomethingBounded) start(canvas.translateStart(e.getPoint()));// System.out.println("mouse pressed rb"); } | public void mousePressed(MouseEvent e) { if (!SwingUtilities.isRightMouseButton(e) && !isSomethingBounded) start(canvas.translateStart(e.getPoint()));// System.out.println("mouse pressed rb"); } | 6,657 |
public void mousePressed(MouseEvent e) { if (!SwingUtilities.isRightMouseButton(e) && !isSomethingBounded) start(canvas.translateStart(e.getPoint()));// System.out.println("mouse pressed rb"); } | public void mousePressed(MouseEvent e) { if (!SwingUtilities.isRightMouseButton(e) && !isSomethingBounded) start(canvas.translateStart(e.getPoint()));// System.out.println("mouse pressed rb"); } | 6,658 |
public void mouseReleased(MouseEvent e) { erase(); } | public void mouseReleased(MouseEvent e) { erase(); } | 6,659 |
public void mouseDragged(MouseEvent e) { if(!SwingUtilities.isRightMouseButton(e) && getCanvas().canDrawRubberBand(RubberBand.this)) { erase(); stop(canvas.translateEnd(e.getPoint())); draw(); notifyRubberBandCanvas(); } } | public void mouseDragged(MouseEvent e) { if(!SwingUtilities.isRightMouseButton(e) && getCanvas().canDrawRubberBand(RubberBand.this)) { erase(); stop(canvas.translateEnd(e.getPoint())); draw(); notifyRubberBandCanvas(); } } | 6,660 |
public void mouseDragged(MouseEvent e) { if(!SwingUtilities.isRightMouseButton(e) && getCanvas().canDrawRubberBand(RubberBand.this)) { erase(); stop(canvas.translateEnd(e.getPoint())); draw(); notifyRubberBandCanvas(); } } | public void mouseDragged(MouseEvent e) { if(!SwingUtilities.isRightMouseButton(e) && getCanvas().canDrawRubberBand(RubberBand.this)) { erase(); stop(canvas.translateEnd(e.getPoint())); draw(); notifyRubberBandCanvas(); } } | 6,661 |
public void setBorderPainted(boolean painted) { if (painted != paintBorder) { paintBorder = painted; firePropertyChange(BORDER_PAINTED_CHANGED_PROPERTY, ! paintBorder, paintBorder); repaint(); } } // setBorderPainted() | public void setBorderPainted(boolean painted) { if (painted != paintBorder) { paintBorder = painted; firePropertyChange(BORDER_PAINTED_CHANGED_PROPERTY, ! paintBorder, paintBorder); repaint(); } } // setBorderPainted() | 6,662 |
public void setFloatable(boolean floatable) { if (floatable != this.floatable) { this.floatable = floatable; firePropertyChange(FLOATABLE_CHANGED_PROPERTY, ! floatable, floatable); } } // setFloatable() | public void setFloatable(boolean floatable) { if (floatable != this.floatable) { this.floatable = floatable; firePropertyChange("floatable", ! floatable, floatable); } } // setFloatable() | 6,663 |
public void setMargin(Insets margin) { if ((this.margin != null && margin == null) || (this.margin == null && margin != null) || (margin != null && this.margin != null && (margin.left != this.margin.left || margin.right != this.margin.right || margin.top != this.margin.top || ma... | public void setMargin(Insets margin) { if ((this.margin != null && margin == null) || (this.margin == null && margin != null) || (margin != null && this.margin != null && (margin.left != this.margin.left || margin.right != this.margin.right || margin.top != this.margin.top || ma... | 6,664 |
public void setOrientation(int orientation) { if (orientation != HORIZONTAL && orientation != VERTICAL) throw new IllegalArgumentException(orientation + " is not a legal orientation"); if (orientation != this.orientation) { int oldOrientation = this.orientation;... | public void setOrientation(int orientation) { if (orientation != HORIZONTAL && orientation != VERTICAL) throw new IllegalArgumentException(orientation + " is not a legal orientation"); if (orientation != this.orientation) { int oldOrientation = this.orientation;... | 6,665 |
public void setRollover(boolean b) { if (b != rollover) { rollover = b; firePropertyChange(ROLLOVER_CHANGED_PROPERTY, ! rollover, rollover); revalidate(); repaint(); } } | public void setRollover(boolean b) { if (b != rollover) { rollover = b; firePropertyChange(ROLLOVER_CHANGED_PROPERTY, ! rollover, rollover); revalidate(); repaint(); } } | 6,666 |
void dump() { // Climb up the hierarchy to the parent. View parent = getParent(); if (parent != null) parent.dump(); else dump(0); } | protected void dump() { // Climb up the hierarchy to the parent. View parent = getParent(); if (parent != null) parent.dump(); else dump(0); } | 6,667 |
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); // FIXME: What about... | protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); // FIXME: What about... | 6,668 |
protected static boolean isFree(byte data, int index) { //byte bitIndex = (byte) (index % 8); byte mask = (byte) (1 << index); return ((data & mask) == 0)? true : false; } | protected static boolean isFree(byte data, int index) { //byte bitIndex = (byte) (index % 8); byte mask = (byte) (1 << index); return ((data & mask) == 0)? true : false; } | 6,669 |
protected static boolean isFree(byte data, int index) { //byte bitIndex = (byte) (index % 8); byte mask = (byte) (1 << index); return ((data & mask) == 0)? true : false; } | protected static boolean isFree(byte data, int index) { //byte bitIndex = (byte) (index % 8); byte mask = (byte) (1 << index); return ((data & mask) == 0)? true : false; } | 6,670 |
private void paintSimple(Graphics g, JViewport v, Component view, Point pos, Rectangle viewBounds, Rectangle portBounds) { Rectangle oldClip = g.getClipBounds (); g.setClip (ol... | private void paintSimple(Graphics g, JViewport v, Component view, Point pos, Rectangle viewBounds, Rectangle portBounds) { Rectangle oldClip = g.getClipBounds (); g.setClip (ol... | 6,671 |
protected void paintBackground(Graphics g) { // This method does nothing. All the background filling is done by the // ComponentUI update method. However, the method is called by paint // to provide a way for subclasses to draw something different (e.g. background // images etc) on the background. } | protected void paintBackground(Graphics g) { // This method does nothing. All the background filling is done by the // ComponentUI update method. However, the method is called by paint // to provide a way for subclasses to draw something different (e.g. background // images etc) on the background. } | 6,676 |
protected void createDefaultEditors() { //FIXME: Create the editor object. } | JCheckBox box = new BooleanCellRenderer().getCheckBox(); setDefaultEditor(Boolean.class, new DefaultCellEditor(box)); JCheckBox box = new BooleanCellRenderer().getCheckBox(); setDefaultEditor(Boolean.class, new DefaultCellEditor(box)); protectedJCheckBox box = new BooleanCellRenderer().getCheckBox(); setDefaultEditor(B... | 6,678 |
public boolean editCellAt (int row, int column) { oldCellValue = getValueAt(row, column); setCellEditor(getCellEditor(row, column)); editorComp = prepareEditor(cellEditor, row, column); cellEditor.addCellEditorListener(this); rowBeingEdited = row; columnBeingEdited = column; setValueAt(editorCom... | public boolean editCellAt (int row, int column) { if (isEditing()) editingStopped(new ChangeEvent("editingStopped")); editingRow = row; editingColumn = column; setCellEditor(getCellEditor(row, column)); editorComp = prepareEditor(cellEditor, row, column); cellEditor.addCellEditorListener(this); row... | 6,680 |
public boolean editCellAt (int row, int column) { oldCellValue = getValueAt(row, column); setCellEditor(getCellEditor(row, column)); editorComp = prepareEditor(cellEditor, row, column); cellEditor.addCellEditorListener(this); rowBeingEdited = row; columnBeingEdited = column; setValueAt(editorCom... | public boolean editCellAt (int row, int column) { oldCellValue = getValueAt(row, column); setCellEditor(getCellEditor(row, column)); editorComp = prepareEditor(cellEditor, row, column); cellEditor.addCellEditorListener(this); rowBeingEdited = row; columnBeingEdited = column; setValueAt(editorCom... | 6,681 |
public void editingCanceled (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove ((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(oldCellValue, r... | public void editingCanceled (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove ((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(oldCellValue, r... | 6,682 |
public void editingCanceled (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove ((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(oldCellValue, r... | public void editingCanceled (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove ((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(oldCellValue, r... | 6,683 |
public void editingCanceled (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove ((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(oldCellValue, r... | public void editingCanceled (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove ((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(oldCellValue, r... | 6,684 |
public void editingStopped (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(((JTextField)edit... | public void editingStopped (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(((JTextField)edit... | 6,685 |
public void editingStopped (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(((JTextField)edit... | public void editingStopped (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(((JTextField)edit... | 6,686 |
public void editingStopped (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(((JTextField)edit... | public void editingStopped (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(((JTextField)edit... | 6,687 |
public TableCellEditor getDefaultEditor(Class columnClass) { if (defaultEditorsByColumnClass.containsKey(columnClass)) return (TableCellEditor) defaultEditorsByColumnClass.get(columnClass); else { // FIXME: We have at least an editor for Object.class in our defaults. TableCellEditor r = new De... | public TableCellEditor getDefaultEditor(Class columnClass) { if (defaultEditorsByColumnClass.containsKey(columnClass)) return (TableCellEditor) defaultEditorsByColumnClass.get(columnClass); else { // FIXME: We have at least an editor for Object.class in our defaults. JTextField t = new TableTex... | 6,688 |
public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int height = getRowHeight(); int y = point.y; for (int i = 0; i < nrows; ++i) { if (0 <= y && y < height) return i; y -= height; } } re... | public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int height = getRowHeight() + getRowMargin(); int y = point.y; for (int i = 0; i < nrows; ++i) { if (0 <= y && y < height) return i; y -= height; ... | 6,689 |
public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int height = getRowHeight(); int y = point.y; for (int i = 0; i < nrows; ++i) { if (0 <= y && y < height) return i; y -= height; } } re... | public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int height = getRowHeight(); int y = point.y; for (int i = 0; i < nrows; ++i) { if (0 <= y && y < height) return i; y -= height; } } re... | 6,690 |
public void setValueAt(Object value, int row, int column) { if (!isCellEditable(row, column)) return; if (value instanceof Component) add((Component)value); dataModel.setValueAt(value, row, convertColumnIndexToModel(column)); } | public void setValueAt(Object value, int row, int column) { if (!isCellEditable(row, column)) return; if (value instanceof Component) add((Component)value); dataModel.setValueAt(value, row, convertColumnIndexToModel(column)); } | 6,692 |
public int getHeight(ImageObserver observer) { return -1; } | public int getHeight(ImageObserver observer) { return 1; } | 6,694 |
public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im... | public ImageProducer getSource() { return new ImageProducer() { Set<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(ImageC... | 6,695 |
public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im... | public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); synchronized public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean ... | 6,696 |
public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im... | public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } synchronized public boolean ... | 6,697 |
public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im... | public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im... | 6,698 |
public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im... | public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im... | 6,699 |
public void addConsumer(ImageConsumer ic) { consumers.add(ic); } | synchronized public void addConsumer(ImageConsumer ic) { consumers.add(ic); } | 6,700 |
public boolean isConsumer(ImageConsumer ic) { return consumers.contains(ic); } | synchronized public boolean isConsumer(ImageConsumer ic) { return consumers.contains(ic); } | 6,701 |
public void removeConsumer(ImageConsumer ic) { consumers.remove(ic); } | synchronized public void removeConsumer(ImageConsumer ic) { consumers.remove(ic); } | 6,702 |
public void startProduction(ImageConsumer ic) { consumers.add(ic); for (ImageConsumer c : consumers) { c.imageComplete(ImageConsumer.IMAGEERROR); } } | synchronized public void startProduction(ImageConsumer ic) { consumers.add(ic); for (ImageConsumer c : consumers) { c.imageComplete(ImageConsumer.IMAGEERROR); } } | 6,703 |
public int getWidth(ImageObserver observer) { return -1; } | public int getWidth(ImageObserver observer) { return 1; } | 6,704 |
public Font createFont(int format, InputStream stream) { // TODO Auto-generated method stub return null; } | public Font createFont(int format, InputStream stream) { // TODO Auto-generated method stub return null; } | 6,705 |
public Image getScaledInstance(int width, int height, int flags) { switch (flags) { case SCALE_DEFAULT: case SCALE_FAST: case SCALE_REPLICATE: ImageProducer producer = new FilteredImageSource(this.getSource(), new ReplicateScaleFilter(width, heigh... | public Image getScaledInstance(int width, int height, int flags) { switch (flags) { case SCALE_DEFAULT: case SCALE_FAST: case SCALE_REPLICATE: ImageProducer producer = new FilteredImageSource(this.getSource(), new ReplicateScaleFilter(width, heigh... | 6,706 |
public Image getScaledInstance(int width, int height, int flags) { switch (flags) { case SCALE_DEFAULT: case SCALE_FAST: case SCALE_REPLICATE: ImageProducer producer = new FilteredImageSource(this.getSource(), new ReplicateScaleFilter(width, heigh... | public Image getScaledInstance(int width, int height, int flags) { switch (flags) { case SCALE_DEFAULT: case SCALE_FAST: case SCALE_REPLICATE: ImageProducer producer = new FilteredImageSource(this.getSource(), new ReplicateScaleFilter(width, heigh... | 6,707 |
public Image getScaledInstance(int width, int height, int flags) { switch (flags) { case SCALE_DEFAULT: case SCALE_FAST: case SCALE_REPLICATE: ImageProducer producer = new FilteredImageSource(this.getSource(), new ReplicateScaleFilter(width, heigh... | public Image getScaledInstance(int width, int height, int flags) { switch (flags) { case SCALE_DEFAULT: case SCALE_FAST: case SCALE_REPLICATE: ImageProducer producer = new FilteredImageSource(this.getSource(), new ReplicateScaleFilter(width, heigh... | 6,708 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.