bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
---|---|---|
public synchronized StringBuffer append(char ch) { ensureCapacity_unsynchronized(count + 1); value[count++] = ch; return this; }
|
public StringBuffer append(Object obj) { ensureCapacity_unsynchronized(count + 1); value[count++] = ch; return this; }
| 0 |
public synchronized StringBuffer append(char ch) { ensureCapacity_unsynchronized(count + 1); value[count++] = ch; return this; }
|
public synchronized StringBuffer append(char ch) { ensureCapacity_unsynchronized(count + 1); value[count++] = ch; return this; }
| 1 |
public String substring(int beginIndex, int endIndex) { if (beginIndex < 0 || endIndex > count || beginIndex > endIndex) throw new StringIndexOutOfBoundsException(); if (beginIndex == 0 && endIndex == count) return this; int len = endIndex - beginIndex; // Package constructor avoids an array copy. return new String(value, beginIndex + offset, len, (len << 2) >= value.length); }
|
public String substring(int begin) { if (beginIndex < 0 || endIndex > count || beginIndex > endIndex) throw new StringIndexOutOfBoundsException(); if (beginIndex == 0 && endIndex == count) return this; int len = endIndex - beginIndex; // Package constructor avoids an array copy. return new String(value, beginIndex + offset, len, (len << 2) >= value.length); }
| 2 |
public String substring(int beginIndex, int endIndex) { if (beginIndex < 0 || endIndex > count || beginIndex > endIndex) throw new StringIndexOutOfBoundsException(); if (beginIndex == 0 && endIndex == count) return this; int len = endIndex - beginIndex; // Package constructor avoids an array copy. return new String(value, beginIndex + offset, len, (len << 2) >= value.length); }
|
public String substring(int beginIndex, int endIndex) { if (beginIndex < 0 || endIndex > count || beginIndex > endIndex) throw new StringIndexOutOfBoundsException(); if (beginIndex == 0 && endIndex == count) return this; int len = endIndex - beginIndex; // Package constructor avoids an array copy. return new String(value, beginIndex + offset, len, (len << 2) >= value.length); }
| 3 |
public Object next() { String fs = (String)fileSystemsRoots.next(); return new virtualFSEntry(fs); }
|
public Object next() { String fs = (String)fileSystemsRoots.next(); return new virtualFSEntry(fs); }
| 4 |
public FSEntry getEntry(String name) throws IOException { return getEntry("/" + name); }
|
public FSEntry getEntry(String name) throws IOException { return getEntry("/" + name); }
| 5 |
public Iterator iterator() { return new RootsIterator(fsm.fileSystemRoots().iterator()); }
|
public Iterator iterator() { return new RootsIterator(fsm.fileSystemRoots().iterator()); }
| 6 |
public String[] list(File directory, FilenameFilter filter) throws IOException { final FSEntry entry = getEntry(directory); if (entry == null) { throw new FileNotFoundException(directory.getAbsolutePath()); } if (!entry.isDirectory()) { throw new IOException("Cannot list on non-directories " + directory); } final ArrayList list = new ArrayList(); for (Iterator i = entry.getDirectory().iterator(); i.hasNext();) { final FSEntry child = (FSEntry)i.next(); final String name = child.getName(); if ((filter == null) || (filter.accept(directory, name))) { list.add(name); } } return (String[])list.toArray(new String[list.size()]); }
|
public String[] list(File directory, FilenameFilter filter) throws IOException { final FSEntry entry = getEntry(directory); if (entry == null) { throw new FileNotFoundException(directory.getAbsolutePath()); } if (!entry.isDirectory()) { throw new IOException("Cannot list on non-directories " + directory); } final ArrayList list = new ArrayList(); for (Iterator i = entry.getDirectory().iterator(); i.hasNext();) { final FSEntry child = (FSEntry)i.next(); final String name = child.getName(); if ((filter == null) || (filter.accept(directory, name))) { list.add(name); } } return (String[])list.toArray(new String[list.size()]); }
| 7 |
public synchronized FileSystem getFileSystem(String rootName) { return (FileSystem)filesystems.get(rootName); }
|
public synchronized FileSystem getFileSystem(String rootName) { return (FileSystem)filesystems.get(rootName); }
| 8 |
public DriverException(String message, Throwable cause) { super(message, cause); }
|
public DriverException(String message, Throwable cause) { super(message, cause); }
| 10 |
public CellEditorHandler() { }
|
public CellEditorHandler() { }
| 11 |
public void editingCanceled(ChangeEvent e) { editingPath = null; editingRow = -1; stopEditingInCompleteEditing = false; if (editingComponent != null) tree.remove(editingComponent.getParent()); editingComponent = null; if (cellEditor != null) { if (cellEditor instanceof DefaultTreeCellEditor) tree.removeTreeSelectionListener((DefaultTreeCellEditor) cellEditor); cellEditor.removeCellEditorListener(cellEditorListener); setCellEditor(null); createdCellEditor = false; } tree.requestFocusInWindow(false); editorTimer.stop(); isEditing = false; tree.repaint(); }
|
public void editingCanceled(ChangeEvent e) { editingPath = null; editingRow = -1; stopEditingInCompleteEditing = false; if (editingComponent != null) tree.remove(editingComponent.getParent()); editingComponent = null; if (cellEditor != null) { if (cellEditor instanceof DefaultTreeCellEditor) tree.removeTreeSelectionListener((DefaultTreeCellEditor) cellEditor); cellEditor.removeCellEditorListener(cellEditorListener); setCellEditor(null); createdCellEditor = false; } tree.requestFocusInWindow(false); editorTimer.stop(); isEditing = false; tree.repaint(); }
| 12 |
public void editingCanceled(ChangeEvent e) { editingPath = null; editingRow = -1; stopEditingInCompleteEditing = false; if (editingComponent != null) tree.remove(editingComponent.getParent()); editingComponent = null; if (cellEditor != null) { if (cellEditor instanceof DefaultTreeCellEditor) tree.removeTreeSelectionListener((DefaultTreeCellEditor) cellEditor); cellEditor.removeCellEditorListener(cellEditorListener); setCellEditor(null); createdCellEditor = false; } tree.requestFocusInWindow(false); editorTimer.stop(); isEditing = false; tree.repaint(); }
|
public void editingCanceled(ChangeEvent e) { editingPath = null; editingRow = -1; stopEditingInCompleteEditing = false; if (editingComponent != null) tree.remove(editingComponent.getParent()); editingComponent = null; if (cellEditor != null) { if (cellEditor instanceof DefaultTreeCellEditor) tree.removeTreeSelectionListener((DefaultTreeCellEditor) cellEditor); cellEditor.removeCellEditorListener(cellEditorListener); setCellEditor(null); createdCellEditor = false; } tree.requestFocusInWindow(false); editorTimer.stop(); isEditing = false; tree.repaint(); }
| 13 |
public void editingStopped(ChangeEvent e) { editingPath = null; editingRow = -1; stopEditingInCompleteEditing = false; if (editingComponent != null) { tree.remove(editingComponent.getParent()); editingComponent = null; } if (cellEditor != null) { newVal = ((JTextField) getCellEditor().getCellEditorValue()).getText(); completeEditing(false, false, true); if (cellEditor instanceof DefaultTreeCellEditor) tree.removeTreeSelectionListener((DefaultTreeCellEditor) cellEditor); cellEditor.removeCellEditorListener(cellEditorListener); setCellEditor(null); createdCellEditor = false; } isEditing = false; tree.requestFocusInWindow(false); editorTimer.stop(); }
|
public void editingStopped(ChangeEvent e) { editingPath = null; editingRow = -1; stopEditingInCompleteEditing = false; if (editingComponent != null) { tree.remove(editingComponent.getParent()); editingComponent = null; } if (cellEditor != null) { newVal = ((JTextField) getCellEditor().getCellEditorValue()).getText(); completeEditing(false, false, true); if (cellEditor instanceof DefaultTreeCellEditor) tree.removeTreeSelectionListener((DefaultTreeCellEditor) cellEditor); cellEditor.removeCellEditorListener(cellEditorListener); setCellEditor(null); createdCellEditor = false; } isEditing = false; tree.requestFocusInWindow(false); editorTimer.stop(); }
| 14 |
public void editingStopped(ChangeEvent e) { editingPath = null; editingRow = -1; stopEditingInCompleteEditing = false; if (editingComponent != null) { tree.remove(editingComponent.getParent()); editingComponent = null; } if (cellEditor != null) { newVal = ((JTextField) getCellEditor().getCellEditorValue()).getText(); completeEditing(false, false, true); if (cellEditor instanceof DefaultTreeCellEditor) tree.removeTreeSelectionListener((DefaultTreeCellEditor) cellEditor); cellEditor.removeCellEditorListener(cellEditorListener); setCellEditor(null); createdCellEditor = false; } isEditing = false; tree.requestFocusInWindow(false); editorTimer.stop(); }
|
public void editingStopped(ChangeEvent e) { editingPath = null; editingRow = -1; stopEditingInCompleteEditing = false; if (editingComponent != null) { tree.remove(editingComponent.getParent()); editingComponent = null; } if (cellEditor != null) { newVal = ((JTextField) getCellEditor().getCellEditorValue()).getText(); completeEditing(false, false, true); if (cellEditor instanceof DefaultTreeCellEditor) tree.removeTreeSelectionListener((DefaultTreeCellEditor) cellEditor); cellEditor.removeCellEditorListener(cellEditorListener); setCellEditor(null); createdCellEditor = false; } isEditing = false; tree.requestFocusInWindow(false); editorTimer.stop(); }
| 15 |
public ComponentHandler() { }
|
public ComponentHandler() { }
| 16 |
public void actionPerformed(ActionEvent ae) { }
|
public void actionPerformed(ActionEvent ae) { }
| 17 |
public void componentMoved(ComponentEvent e) { }
|
public void componentMoved(ComponentEvent e) { }
| 18 |
protected JScrollPane getScrollPane() { return null; }
|
protected JScrollPane getScrollPane() { return null; }
| 19 |
protected void startTimer() { }
|
protected void startTimer() { }
| 20 |
public FocusHandler() { }
|
public FocusHandler() { }
| 21 |
public void focusGained(FocusEvent e) { }
|
public void focusGained(FocusEvent e) { }
| 22 |
public void focusLost(FocusEvent e) { }
|
public void focusLost(FocusEvent e) { }
| 23 |
public KeyHandler() { }
|
public KeyHandler() { }
| 24 |
public void keyPressed(KeyEvent e) { }
|
public void keyPressed(KeyEvent e) { }
| 25 |
public void keyReleased(KeyEvent e) { }
|
public void keyReleased(KeyEvent e) { }
| 26 |
public void keyTyped(KeyEvent e) { }
|
public void keyTyped(KeyEvent e) { }
| 27 |
public MouseHandler() { }
|
public MouseHandler() { }
| 28 |
public void mouseDragged(MouseEvent e) { }
|
public void mouseDragged(MouseEvent e) { }
| 29 |
public void mouseMoved(MouseEvent e) { }
|
public void mouseMoved(MouseEvent e) { }
| 30 |
public void mousePressed(MouseEvent e) { }
|
public void mousePressed(MouseEvent e) { }
| 31 |
public void mouseReleased(MouseEvent e) { }
|
public void mouseReleased(MouseEvent e) { }
| 32 |
public MouseInputHandler(Component source, Component destination, MouseEvent e) { }
|
public MouseInputHandler(Component source, Component destination, MouseEvent e) { }
| 33 |
public void mouseClicked(MouseEvent e) { }
|
public void mouseClicked(MouseEvent e) { }
| 34 |
public void mouseDragged(MouseEvent e) { }
|
public void mouseDragged(MouseEvent e) { }
| 35 |
public void mouseEntered(MouseEvent e) { }
|
public void mouseEntered(MouseEvent e) { }
| 36 |
public void mouseExited(MouseEvent e) { }
|
public void mouseExited(MouseEvent e) { }
| 37 |
public void mouseMoved(MouseEvent e) { }
|
public void mouseMoved(MouseEvent e) { }
| 38 |
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / getRowHeight()); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = getPathBounds(tree, path); bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; if (bounds.contains(click.x, click.y)) inBounds = true; else if (hasControlIcons() && (click.x < (bounds.x - rightChildIndent + 5) && click.x > (bounds.x - rightChildIndent - 5))) cntlClick = true; if ((inBounds || cntlClick) && tree.isVisible(path)) { selectPath(tree, path); if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } if (!cntlClick && tree.isEditable()) startEditing(path, e); } } }
|
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / getRowHeight()); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = getPathBounds(tree, path); bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; if (bounds.contains(click.x, click.y)) inBounds = true; else if (hasControlIcons() && (click.x < (bounds.x - rightChildIndent + 5) && click.x > (bounds.x - rightChildIndent - 5))) cntlClick = true; if ((inBounds || cntlClick) && tree.isVisible(path)) { selectPath(tree, path); if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } if (!cntlClick && tree.isEditable()) startEditing(path, e); } } }
| 39 |
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / getRowHeight()); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = getPathBounds(tree, path); bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; if (bounds.contains(click.x, click.y)) inBounds = true; else if (hasControlIcons() && (click.x < (bounds.x - rightChildIndent + 5) && click.x > (bounds.x - rightChildIndent - 5))) cntlClick = true; if ((inBounds || cntlClick) && tree.isVisible(path)) { selectPath(tree, path); if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } if (!cntlClick && tree.isEditable()) startEditing(path, e); } } }
|
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / getRowHeight()); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = getPathBounds(tree, path); bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; if (bounds.contains(click.x, click.y)) inBounds = true; else if (hasControlIcons() && (click.x < (bounds.x - rightChildIndent + 5) && click.x > (bounds.x - rightChildIndent - 5))) cntlClick = true; if ((inBounds || cntlClick) && tree.isVisible(path)) { selectPath(tree, path); if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } if (!cntlClick && tree.isEditable()) startEditing(path, e); } } }
| 40 |
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / getRowHeight()); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = getPathBounds(tree, path); bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; if (bounds.contains(click.x, click.y)) inBounds = true; else if (hasControlIcons() && (click.x < (bounds.x - rightChildIndent + 5) && click.x > (bounds.x - rightChildIndent - 5))) cntlClick = true; if ((inBounds || cntlClick) && tree.isVisible(path)) { selectPath(tree, path); if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } if (!cntlClick && tree.isEditable()) startEditing(path, e); } } }
|
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / getRowHeight()); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = getPathBounds(tree, path); bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; if (bounds.contains(click.x, click.y)) inBounds = true; else if (hasControlIcons() && (click.x < (bounds.x - rightChildIndent + 5) && click.x > (bounds.x - rightChildIndent - 5))) cntlClick = true; if ((inBounds || cntlClick) && tree.isVisible(path)) { selectPath(tree, path); if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } if (!cntlClick && tree.isEditable()) startEditing(path, e); } } }
| 41 |
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / getRowHeight()); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = getPathBounds(tree, path); bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; if (bounds.contains(click.x, click.y)) inBounds = true; else if (hasControlIcons() && (click.x < (bounds.x - rightChildIndent + 5) && click.x > (bounds.x - rightChildIndent - 5))) cntlClick = true; if ((inBounds || cntlClick) && tree.isVisible(path)) { selectPath(tree, path); if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } if (!cntlClick && tree.isEditable()) startEditing(path, e); } } }
|
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / getRowHeight()); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = getPathBounds(tree, path); bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; if (bounds.contains(click.x, click.y)) inBounds = true; else if (hasControlIcons() && (click.x < (bounds.x - rightChildIndent + 5) && click.x > (bounds.x - rightChildIndent - 5))) cntlClick = true; if ((inBounds || cntlClick) && tree.isVisible(path)) { selectPath(tree, path); if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } if (!cntlClick && tree.isEditable()) startEditing(path, e); } } }
| 42 |
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / getRowHeight()); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = getPathBounds(tree, path); bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; if (bounds.contains(click.x, click.y)) inBounds = true; else if (hasControlIcons() && (click.x < (bounds.x - rightChildIndent + 5) && click.x > (bounds.x - rightChildIndent - 5))) cntlClick = true; if ((inBounds || cntlClick) && tree.isVisible(path)) { selectPath(tree, path); if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } if (!cntlClick && tree.isEditable()) startEditing(path, e); } } }
|
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / getRowHeight()); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = getPathBounds(tree, path); bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; if (bounds.contains(click.x, click.y)) inBounds = true; else if (hasControlIcons() && (click.x < (bounds.x - rightChildIndent + 5) && click.x > (bounds.x - rightChildIndent - 5))) cntlClick = true; if ((inBounds || cntlClick) && tree.isVisible(path)) { selectPath(tree, path); if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } if (!cntlClick && tree.isEditable()) startEditing(path, e); } } }
| 43 |
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / getRowHeight()); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = getPathBounds(tree, path); bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; if (bounds.contains(click.x, click.y)) inBounds = true; else if (hasControlIcons() && (click.x < (bounds.x - rightChildIndent + 5) && click.x > (bounds.x - rightChildIndent - 5))) cntlClick = true; if ((inBounds || cntlClick) && tree.isVisible(path)) { selectPath(tree, path); if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } if (!cntlClick && tree.isEditable()) startEditing(path, e); } } }
|
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / getRowHeight()); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = getPathBounds(tree, path); bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; if (bounds.contains(click.x, click.y)) inBounds = true; else if (hasControlIcons() && (click.x < (bounds.x - rightChildIndent + 5) && click.x > (bounds.x - rightChildIndent - 5))) cntlClick = true; if ((inBounds || cntlClick) && tree.isVisible(path)) { selectPath(tree, path); if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } if (!cntlClick && tree.isEditable()) startEditing(path, e); } } }
| 44 |
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / getRowHeight()); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = getPathBounds(tree, path); bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; if (bounds.contains(click.x, click.y)) inBounds = true; else if (hasControlIcons() && (click.x < (bounds.x - rightChildIndent + 5) && click.x > (bounds.x - rightChildIndent - 5))) cntlClick = true; if ((inBounds || cntlClick) && tree.isVisible(path)) { selectPath(tree, path); if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } if (!cntlClick && tree.isEditable()) startEditing(path, e); } } }
|
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / getRowHeight()); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = getPathBounds(tree, path); bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; if (bounds.contains(click.x, click.y)) inBounds = true; else if (hasControlIcons() && (click.x < (bounds.x - rightChildIndent + 5) && click.x > (bounds.x - rightChildIndent - 5))) cntlClick = true; if ((inBounds || cntlClick) && tree.isVisible(path)) { selectPath(tree, path); if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } if (!cntlClick && tree.isEditable()) startEditing(path, e); } } }
| 45 |
public void mouseReleased(MouseEvent e) { }
|
public void mouseReleased(MouseEvent e) { }
| 46 |
protected void removeFromSource() { }
|
protected void removeFromSource() { }
| 47 |
public NodeDimensionsHandler() { }
|
public NodeDimensionsHandler() { }
| 48 |
public Rectangle getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle size) { return null; }
|
public Rectangle getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle size) { return null; }
| 49 |
protected int getRowX(int row, int depth) { return 0; }
|
protected int getRowX(int row, int depth) { return 0; }
| 50 |
public PropertyChangeHandler() { }
|
public PropertyChangeHandler() { }
| 51 |
public void propertyChange(PropertyChangeEvent event) { }
|
public void propertyChange(PropertyChangeEvent event) { }
| 52 |
public SelectionModelPropertyChangeHandler() { }
|
public SelectionModelPropertyChangeHandler() { }
| 53 |
public void propertyChange(PropertyChangeEvent event) { }
|
public void propertyChange(PropertyChangeEvent event) { }
| 54 |
public void actionPerformed(ActionEvent e) { TreePath lead = tree.getLeadSelectionPath(); if (e.getActionCommand().equals("selectPreviousChangeLead") || e.getActionCommand().equals("selectPreviousExtendSelection") || e.getActionCommand().equals("selectPrevious") || e.getActionCommand().equals("selectNext") || e.getActionCommand().equals("selectNextExtendSelection") || e.getActionCommand().equals("selectNextChangeLead")) (new TreeIncrementAction(0, "")).actionPerformed(e); else if (e.getActionCommand().equals("selectParent") || e.getActionCommand().equals("selectChild")) (new TreeTraverseAction(0, "")).actionPerformed(e); else if (e.getActionCommand().equals("selectAll")) { TreePath[] paths = new TreePath[tree.getRowCount()]; Object curr = getNextVisibleNode(tree.getModel().getRoot()); int i = 0; while (curr != null && i < paths.length) { paths[i] = new TreePath(getPathToRoot(curr, 0)); i++; } tree.addSelectionPaths(paths); } else if (e.getActionCommand().equals("startEditing")) tree.startEditingAtPath(lead); else if (e.getActionCommand().equals("toggle")) { if (tree.isEditing()) tree.stopEditing(); else { Object last = lead.getLastPathComponent(); TreePath path = new TreePath(getPathToRoot(last, 0)); if (!tree.getModel().isLeaf(last)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } } } else if (e.getActionCommand().equals("clearSelection")) tree.clearSelection(); if (tree.isEditing() && !e.getActionCommand().equals("startEditing")) tree.cancelEditing(); tree.scrollPathToVisible(lead); }
|
public void actionPerformed(ActionEvent e) { TreePath lead = tree.getLeadSelectionPath(); if (e.getActionCommand().equals("selectPreviousChangeLead") || e.getActionCommand().equals("selectPreviousExtendSelection") || e.getActionCommand().equals("selectPrevious") || e.getActionCommand().equals("selectNext") || e.getActionCommand().equals("selectNextExtendSelection") || e.getActionCommand().equals("selectNextChangeLead")) (new TreeIncrementAction(0, "")).actionPerformed(e); else if (e.getActionCommand().equals("selectParent") || e.getActionCommand().equals("selectChild")) (new TreeTraverseAction(0, "")).actionPerformed(e); else if (e.getActionCommand().equals("selectAll")) { TreePath[] paths = new TreePath[tree.getRowCount()]; Object curr = getNextVisibleNode(treeModel.getRoot()); int i = 0; while (curr != null && i < paths.length) { paths[i] = new TreePath(getPathToRoot(curr, 0)); i++; } tree.addSelectionPaths(paths); } else if (e.getActionCommand().equals("startEditing")) tree.startEditingAtPath(lead); else if (e.getActionCommand().equals("toggle")) { if (tree.isEditing()) tree.stopEditing(); else { Object last = lead.getLastPathComponent(); TreePath path = new TreePath(getPathToRoot(last, 0)); if (!tree.getModel().isLeaf(last)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } } } else if (e.getActionCommand().equals("clearSelection")) tree.clearSelection(); if (tree.isEditing() && !e.getActionCommand().equals("startEditing")) tree.cancelEditing(); tree.scrollPathToVisible(lead); }
| 55 |
public void actionPerformed(ActionEvent e) { TreePath lead = tree.getLeadSelectionPath(); if (e.getActionCommand().equals("selectPreviousChangeLead") || e.getActionCommand().equals("selectPreviousExtendSelection") || e.getActionCommand().equals("selectPrevious") || e.getActionCommand().equals("selectNext") || e.getActionCommand().equals("selectNextExtendSelection") || e.getActionCommand().equals("selectNextChangeLead")) (new TreeIncrementAction(0, "")).actionPerformed(e); else if (e.getActionCommand().equals("selectParent") || e.getActionCommand().equals("selectChild")) (new TreeTraverseAction(0, "")).actionPerformed(e); else if (e.getActionCommand().equals("selectAll")) { TreePath[] paths = new TreePath[tree.getRowCount()]; Object curr = getNextVisibleNode(tree.getModel().getRoot()); int i = 0; while (curr != null && i < paths.length) { paths[i] = new TreePath(getPathToRoot(curr, 0)); i++; } tree.addSelectionPaths(paths); } else if (e.getActionCommand().equals("startEditing")) tree.startEditingAtPath(lead); else if (e.getActionCommand().equals("toggle")) { if (tree.isEditing()) tree.stopEditing(); else { Object last = lead.getLastPathComponent(); TreePath path = new TreePath(getPathToRoot(last, 0)); if (!tree.getModel().isLeaf(last)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } } } else if (e.getActionCommand().equals("clearSelection")) tree.clearSelection(); if (tree.isEditing() && !e.getActionCommand().equals("startEditing")) tree.cancelEditing(); tree.scrollPathToVisible(lead); }
|
public void actionPerformed(ActionEvent e) { TreePath lead = tree.getLeadSelectionPath(); if (e.getActionCommand().equals("selectPreviousChangeLead") || e.getActionCommand().equals("selectPreviousExtendSelection") || e.getActionCommand().equals("selectPrevious") || e.getActionCommand().equals("selectNext") || e.getActionCommand().equals("selectNextExtendSelection") || e.getActionCommand().equals("selectNextChangeLead")) (new TreeIncrementAction(0, "")).actionPerformed(e); else if (e.getActionCommand().equals("selectParent") || e.getActionCommand().equals("selectChild")) (new TreeTraverseAction(0, "")).actionPerformed(e); else if (e.getActionCommand().equals("selectAll")) { TreePath[] paths = new TreePath[tree.getRowCount()]; Object curr = getNextVisibleNode(tree.getModel().getRoot()); int i = 0; while (curr != null && i < paths.length) { paths[i] = new TreePath(getPathToRoot(curr, 0)); i++; } tree.addSelectionPaths(paths); } else if (e.getActionCommand().equals("startEditing")) tree.startEditingAtPath(lead); else if (e.getActionCommand().equals("toggle")) { if (tree.isEditing()) tree.stopEditing(); else { Object last = lead.getLastPathComponent(); TreePath path = new TreePath(getPathToRoot(last, 0)); if (!tree.getModel().isLeaf(last)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } } } else if (e.getActionCommand().equals("clearSelection")) tree.clearSelection(); if (tree.isEditing() && !e.getActionCommand().equals("startEditing")) tree.cancelEditing(); tree.scrollPathToVisible(lead); }
| 56 |
public TreeCancelEditingAction() { }
|
public TreeCancelEditingAction() { }
| 57 |
public void actionPerformed(ActionEvent e) { }
|
public void actionPerformed(ActionEvent e) { }
| 58 |
public boolean isEnabled() { return false; }
|
public boolean isEnabled() { return false; }
| 59 |
public TreeExpansionHandler() { }
|
public TreeExpansionHandler() { }
| 60 |
public void treeCollapsed(TreeExpansionEvent event) { tree.repaint(); }
|
public void treeCollapsed(TreeExpansionEvent event) { tree.repaint(); }
| 61 |
public void treeCollapsed(TreeExpansionEvent event) { tree.repaint(); }
|
public void treeCollapsed(TreeExpansionEvent event) { tree.repaint(); }
| 62 |
public void treeExpanded(TreeExpansionEvent event) { tree.repaint(); }
|
public void treeExpanded(TreeExpansionEvent event) { tree.repaint(); }
| 63 |
public void treeExpanded(TreeExpansionEvent event) { tree.repaint(); }
|
public void treeExpanded(TreeExpansionEvent event) { tree.repaint(); }
| 64 |
public TreeHomeAction(int direction, String name) { }
|
public TreeHomeAction(int direction, String name) { }
| 65 |
public void actionPerformed(ActionEvent e) { }
|
public void actionPerformed(ActionEvent e) { }
| 66 |
public boolean isEnabled() { return false; }
|
public boolean isEnabled() { return false; }
| 67 |
public TreeIncrementAction(int direction, String name) { }
|
public TreeIncrementAction(int direction, String name) { }
| 68 |
public void actionPerformed(ActionEvent e) { Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectPreviousChangeLead")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); selectPath(tree, new TreePath(getPathToRoot(prev, 0))); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectPreviousExtendSelection")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); tree.addSelectionPath(newPath); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectPrevious")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); selectPath(tree, new TreePath(getPathToRoot(prev, 0))); } } else if (e.getActionCommand().equals("selectNext")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); selectPath(tree, newPath); } } else if (e.getActionCommand().equals("selectNextExtendSelection")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); tree.addSelectionPath(newPath); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectNextChangeLead")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); selectPath(tree, newPath); tree.setLeadSelectionPath(newPath); } } }
|
public void actionPerformed(ActionEvent e) { Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectPreviousChangeLead")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); selectPath(tree, new TreePath(getPathToRoot(prev, 0))); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectPreviousExtendSelection")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); tree.addSelectionPath(newPath); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectPrevious")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); selectPath(tree, new TreePath(getPathToRoot(prev, 0))); } } else if (e.getActionCommand().equals("selectNext")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); selectPath(tree, newPath); } } else if (e.getActionCommand().equals("selectNextExtendSelection")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); tree.addSelectionPath(newPath); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectNextChangeLead")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); selectPath(tree, newPath); tree.setLeadSelectionPath(newPath); } } }
| 69 |
public void actionPerformed(ActionEvent e) { Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectPreviousChangeLead")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); selectPath(tree, new TreePath(getPathToRoot(prev, 0))); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectPreviousExtendSelection")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); tree.addSelectionPath(newPath); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectPrevious")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); selectPath(tree, new TreePath(getPathToRoot(prev, 0))); } } else if (e.getActionCommand().equals("selectNext")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); selectPath(tree, newPath); } } else if (e.getActionCommand().equals("selectNextExtendSelection")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); tree.addSelectionPath(newPath); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectNextChangeLead")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); selectPath(tree, newPath); tree.setLeadSelectionPath(newPath); } } }
|
public void actionPerformed(ActionEvent e) { Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectPreviousChangeLead")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); selectPath(tree, new TreePath(getPathToRoot(prev, 0))); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectPreviousExtendSelection")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); tree.addSelectionPath(newPath); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectPrevious")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); selectPath(tree, new TreePath(getPathToRoot(prev, 0))); } } else if (e.getActionCommand().equals("selectNext")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); selectPath(tree, newPath); } } else if (e.getActionCommand().equals("selectNextExtendSelection")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); tree.addSelectionPath(newPath); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectNextChangeLead")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); selectPath(tree, newPath); tree.setLeadSelectionPath(newPath); } } }
| 70 |
public boolean isEnabled() { return false; }
|
public boolean isEnabled() { return false; }
| 71 |
public TreeModelHandler() { }
|
public TreeModelHandler() { }
| 72 |
public void treeNodesChanged(TreeModelEvent e) { tree.repaint(); }
|
public void treeNodesChanged(TreeModelEvent e) { tree.repaint(); }
| 73 |
public void treeNodesChanged(TreeModelEvent e) { tree.repaint(); }
|
public void treeNodesChanged(TreeModelEvent e) { tree.repaint(); }
| 74 |
public void treeNodesInserted(TreeModelEvent e) { tree.repaint(); }
|
public void treeNodesInserted(TreeModelEvent e) { tree.repaint(); }
| 75 |
public void treeNodesInserted(TreeModelEvent e) { tree.repaint(); }
|
public void treeNodesInserted(TreeModelEvent e) { tree.repaint(); }
| 76 |
public void treeNodesRemoved(TreeModelEvent e) { tree.repaint(); }
|
public void treeNodesRemoved(TreeModelEvent e) { tree.repaint(); }
| 77 |
public void treeNodesRemoved(TreeModelEvent e) { tree.repaint(); }
|
public void treeNodesRemoved(TreeModelEvent e) { tree.repaint(); }
| 78 |
public void treeStructureChanged(TreeModelEvent e) { tree.repaint(); }
|
public void treeStructureChanged(TreeModelEvent e) { tree.repaint(); }
| 79 |
public void treeStructureChanged(TreeModelEvent e) { tree.repaint(); }
|
public void treeStructureChanged(TreeModelEvent e) { tree.repaint(); }
| 80 |
public TreePageAction(int direction, String name) { }
|
public TreePageAction(int direction, String name) { }
| 81 |
public void actionPerformed(ActionEvent e) { }
|
public void actionPerformed(ActionEvent e) { }
| 82 |
public boolean isEnabled() { return false; }
|
public boolean isEnabled() { return false; }
| 83 |
public TreeSelectionHandler() { }
|
public TreeSelectionHandler() { }
| 84 |
public void valueChanged(TreeSelectionEvent event) { if (tree.isEditing()) tree.cancelEditing(); }
|
public void valueChanged(TreeSelectionEvent event) { if (tree.isEditing()) tree.cancelEditing(); }
| 85 |
public void valueChanged(TreeSelectionEvent event) { if (tree.isEditing()) tree.cancelEditing(); }
|
public void valueChanged(TreeSelectionEvent event) { if (tree.isEditing()) tree.cancelEditing(); }
| 86 |
public TreeToggleAction(String name) { }
|
public TreeToggleAction(String name) { }
| 87 |
public void actionPerformed(ActionEvent e) { }
|
public void actionPerformed(ActionEvent e) { }
| 88 |
public boolean isEnabled() { return false; }
|
public boolean isEnabled() { return false; }
| 89 |
public TreeTraverseAction(int direction, String name) { }
|
public TreeTraverseAction(int direction, String name) { }
| 90 |
public void actionPerformed(ActionEvent e) { TreeModel mod = tree.getModel(); Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectParent")) { TreePath path = new TreePath(getPathToRoot(last, 0)); Object p = getParent(mod.getRoot(), last); if (!mod.isLeaf(last) && tree.isExpanded(path)) tree.collapsePath(path); else if (p != null) selectPath(tree, new TreePath(getPathToRoot(p, 0))); } else if (e.getActionCommand().equals("selectChild")) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!mod.isLeaf(last) && tree.isCollapsed(path)) tree.expandPath(path); else { Object next = getNextVisibleNode(last); if (next != null) selectPath(tree, new TreePath(getPathToRoot(next, 0))); } } }
|
public void actionPerformed(ActionEvent e) { TreeModel mod = tree.getModel(); Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectParent")) { TreePath path = new TreePath(getPathToRoot(last, 0)); Object p = getParent(mod.getRoot(), last); if (!mod.isLeaf(last) && tree.isExpanded(path)) tree.collapsePath(path); else if (p != null) selectPath(tree, new TreePath(getPathToRoot(p, 0))); } else if (e.getActionCommand().equals("selectChild")) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!mod.isLeaf(last) && tree.isCollapsed(path)) tree.expandPath(path); else { Object next = getNextVisibleNode(last); if (next != null) selectPath(tree, new TreePath(getPathToRoot(next, 0))); } } }
| 91 |
public void actionPerformed(ActionEvent e) { TreeModel mod = tree.getModel(); Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectParent")) { TreePath path = new TreePath(getPathToRoot(last, 0)); Object p = getParent(mod.getRoot(), last); if (!mod.isLeaf(last) && tree.isExpanded(path)) tree.collapsePath(path); else if (p != null) selectPath(tree, new TreePath(getPathToRoot(p, 0))); } else if (e.getActionCommand().equals("selectChild")) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!mod.isLeaf(last) && tree.isCollapsed(path)) tree.expandPath(path); else { Object next = getNextVisibleNode(last); if (next != null) selectPath(tree, new TreePath(getPathToRoot(next, 0))); } } }
|
public void actionPerformed(ActionEvent e) { TreeModel mod = tree.getModel(); Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectParent")) { TreePath path = new TreePath(getPathToRoot(last, 0)); Object p = getParent(treeModel.getRoot(), last); if (!mod.isLeaf(last) && tree.isExpanded(path)) tree.collapsePath(path); else if (p != null) selectPath(tree, new TreePath(getPathToRoot(p, 0))); } else if (e.getActionCommand().equals("selectChild")) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!mod.isLeaf(last) && tree.isCollapsed(path)) tree.expandPath(path); else { Object next = getNextVisibleNode(last); if (next != null) selectPath(tree, new TreePath(getPathToRoot(next, 0))); } } }
| 92 |
public void actionPerformed(ActionEvent e) { TreeModel mod = tree.getModel(); Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectParent")) { TreePath path = new TreePath(getPathToRoot(last, 0)); Object p = getParent(mod.getRoot(), last); if (!mod.isLeaf(last) && tree.isExpanded(path)) tree.collapsePath(path); else if (p != null) selectPath(tree, new TreePath(getPathToRoot(p, 0))); } else if (e.getActionCommand().equals("selectChild")) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!mod.isLeaf(last) && tree.isCollapsed(path)) tree.expandPath(path); else { Object next = getNextVisibleNode(last); if (next != null) selectPath(tree, new TreePath(getPathToRoot(next, 0))); } } }
|
public void actionPerformed(ActionEvent e) { TreeModel mod = tree.getModel(); Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectParent")) { TreePath path = new TreePath(getPathToRoot(last, 0)); Object p = getParent(mod.getRoot(), last); if (!treeModel.isLeaf(last) && tree.isExpanded(path)) tree.collapsePath(path); else if (p != null) selectPath(tree, new TreePath(getPathToRoot(p, 0))); } else if (e.getActionCommand().equals("selectChild")) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!mod.isLeaf(last) && tree.isCollapsed(path)) tree.expandPath(path); else { Object next = getNextVisibleNode(last); if (next != null) selectPath(tree, new TreePath(getPathToRoot(next, 0))); } } }
| 93 |
public void actionPerformed(ActionEvent e) { TreeModel mod = tree.getModel(); Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectParent")) { TreePath path = new TreePath(getPathToRoot(last, 0)); Object p = getParent(mod.getRoot(), last); if (!mod.isLeaf(last) && tree.isExpanded(path)) tree.collapsePath(path); else if (p != null) selectPath(tree, new TreePath(getPathToRoot(p, 0))); } else if (e.getActionCommand().equals("selectChild")) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!mod.isLeaf(last) && tree.isCollapsed(path)) tree.expandPath(path); else { Object next = getNextVisibleNode(last); if (next != null) selectPath(tree, new TreePath(getPathToRoot(next, 0))); } } }
|
public void actionPerformed(ActionEvent e) { TreeModel mod = tree.getModel(); Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectParent")) { TreePath path = new TreePath(getPathToRoot(last, 0)); Object p = getParent(mod.getRoot(), last); if (!mod.isLeaf(last) && tree.isExpanded(path)) tree.collapsePath(path); else if (p != null) selectPath(tree, new TreePath(getPathToRoot(p, 0))); } else if (e.getActionCommand().equals("selectChild")) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!treeModel.isLeaf(last) && tree.isCollapsed(path)) tree.expandPath(path); else { Object next = getNextVisibleNode(last); if (next != null) selectPath(tree, new TreePath(getPathToRoot(next, 0))); } } }
| 94 |
public void actionPerformed(ActionEvent e) { TreeModel mod = tree.getModel(); Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectParent")) { TreePath path = new TreePath(getPathToRoot(last, 0)); Object p = getParent(mod.getRoot(), last); if (!mod.isLeaf(last) && tree.isExpanded(path)) tree.collapsePath(path); else if (p != null) selectPath(tree, new TreePath(getPathToRoot(p, 0))); } else if (e.getActionCommand().equals("selectChild")) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!mod.isLeaf(last) && tree.isCollapsed(path)) tree.expandPath(path); else { Object next = getNextVisibleNode(last); if (next != null) selectPath(tree, new TreePath(getPathToRoot(next, 0))); } } }
|
public void actionPerformed(ActionEvent e) { TreeModel mod = tree.getModel(); Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectParent")) { TreePath path = new TreePath(getPathToRoot(last, 0)); Object p = getParent(mod.getRoot(), last); if (!mod.isLeaf(last) && tree.isExpanded(path)) tree.collapsePath(path); else if (p != null) selectPath(tree, new TreePath(getPathToRoot(p, 0))); } else if (e.getActionCommand().equals("selectChild")) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!mod.isLeaf(last) && tree.isCollapsed(path)) tree.expandPath(path); else { Object next = getNextVisibleNode(last); if (next != null) selectPath(tree, new TreePath(getPathToRoot(next, 0))); } } }
| 95 |
public boolean isEnabled() { return false; }
|
public boolean isEnabled() { return false; }
| 96 |
public BasicTreeUI() { drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); configureLayoutCache(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; }
|
public BasicTreeUI() { drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); configureLayoutCache(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; }
| 97 |
public BasicTreeUI() { drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); configureLayoutCache(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; }
|
public BasicTreeUI() { drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); configureLayoutCache(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; }
| 98 |
public BasicTreeUI() { drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); configureLayoutCache(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; }
|
public BasicTreeUI() { drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); configureLayoutCache(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; }
| 99 |
public void cancelEditing(JTree tree) { if (isEditing(tree)) completeEditing(false, true, false); }
|
public void cancelEditing(JTree tree) { if (isEditing(tree)) completeEditing(false, true, false); }
| 100 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.