bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public MenuItem add(MenuItem item) { items.addElement(item); if (item.parent != null) { item.parent.remove(item); } item.parent = this; if (peer != null) { MenuPeer mp = (MenuPeer) peer; mp.addItem(item); } return item; }
public MenuItem add(MenuItem item) { items.addElement(item); if (item.parent != null) { item.parent.remove(item); } item.parent = this; if (peer != null) { MenuPeer mp = (MenuPeer) peer; mp.addItem(item); } return item; }
32,548
public MenuItem add(MenuItem item) { items.addElement(item); if (item.parent != null) { item.parent.remove(item); } item.parent = this; if (peer != null) { MenuPeer mp = (MenuPeer) peer; mp.addItem(item); } return item; }
public MenuItem add(MenuItem item) { items.addElement(item); if (item.parent != null) { item.parent.remove(item); } item.parent = this; if (peer != null) { MenuPeer mp = (MenuPeer) peer; mp.addItem(item); } return item; }
32,549
public MenuItem add(MenuItem item) { items.addElement(item); if (item.parent != null) { item.parent.remove(item); } item.parent = this; if (peer != null) { MenuPeer mp = (MenuPeer) peer; mp.addItem(item); } return item; }
public MenuItem add(MenuItem item) { items.addElement(item); if (item.parent != null) { item.parent.remove(item); } item.parent = this; if (peer != null) { MenuPeer mp = (MenuPeer) peer; mp.addItem(item); } return item; }
32,550
public void addSeparator() { add(separator); }
public void addSeparator() { add(separator); }
32,551
public synchronized void setText(String text) { this.text = text; if (peer != null) { LabelPeer lp = (LabelPeer) peer; lp.setText(text); } }
public synchronized void setText(String text) { this.text = text; if (peer != null) { LabelPeer lp = (LabelPeer) peer; lp.setText(text); } }
32,553
public synchronized void setText(String text) { this.text = text; if (peer != null) { LabelPeer lp = (LabelPeer) peer; lp.setText(text); } }
public synchronized void setText(String text) { this.text = text; if (peer != null) { LabelPeer lp = (LabelPeer) peer; lp.setText(text); } }
32,554
public synchronized void setText(String text) { this.text = text; if (peer != null) { LabelPeer lp = (LabelPeer) peer; lp.setText(text); } }
public synchronized void setText(String text) { this.text = text; if (peer != null) { LabelPeer lp = (LabelPeer) peer; lp.setText(text); } }
32,555
private Plugin createPlugin() throws PluginException { if (className == null) { return new EmptyPlugin(this); } else { try { final Class cls = Thread.currentThread().getContextClassLoader().loadClass(className); final Constructor cons = cls.getConstructor(new Class[] { PluginDescriptor.class }); return ...
private Plugin createPlugin() throws PluginException { if (className == null) { return new EmptyPlugin(this); } else { try { final Class cls = Thread.currentThread().getContextClassLoader().loadClass(className); final Constructor cons = cls.getConstructor(new Class[] { PluginDescriptor.class }); return ...
32,557
protected final String getAttribute(XMLElement e, String name, boolean required) throws PluginException { final String v = e.getStringAttribute(name); if (required) { if (v == null) { throw new PluginException("Required attribute " + name + " in element " + e.getName() + " not found"); } } return v; }
protected final String getAttribute(XMLElement e, String name, boolean required) throws PluginException { final String v = e.getStringAttribute(name); if (required) { if (v == null) { throw new PluginException("Required attribute " + name + " in element " + e.getName() + " not found"); } } return v; }
32,558
protected final String getAttribute(XMLElement e, String name, boolean required) throws PluginException { final String v = e.getStringAttribute(name); if (required) { if (v == null) { throw new PluginException("Required attribute " + name + " in element " + e.getName() + " not found"); } } return v; }
protected final String getAttribute(XMLElement e, String name, boolean required) throws PluginException { final String v = e.getStringAttribute(name); if (required) { if (v == null) { throw new PluginException("Required attribute " + name + " in element " + e.getName() + " not found"); } } return v; }
32,559
protected abstract void resolve() throws PluginException;
protected abstract void resolve() throws PluginException;
32,560
public static IKeyPairGenerator getInstance(String name) { if (name == null) { return null; } name = name.trim(); IKeyPairGenerator result = null; if (name.equalsIgnoreCase(Registry.DSA_KPG) || name.equals(Registry.DSS_KPG)) { result = new DSSKeyPairGenerator(); }...
public static IKeyPairGenerator getInstance(String name) { if (name == null) { return null; } name = name.trim(); IKeyPairGenerator result = null; if (name.equalsIgnoreCase(Registry.DSA_KPG) || name.equalsIgnoreCase(Registry.DSS_KPG)) { result = new DSSKeyPairGenerator...
32,561
private static IKeyPairGenerator makeInstance (String clazz) { try { Class c = Class.forName (clazz); Constructor ctor = c.getConstructor (new Class[0]); return (IKeyPairGenerator) ctor.newInstance (new Object[0]); } catch (Exception x) { IllegalArgumentException iae ...
private static IKeyPairGenerator makeInstance (String clazz) { try { Class c = Class.forName (clazz); Constructor ctor = c.getConstructor (new Class[0]); return (IKeyPairGenerator) ctor.newInstance (new Object[0]); } catch (Exception x) { IllegalArgumentException iae ...
32,563
public JToggleButton() { this(null, null); }
public JToggleButton() { this(null, null, false); }
32,565
public AccessibleContext getAccessibleContext() { return null; }
public AccessibleContext getAccessibleContext() { /* Create the context if this is the first request */ if (accessibleContext == null) { /* Create the context */ accessibleContext = new AccessibleJToggleButton(); } return accessibleContext; }
32,566
public void updateUI() { ButtonUI b = (ButtonUI)UIManager.getUI(this); setUI(b); }
public void updateUI() { ButtonUI b = (ButtonUI)UIManager.getUI(this); setUI(b); }
32,567
public static ComponentUI createUI(final JComponent c) { return new BasicCheckBoxUI(); }
public static ComponentUI createUI(JComponent c) { return new BasicCheckBoxUI(); }
32,568
public JWindowPopup(Component owner, Component contents, int x, int y) { /* Checks whether contents is null. */ super(owner, contents, x, y); window = new JWindow(); window.getRootPane().add(contents); window.setLocation(x, y); window.pack(); }
public JWindowPopup(Component owner, Component contents, int x, int y) { /* Checks whether contents is null. */ super(owner, contents, x, y); window = new JWindow(); window.getContentPane().add(contents); window.setLocation(x, y); window.pack(); }
32,569
public JWindowPopup(Component owner, Component contents, int x, int y) { /* Checks whether contents is null. */ super(owner, contents, x, y); window = new JWindow(); window.getRootPane().add(contents); window.setLocation(x, y); window.pack(); }
public JWindowPopup(Component owner, Component contents, int x, int y) { /* Checks whether contents is null. */ super(owner, contents, x, y); window = new JWindow(); window.getRootPane().add(contents); window.setLocation(x, y); window.setFocusableWindowState(f...
32,570
public void startPlugin(PluginDescriptor d) throws PluginException { if (canStart(d)) { BootLog.debug("Starting " + d.getId()); d.getPlugin().start(); } else { BootLog.warn("Skipping start of " + d.getId() + " due to to depencies."); } }
public void startPlugin(PluginDescriptor d) throws PluginException { if (canStart(d)) { BootLog.debug("Starting " + d.getId()); d.getPlugin().start(); } else { BootLog.warn("Skipping start of " + d.getId() + " due to to depencies."); } }
32,572
public void startPlugins() throws PluginException { final List descrList = createPluginDescriptorList(); final ArrayList errors = new ArrayList(descrList.size()); for (Iterator i = descrList.iterator(); i.hasNext();) { final PluginDescriptor descr = (PluginDescriptor) i.next(); try { //===== Removed to call ...
public void startPlugins() throws PluginException { final List descrList = createPluginDescriptorList(); final ArrayList errors = new ArrayList(descrList.size()); for (Iterator i = descrList.iterator(); i.hasNext();) { final PluginDescriptor descr = (PluginDescriptor) i.next(); try { //===== Removed to call ...
32,573
public void startPlugins() throws PluginException { final List descrList = createPluginDescriptorList(); final ArrayList errors = new ArrayList(descrList.size()); for (Iterator i = descrList.iterator(); i.hasNext();) { final PluginDescriptor descr = (PluginDescriptor) i.next(); try { //===== Removed to call ...
public void startPlugins() throws PluginException { final List descrList = createPluginDescriptorList(); final ArrayList errors = new ArrayList(descrList.size()); for (Iterator i = descrList.iterator(); i.hasNext();) { final PluginDescriptor descr = (PluginDescriptor) i.next(); try { //===== Removed to call ...
32,574
public final void start() throws PluginException { if (!started) { startPlugin(); started = true; } }
public final void start() throws PluginException { if (!started) { startPlugin(); started = true; } }
32,575
public int currentSegment(double[] coords) { throw new Error("not implemented"); }
public int currentSegment(double[] coords) { if (done) throw new NoSuchElementException(); switch (srcSegType) { case PathIterator.SEG_CLOSE: return srcSegType; case PathIterator.SEG_MOVETO: case PathIterator.SEG_LINETO: coords[0] = srcPosX; coords[1] = srcPosY; return srcSegType; case PathIterator.SEG_QUADTO:...
32,578
public double getFlatness() { return flatness; }
public double getFlatness() { return Math.sqrt(flatnessSq); }
32,580
public int getRecursionLimit() { return limit; }
public int getRecursionLimit() { return recursionLimit; }
32,581
public int getWindingRule() { return subIterator.getWindingRule(); }
public int getWindingRule() { return srcIter.getWindingRule(); }
32,582
public boolean isDone() { return subIterator.isDone(); }
public boolean isDone() { return done; }
32,583
public void next() { throw new Error("not implemented"); }
public void next() { if (stackSize > 0) { --stackSize; if (stackSize > 0) { switch (srcSegType) { case PathIterator.SEG_QUADTO: subdivideQuadratic(); return; case PathIterator.SEG_CUBICTO: subdivideCubic(); return; default: throw new IllegalStateException(); } } } srcIter.next(); fetchSegment(); }
32,584
public boolean hasNext() { if (knownMod != modCount) throw new ConcurrentModificationException(); return count > 0; }
public boolean hasNext() { if (knownMod != modCount) throw new ConcurrentModificationException(); return count > 0; }
32,586
public void putAll(Map<? extends K, ? extends V> m) { Map<K,V> addMap; addMap = (Map<K,V>) m; for (Map.Entry<K,V> e : addMap.entrySet()) { // Optimize in case the Entry is one of our own. if (e instanceof AbstractMap.BasicMapEntry) { AbstractMap.BasicMapEntry<? extends...
public void putAll(Map<? extends K, ? extends V> m) { Map<K,V> addMap; addMap = (Map<K,V>) m; for (Map.Entry<K,V> e : addMap.entrySet()) { // Optimize in case the Entry is one of our own. if (e instanceof AbstractMap.SimpleEntry) { AbstractMap.BasicMapEntry<? extends K...
32,587
public void putAll(Map<? extends K, ? extends V> m) { Map<K,V> addMap; addMap = (Map<K,V>) m; for (Map.Entry<K,V> e : addMap.entrySet()) { // Optimize in case the Entry is one of our own. if (e instanceof AbstractMap.BasicMapEntry) { AbstractMap.BasicMapEntry<? extends...
public void putAll(Map<? extends K, ? extends V> m) { Map<K,V> addMap; addMap = (Map<K,V>) m; for (Map.Entry<K,V> e : addMap.entrySet()) { // Optimize in case the Entry is one of our own. if (e instanceof AbstractMap.BasicMapEntry) { AbstractMap.BasicMapEntry<? extends...
32,588
public void execute() throws BuildException { final long start = System.currentTimeMillis(); final PluginList piList; final PluginList systemPluginList; final long lmPI; try { piList = getPluginList(); systemPluginList = getSystemPluginList(); if (...
public void execute() throws BuildException { final long start = System.currentTimeMillis(); final PluginList piList; final PluginList systemPluginList; final long lmPI; try { piList = getPluginList(); systemPluginList = getSystemPluginList(); if (...
32,589
public void show() { // We must set visible before showing the peer. Otherwise the // peer could post paint events before visible is true, in which // case lightweight components are not initially painted -- // Container.paint first calls isShowing () before painting itself // and its children. if...
public void show() { // We must set visible before showing the peer. Otherwise the // peer could post paint events before visible is true, in which // case lightweight components are not initially painted -- // Container.paint first calls isShowing () before painting itself // and its children. if...
32,591
public void addMethod(Method method) { if(Modifier.isPublic(method.getModifiers()) && !Modifier.isStatic(method.getModifiers())) { String name = ClassHelper.getTruncatedName(method.getName()); Class retType = method.getReturnType(); Class[] params = method.getParameterTypes(); boolean isVoid = retType.equals(...
public void addMethod(Method method) { if(Modifier.isPublic(method.getModifiers()) && !Modifier.isStatic(method.getModifiers())) { String name = ClassHelper.getTruncatedName(method.getName()); Class retType = method.getReturnType(); Class[] params = method.getParameterTypes(); boolean isVoid = retType.equals(...
32,593
public Codec create_codec(Encoding for_encoding) throws UnknownEncoding { if (for_encoding.format != ENCODING_CDR_ENCAPS.value) throw new UnknownEncoding("Only ENCODING_CDR_ENCAPS is " + "supported by this factory." ); return new cdrEncapsCodec(...
public Codec create_codec(Encoding for_encoding) throws UnknownEncoding { if (for_encoding.format != ENCODING_CDR_ENCAPS.value) throw new UnknownEncoding("Only ENCODING_CDR_ENCAPS is " + "supported by this factory." ); return new CdrEncapsCodecI...
32,594
public boolean dispatchEvent (AWTEvent e) { if (e instanceof WindowEvent) { Window target = (Window) e.getSource (); if (e.id == WindowEvent.WINDOW_ACTIVATED) setGlobalActiveWindow (target); else if (e.id == WindowEvent.WINDOW_GAINED_FOCUS) setGlobalFocusedWindow (targe...
public boolean dispatchEvent (AWTEvent e) { if (e instanceof WindowEvent) { Window target = (Window) e.getSource (); if (e.id == WindowEvent.WINDOW_ACTIVATED) setGlobalActiveWindow (target); else if (e.id == Win...
32,595
ChangeListener createScrollListener() { return new ChangeListener() { public void stateChanged(ChangeEvent event) { JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); JViewport vp = JScrollPan...
ChangeListener createScrollListener() { return new ChangeListener() { public void stateChanged(ChangeEvent event) { JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrol...
32,597
public void stateChanged(ChangeEvent event) { JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); JViewport vp = JScrollPane.this.getViewport(); if (vp != null && event.getSource() == vp) ...
public void stateChanged(ChangeEvent event) { JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); JViewport vp = JScrollPane.this.getViewport(); ...
32,599
public IndexColorModel(int bits, int size, byte[] reds, byte[] greens, byte[] blues) { this(bits, size, reds, greens, blues, null); }
public IndexColorModel(int bits, int size, byte[] reds, byte[] greens, byte[] blues) { this(bits, size, reds, greens, blues, null); }
32,601
public final int getAlpha(int pixel) { if (pixel < map_size) { return ((rgb[pixel] >> 24) & 0xFF); } else { return 0; } }
public final int getAlpha(int pixel) { if (pixel < map_size) { return ((rgb[pixel] >> 24) & 0xFF); } else { return 0; } }
32,602
public final int getAlpha(int pixel) { if (pixel < map_size) { return ((rgb[pixel] >> 24) & 0xFF); } else { return 0; } }
public final int getAlpha(int pixel) { if (pixel < map_size) { return ((rgb[pixel] >> 24) & 0xFF); else { return 0; } }
32,603
public final void getAlphas(byte[] a) { getComponents(a, 3); }
public final void getAlphas(byte[] a) { getComponents(a, 3); }
32,604
public final int getBlue(int pixel) { if (pixel < map_size) { return (rgb[pixel] & 0xFF); } else { return 0; } }
public final int getBlue(int pixel) { if (pixel < map_size) { return (rgb[pixel] & 0xFF); } else { return 0; } }
32,605
public final int getBlue(int pixel) { if (pixel < map_size) { return (rgb[pixel] & 0xFF); } else { return 0; } }
public final int getBlue(int pixel) { if (pixel < map_size) { return (rgb[pixel] & 0xFF); else { return 0; } }
32,606
public final void getBlues(byte[] b) { getComponents(b, 0); }
public final void getBlues(byte[] b) { getComponents(b, 0); }
32,607
private void getComponents(byte[] c, int ci) { int i, max = (map_size < c.length) ? map_size : c.length; for (i = 0; i < max; i++) { c[i] = (byte) (rgb[i] >> (ci * 8)); } }
private void getComponents(byte[] c, int ci) { int i, max = (map_size < c.length) ? map_size : c.length; for (i = 0; i < max; i++) { c[i] = (byte) (rgb[i] >> (ci * 8)); } }
32,608
private void getComponents(byte[] c, int ci) { int i, max = (map_size < c.length) ? map_size : c.length; for (i = 0; i < max; i++) { c[i] = (byte) (rgb[i] >> (ci * 8)); } }
private void getComponents(byte[] c, int ci) { int i, max = (map_size < c.length) ? map_size : c.length; for (i = 0; i < max; i++) { c[i] = (byte) (rgb[i] >> (ci * 8)); } }
32,609
public final int getGreen(int pixel) { if (pixel < map_size) { return ((rgb[pixel] >> 8) & 0xFF); } else { return 0; } }
public final int getGreen(int pixel) { if (pixel < map_size) { return ((rgb[pixel] >> 8) & 0xFF); } else { return 0; } }
32,610
public final int getGreen(int pixel) { if (pixel < map_size) { return ((rgb[pixel] >> 8) & 0xFF); } else { return 0; } }
public final int getGreen(int pixel) { if (pixel < map_size) { return ((rgb[pixel] >> 8) & 0xFF); else { return 0; } }
32,611
public final void getGreens(byte[] g) { getComponents(g, 1); }
public final void getGreens(byte[] g) { getComponents(g, 1); }
32,612
public final int getMapSize() { return map_size; }
public final int getMapSize() { return map_size; }
32,613
public final int getRGB(int pixel) { if (pixel < map_size) return rgb[pixel]; return 0; }
public final int getRGB(int pixel) { if (pixel < map_size) return rgb[pixel]; return 0; }
32,614
public final int getRGB(int pixel) { if (pixel < map_size) return rgb[pixel]; return 0; }
public final int getRGB(int pixel) { if (pixel < map_size) return rgb[pixel]; return 0; }
32,615
public final int getRed(int pixel) { if (pixel < map_size) { return ((rgb[pixel] >> 16) & 0xFF); } else { return 0; } }
public final int getRed(int pixel) { if (pixel < map_size) { return ((rgb[pixel] >> 16) & 0xFF); } else { return 0; } }
32,616
public final int getRed(int pixel) { if (pixel < map_size) { return ((rgb[pixel] >> 16) & 0xFF); } else { return 0; } }
public final int getRed(int pixel) { if (pixel < map_size) { return ((rgb[pixel] >> 16) & 0xFF); else { return 0; } }
32,617
public final void getReds(byte[] r) { getComponents(r, 2); }
public final void getReds(byte[] r) { getComponents(r, 2); }
32,618
public final int getTransparentPixel() { return trans; }
public final int getTransparentPixel() { return trans; }
32,619
protected void handleConfirmation(ConfirmationCallback c) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); if (c.getPrompt() != null) out.println(c.getPrompt()); String[] choices = null; int[] values = null; switch (c.getOptionType()) { case...
protected void handleConfirmation(ConfirmationCallback c) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); if (c.getPrompt() != null) out.print(c.getPrompt()); String[] choices = null; int[] values = null; switch (c.getOptionType()) { case ...
32,620
protected void handleConfirmation(ConfirmationCallback c) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); if (c.getPrompt() != null) out.println(c.getPrompt()); String[] choices = null; int[] values = null; switch (c.getOptionType()) { case...
protected void handleConfirmation(ConfirmationCallback c) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); if (c.getPrompt() != null) out.println(c.getPrompt()); String[] choices = null; int[] values = null; switch (c.getOptionType()) { case...
32,621
protected void handleConfirmation(ConfirmationCallback c) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); if (c.getPrompt() != null) out.println(c.getPrompt()); String[] choices = null; int[] values = null; switch (c.getOptionType()) { case...
protected void handleConfirmation(ConfirmationCallback c) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); if (c.getPrompt() != null) out.println(c.getPrompt()); String[] choices = null; int[] values = null; switch (c.getOptionType()) { case...
32,622
protected void handleLanguage(LanguageCallback c) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); out.println(messages.getString("callback.language")); String reply = null; reply = in.readLine(); if (reply == null) { c.setLocale(Locale.getDefa...
protected void handleLanguage(LanguageCallback c) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); out.print(messages.getString("callback.language")); String reply = null; reply = in.readLine(); if (reply == null) { c.setLocale(Locale.getDefaul...
32,624
public static void main(String[] args) { int port = PORT; String iorf = null; try { // Create and initialize the ORB final Functional_ORB orb = new Functional_ORB(); if (args.length > 1) for (int i = 0; i < args.length - 1; i++) { if (args[i].endsWi...
public static void main(String[] args) { int port = PORT; String iorf = null; try { // Create and initialize the ORB final OrbFunctional orb = new OrbFunctional(); if (args.length > 1) for (int i = 0; i < args.length - 1; i++) { if (args[i].endsWith...
32,625
public static void main(String[] args) { int port = PORT; String iorf = null; try { // Create and initialize the ORB final Functional_ORB orb = new Functional_ORB(); if (args.length > 1) for (int i = 0; i < args.length - 1; i++) { if (args[i].endsWi...
public static void main(String[] args) { int port = PORT; String iorf = null; try { // Create and initialize the ORB final Functional_ORB orb = new Functional_ORB(); if (args.length > 1) for (int i = 0; i < args.length - 1; i++) { if (args[i].endsWi...
32,626
public static void main(String[] args) { int port = PORT; String iorf = null; try { // Create and initialize the ORB final Functional_ORB orb = new Functional_ORB(); if (args.length > 1) for (int i = 0; i < args.length - 1; i++) { if (args[i].endsWi...
public static void main(String[] args) { int port = PORT; String iorf = null; try { // Create and initialize the ORB final Functional_ORB orb = new Functional_ORB(); if (args.length > 1) for (int i = 0; i < args.length - 1; i++) { if (args[i].endsWi...
32,627
protected void installDefaults() { // FIXME: Move border to MetalBorders frame.setBorder(new InternalFrameBorder()); }
protected void installDefaults() { // FIXME: Move border to MetalBorders UIDefaults defaults = UIManager.getLookAndFeelDefaults(); Color lineColor = new Color(238, 238, 238); Border inner = BorderFactory.createLineBorder(lineColor, 1); Color shadowInner = new Color(184, 207, 229); Color shadowOuter = new Co...
32,629
public static TypeCode type() { return new primitiveArrayTypeCode(TCKind.tk_float); }
public static TypeCode type() { return new ArrayTypeCode(TCKind.tk_float); }
32,630
public DefaultTreeSelectionModel() { // TODO }
setSelectionMode(DISCONTIGUOUS_TREE_SELECTION); setSelectionMode(DISCONTIGUOUS_TREE_SELECTION); publicsetSelectionMode(DISCONTIGUOUS_TREE_SELECTION); DefaultTreeSelectionModel()setSelectionMode(DISCONTIGUOUS_TREE_SELECTION); setSelectionMode(DISCONTIGUOUS_TREE_SELECTION); { //setSelectionMode(DISCONTIGUOUS_TREE_SELECT...
32,631
public TreePath getLeadSelectionPath() { return null; // TODO }
public TreePath getLeadSelectionPath() { return leadPath; // TODO }
32,632
public int getLeadSelectionRow() { return 0; // TODO }
public int getLeadSelectionRow() { if ((rowMapper == null) || (leadPath == null)) return -1; else return rowMapper.getRowsForPaths(new TreePath[]{ leadPath })[0]; // TODO }
32,633
public int getMaxSelectionRow() { return 0; // TODO }
public int getMaxSelectionRow() { if ((rowMapper == null) || (selection == null) || (selection.length == 0)) return -1; else { int[] rows = rowMapper.getRowsForPaths(selection); int maxRow = -1; for (int index = 0; index < rows.length; index++) maxRow = Math.max(maxRow, rows[index]); return maxRow; } // TODO }
32,634
public int getMinSelectionRow() { return 0; // TODO }
public int getMinSelectionRow() { if ((rowMapper == null) || (selection == null) || (selection.length == 0)) return -1; else { int[] rows = rowMapper.getRowsForPaths(selection); int minRow = Integer.MAX_VALUE; for (int index = 0; index < rows.length; index++) minRow = Math.min(minRow, rows[index]); return minRow; }...
32,635
public RowMapper getRowMapper() { return null; // TODO }
public RowMapper getRowMapper() { return rowMapper; // TODO }
32,636
public int getSelectionCount() { return 0; // TODO }
public int getSelectionCount() { if (selection == null) return 0; else return selection.length; // TODO }
32,637
public int getSelectionMode() { return 0; // TODO }
public int getSelectionMode() { return selectionMode; // TODO }
32,638
public TreePath getSelectionPath() { return null; // TODO }
public TreePath getSelectionPath() { if ((selection == null) || (selection.length == 0)) return null; else return selection[0]; // TODO }
32,639
public TreePath[] getSelectionPaths() { return null; // TODO }
public TreePath[] getSelectionPaths() { return selection; // TODO }
32,640
public int[] getSelectionRows() { return null; // TODO }
public int[] getSelectionRows() { if (rowMapper == null) return null; else return rowMapper.getRowsForPaths(selection); // TODO }
32,641
public boolean isSelectionEmpty() { return false; // TODO }
public boolean isSelectionEmpty() { return ((selection == null) || (selection.length == 0)); // TODO }
32,642
public void setSelectionMode(int value0) { // TODO }
public void setSelectionMode(int mode) { // TODO }
32,643
public void setSelectionMode(int value0) { // TODO }
selectionMode = mode; selectionMode = mode; publicselectionMode = mode; voidselectionMode = mode; setSelectionMode(intselectionMode = mode; value0)selectionMode = mode; selectionMode = mode; { //selectionMode = mode; TODOselectionMode = mode; selectionMode = mode; }
32,644
private void flushNode(boolean sync) throws BackingStoreException { String[] keys = null; synchronized(lock) { if (sync) { syncSpi(); } else { flushSpi(); } keys = (String[]) childCache.keySet().toArray(); } if (keys != null) { for (int i = 0; i < keys.length; i++) { // Have to lock this n...
private void flushNode(boolean sync) throws BackingStoreException { String[] keys = null; synchronized(lock) { if (sync) { syncSpi(); } else { flushSpi(); } keys = (String[]) childCache.keySet().toArray(); } if (keys != null) { for (int i = 0; i < keys.length; i++) { // Have to lock this n...
32,645
public void setLogicalStyle(int position, Style style) { // FIXME: Implement me. throw new Error("not implemented"); }
public void setLogicalStyle(int position, Style style) { // FIXME: Implement me. Element el = getParagraphElement(position); if (el instanceof AbstractElement) { AbstractElement ael = (AbstractElement) el; ael.setResolveParent(style); } else throw new AssertionError("paragraph elements are expected to be" + "in...
32,646
public abstract void drawString(AttributedCharacterIterator iterator, float x, float y);
public abstract void drawString(AttributedCharacterIterator iterator, float x, float y);
32,647
public void drawText(Graphics2D g, String text, Font font, int x, int y);
public void drawText(Graphics2D g, String text, Font font, int x, int y);
32,648
public abstract void rotate(double theta, double x, double y);
public abstract void rotate(double theta, double x, double y);
32,649
public abstract void translate(double tx, double ty);
public abstract void translate(double tx, double ty);
32,650
public int getBreakWeight(int axis, float pos, float len) { return BadBreakWeight; }
public int getBreakWeight(int axis, float pos, float len) { int weight = BadBreakWeight; if (len > getPreferredSpan(axis)) weight = GoodBreakWeight; return weight; }
32,651
public String getToolTipText(float x, float y, Shape allocation) { int index = getViewIndex(x, y, allocation); if (index < -1) return null; Shape childAllocation = getChildAllocation(index, allocation); if (childAllocation.getBounds().contains(x, y)) return getView(index).getToolTipText(x, y, c...
public String getToolTipText(float x, float y, Shape allocation) { int index = getViewIndex(x, y, allocation); if (index < -1) return null; Shape childAllocation = getChildAllocation(index, allocation); if (childAllocation.getBounds().contains(x, y)) return getView(index).getToolTipText(x, y, c...
32,652
public void insertUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Element el = getElement(); DocumentEvent.ElementChange ec = ev.getChange(el); if (ec != null) updateChildren(ec, ev, vf); forwardUpdate(ec, ev, shape, vf); updateLayout(ec, ev, shape); }
public void insertUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Element el = getElement(); DocumentEvent.ElementChange ec = ev.getChange(el); if (ec != null) { if (! updateChildren(ec, ev, vf)) ec = null; } forwardUpdate(ec, ev, shape, vf); updateLayout(ec, ev, shape); }
32,653
public void preferenceChanged(View child, boolean width, boolean height) { if (parent != null) parent.preferenceChanged(this, width, height); }
public void preferenceChanged(View child, boolean width, boolean height) { if (parent != null) parent.preferenceChanged(this, width, height); }
32,655
public void removeAll() { replace(0, getViewCount(), new View[0]); }
public void removeAll() { replace(0, getViewCount(), null); }
32,656
public void setParent(View parent) { if (parent == null) { int numChildren = getViewCount(); for (int i = 0; i < numChildren; i++) getView(i).setParent(null); } this.parent = parent; }
public void setParent(View parent) { if (parent == null) { int numChildren = getViewCount(); for (int i = 0; i < numChildren; i++) { View child = getView(i); if (child.getParent() == this) child.setParent(null); } } this.parent = parent; }
32,657
protected boolean updateChildren(DocumentEvent.ElementChange ec, DocumentEvent ev, ViewFactory vf) { Element[] added = ec.getChildrenAdded(); Element[] removed = ec.getChildrenRemoved(); int index = ec.getIndex(); View[] newChildren = ne...
protected boolean updateChildren(DocumentEvent.ElementChange ec, DocumentEvent ev, ViewFactory vf) { Element[] added = ec.getChildrenAdded(); Element[] removed = ec.getChildrenRemoved(); int index = ec.getIndex(); View[] newChildren = nu...
32,658
protected boolean updateChildren(DocumentEvent.ElementChange ec, DocumentEvent ev, ViewFactory vf) { Element[] added = ec.getChildrenAdded(); Element[] removed = ec.getChildrenRemoved(); int index = ec.getIndex(); View[] newChildren = ne...
protected boolean updateChildren(DocumentEvent.ElementChange ec, DocumentEvent ev, ViewFactory vf) { Element[] added = ec.getChildrenAdded(); Element[] removed = ec.getChildrenRemoved(); int index = ec.getIndex(); View[] newChildren = ne...
32,659
protected void initializeLocalVars() { setTableHeader(createDefaultTableHeader()); this.autoCreateColumnsFromModel = false; if (columnModel == null) { this.autoCreateColumnsFromModel = true; createColumnsFromModel(); } this.columnModel.addColumnModelListener(this); this.def...
protected void initializeLocalVars() { setTableHeader(createDefaultTableHeader()); this.autoCreateColumnsFromModel = false; if (columnModel == null) { this.autoCreateColumnsFromModel = true; createColumnsFromModel(); } this.columnModel.addColumnModelListener(this); this.def...
32,661
public int filterRGB(int x, int y, int rgb) { return (int) ( ( p * ( 0.299 * ( (0xff0000 & rgb) >> 16) + 0.587 * ( (0xff00 & rgb) >> 8 ) + 0.114 * (0xff & rgb ) ) )); }
public int filterRGB(int x, int y, int rgb) { return (int) ( ( p * ( 0.299 * ( (0xff0000 & rgb) >> 16) + 0.587 * ( (0xff00 & rgb) >> 8 ) + 0.114 * (0xff & rgb ) ) )); }
32,662
public int filterRGB(int x, int y, int rgb) { return (int) ( ( p * ( 0.299 * ( (0xff0000 & rgb) >> 16) + 0.587 * ( (0xff00 & rgb) >> 8 ) + 0.114 * (0xff & rgb ) ) )); }
public int filterRGB(int x, int y, int rgb) { return (int) (p * (0.299 * ((0xff0000 & rgb) >> 16) + 0.587 * ((0xff00 & rgb) >> 8) + 0.114 * (0xff & rgb))); }
32,663
public NamingMap() { map = new TreeMap(cmpNameComponent.singleton); }
public NamingMap() { map = new TreeMap(NameComponentComparator.singleton); }
32,664
JMenuBar getJMenuBar() { return getRootPane().getJMenuBar(); }
public JMenuBar getJMenuBar() { return getRootPane().getJMenuBar(); }
32,665