T5APR
Collection
Data and models related to T5APR. • 15 items • Updated
rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public synchronized StringBuffer append(char ch) | public StringBuffer append(Object obj) | public synchronized StringBuffer append(char ch) { ensureCapacity_unsynchronized(count + 1); value[count++] = ch; return this; } |
ensureCapacity_unsynchronized(count + 1); value[count++] = ch; return this; | return append(obj == null ? "null" : obj.toString()); | public synchronized StringBuffer append(char ch) { ensureCapacity_unsynchronized(count + 1); value[count++] = ch; return this; } |
public String substring(int beginIndex, int endIndex) | public String substring(int begin) | 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 co... |
if (beginIndex < 0 || endIndex > count || beginIndex > endIndex) throw new StringIndexOutOfBoundsException(); if (beginIndex == 0 && endIndex == count) return this; int len = endIndex - beginIndex; return new String(value, beginIndex + offset, len, (len << 2) >= value.length); | return substring(begin, count); | 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 co... |
public Object next() { | public FSEntry next() { | public Object next() { String fs = (String)fileSystemsRoots.next(); return new virtualFSEntry(fs); } |
return getEntry("/" + name); | for(FSEntryIterator it = iterator() ; it.hasNext() ; ) { FSEntry entry = it.next(); if(entry.getName().equals(name)) return entry; } throw new IOException("Entry not found: "+name); | public FSEntry getEntry(String name) throws IOException { return getEntry("/" + name); } |
public Iterator iterator() { | public FSEntryIterator iterator() { | public Iterator iterator() { return new RootsIterator(fsm.fileSystemRoots().iterator()); } |
for (Iterator i = entry.getDirectory().iterator(); i.hasNext();) { | for (FSEntryIterator i = entry.getDirectory().iterator(); i.hasNext();) { | 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); } ... |
public synchronized FileSystem getFileSystem(String rootName) { return (FileSystem)filesystems.get(rootName); | public synchronized FileSystem getFileSystem(Device device) { return (FileSystem)filesystems.get(getMountPoint(device)); | public synchronized FileSystem getFileSystem(String rootName) { return (FileSystem)filesystems.get(rootName); } |
attribHash.put("lessThanValue", new XMLAttribute(null, Constants.STRING_OR_NUMBER_TYPE)); attribHash.put("lessThanOrEqualValue", new XMLAttribute(null, Constants.STRING_OR_NUMBER_TYPE)); attribHash.put("greaterThanValue", new XMLAttribute(null, Constants.STRING_OR_NUMBER_TYPE)); attribHash.put("greaterThanOrEqualValue"... | private void init() { classXDFNodeName = "dataFormat"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD //the order of the attributes that all sub-classses should have attribOrder.add(0,"noDataValue"); attribOrder.add(0,"infiniteNegativeValue"); attribOrder.add... | |
public DriverException(String message, Throwable cause) { super(message, cause); | public DriverException() { super(); | public DriverException(String message, Throwable cause) { super(message, cause); } |
Point click = e.getPoint(); int row = Math.round(click.y / getRowHeight()); | Point click = e.getPoint(); | 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; ... |
if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = getPathBounds(tree, path); | if (path != null) { bounds = getPathBounds(tree, path); int row = getRowForPath(tree, path); boolean cntlClick = isLocationInExpandControl(path, click.x, click.y); | 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; ... |
bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; | if (isLeaf(row)) { bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; } else if (tree.isExpanded(path) && expandedIcon != null) bounds.width += expandedIcon.getIconWidth() + 4; else if (collapsedIcon != null) bounds.width += collapsedIcon.getIconWidth() + 4; | 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; ... |
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; | boolean inBounds = bounds.contains(click.x, click.y); | 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; ... |
if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } if (!cntlClick && tree.isEditable()) | if (inBounds && e.getClickCount() == 2 && !isLeaf(row)) toggleExpandState(path); if (cntlClick) { handleExpandControlClick(path, click.x, click.y); if (cellEditor != null) cellEditor.cancelCellEditing(); } else if (tree.isEditable()) | 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; ... |
Object curr = getNextVisibleNode(tree.getModel().getRoot()); | Object curr = getNextVisibleNode(treeModel.getRoot()); | public void actionPerformed(ActionEvent e) { TreePath lead = tree.getLeadSelectionPath(); if (e.getActionCommand().equals("selectPreviousChangeLead") || e.getActionCommand().equals("selectPreviousExtendSelection") || e.getActionCommand().equals("selectPrevious") || e.getActio... |
if (!tree.getModel().isLeaf(last)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } | if (!treeModel.isLeaf(last)) toggleExpandState(path); | public void actionPerformed(ActionEvent e) { TreePath lead = tree.getLeadSelectionPath(); if (e.getActionCommand().equals("selectPreviousChangeLead") || e.getActionCommand().equals("selectPreviousExtendSelection") || e.getActionCommand().equals("selectPrevious") || e.getActio... |
public TreeCancelEditingAction() { } | public TreeCancelEditingAction(String name) { } | public TreeCancelEditingAction() { } |
{ TreeModel mod = tree.getModel(); | { | 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.get... |
Object p = getParent(mod.getRoot(), last); | Object p = getParent(treeModel.getRoot(), last); | 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.get... |
if (!mod.isLeaf(last) && tree.isExpanded(path)) | if (!treeModel.isLeaf(last) && tree.isExpanded(path)) | 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.get... |
if (!mod.isLeaf(last) && tree.isCollapsed(path)) | if (!treeModel.isLeaf(last) && tree.isCollapsed(path)) | 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.get... |
int mouseY) { } | int mouseY) { if (isLocationInExpandControl(path, mouseX, mouseY)) toggleExpandState(path); } | protected void checkForClickInExpandControl(TreePath path, int mouseX, int mouseY) { // FIXME: not implemented } |
{ return null; } | { return new NodeDimensionsHandler(); } | protected AbstractLayoutCache.NodeDimensions createNodeDimensions() { // FIXME: not implemented return null; } |
{ } | { if (beginRow < endRow) { int temp = endRow; endRow = beginRow; beginRow = temp; } for (int i = beginRow; i < endRow; i++) { TreePath path = getPathForRow(tree, i); if (!tree.isVisible(path)) tree.makeVisible(path); } } | protected void ensureRowsAreVisible(int beginRow, int endRow) { // FIXME: not implemented } |
TreeModel mod = tree.getModel(); | private Object findNode(Object root, Object node) { TreeModel mod = tree.getModel(); int size = 0; if (!mod.isLeaf(root)) size = mod.getChildCount(root); for (int i = 0; i < size; i++) { if (mod.getIndexOfChild(root, node) != -1) return root; Object n = findNode(mod.getCh... | |
if (!mod.isLeaf(root)) size = mod.getChildCount(root); | if (!treeModel.isLeaf(root)) size = treeModel.getChildCount(root); | private Object findNode(Object root, Object node) { TreeModel mod = tree.getModel(); int size = 0; if (!mod.isLeaf(root)) size = mod.getChildCount(root); for (int i = 0; i < size; i++) { if (mod.getIndexOfChild(root, node) != -1) return root; Object n = findNode(mod.getCh... |
if (mod.getIndexOfChild(root, node) != -1) | if (treeModel.getIndexOfChild(root, node) != -1) | private Object findNode(Object root, Object node) { TreeModel mod = tree.getModel(); int size = 0; if (!mod.isLeaf(root)) size = mod.getChildCount(root); for (int i = 0; i < size; i++) { if (mod.getIndexOfChild(root, node) != -1) return root; Object n = findNode(mod.getCh... |
Object n = findNode(mod.getChild(root, i), node); | Object n = findNode(treeModel.getChild(root, i), node); | private Object findNode(Object root, Object node) { TreeModel mod = tree.getModel(); int size = 0; if (!mod.isLeaf(root)) size = mod.getChildCount(root); for (int i = 0; i < size; i++) { if (mod.getIndexOfChild(root, node) != -1) return root; Object n = findNode(mod.getCh... |
return getCellLocation(x, y + rowHeight, tree, mod, node, getNextVisibleNode(startNode)); } | Point getCellLocation(int x, int y, JTree tree, TreeModel mod, Object node, Object startNode) { int rowHeight = getRowHeight(); if (startNode == null || startNode.equals(node)) { if (!tree.isRootVisible() && tree.isExpanded(new TreePath(mod.getRoot()))) re... | |
{ return 0; } | { return rightChildIndent / 2; } | protected int getHorizontalLegBuffer() { // FIXME: not implemented return 0; } |
current = getParent(tree.getModel().getRoot(), current); | current = getParent(treeModel.getRoot(), current); | int getLevel(Object node) { int count = -1; Object current = node; do { current = getParent(tree.getModel().getRoot(), current); count++; } while (current != null); return count; } |
{ return getPreferredSize(c); } | { if (c instanceof JTree) return ((JTree) c).getPreferredSize(); return new Dimension(); } | public Dimension getMaximumSize(JComponent c) { // FIXME: not implemented return getPreferredSize(c); } |
{ return getPreferredSize(c); } | { Dimension min = getPreferredMinSize(); if (min == null) return new Dimension(); return min; } | public Dimension getMinimumSize(JComponent c) { // FIXME: not implemented return getPreferredSize(c); } |
TreeModel mod = tree.getModel(); if (!mod.isLeaf(curr) && mod.getChildCount(curr) > 0) return mod.getChild(curr, 0); | if (!treeModel.isLeaf(curr) && treeModel.getChildCount(curr) > 0) return treeModel.getChild(curr, 0); | Object getNextNode(Object curr) { TreeModel mod = tree.getModel(); if (!mod.isLeaf(curr) && mod.getChildCount(curr) > 0) return mod.getChild(curr, 0); Object node = curr; Object sibling = null; do { sibling = getNextSibling(node); node = getParent(mod.getRoot(), node); ... |
node = getParent(mod.getRoot(), node); | node = getParent(treeModel.getRoot(), node); | Object getNextNode(Object curr) { TreeModel mod = tree.getModel(); if (!mod.isLeaf(curr) && mod.getChildCount(curr) > 0) return mod.getChild(curr, 0); Object node = curr; Object sibling = null; do { sibling = getNextSibling(node); node = getParent(mod.getRoot(), node); ... |
TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); | Object parent = getParent(treeModel.getRoot(), node); | Object getNextSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) + 1; int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (ind... |
int index = mod.getIndexOfChild(parent, node) + 1; | int index = treeModel.getIndexOfChild(parent, node) + 1; | Object getNextSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) + 1; int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (ind... |
if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); | if (!treeModel.isLeaf(parent)) size = treeModel.getChildCount(parent); | Object getNextSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) + 1; int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (ind... |
return mod.getChild(parent, index); | return treeModel.getChild(parent, index); | Object getNextSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) + 1; int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (ind... |
TreeModel mod = tree.getModel(); if (mod != null) | if (treeModel != null) | public Rectangle getPathBounds(JTree tree, TreePath path) { if (path != null) { Object cell = path.getLastPathComponent(); TreeModel mod = tree.getModel(); if (mod != null) { Object root = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new Tr... |
Object root = mod.getRoot(); | Object root = treeModel.getRoot(); | public Rectangle getPathBounds(JTree tree, TreePath path) { if (path != null) { Object cell = path.getLastPathComponent(); TreeModel mod = tree.getModel(); if (mod != null) { Object root = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new Tr... |
Point loc = getCellLocation(0, 0, tree, mod, cell, root); return getCellBounds(loc.x, loc.y, cell); | Point loc = getCellLocation(0, 0, tree, treeModel, cell, root); return getCellBounds(loc.x, loc.y, cell); } | public Rectangle getPathBounds(JTree tree, TreePath path) { if (path != null) { Object cell = path.getLastPathComponent(); TreeModel mod = tree.getModel(); if (mod != null) { Object root = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new Tr... |
} return null; } | return null; } | public Rectangle getPathBounds(JTree tree, TreePath path) { if (path != null) { Object cell = path.getLastPathComponent(); TreeModel mod = tree.getModel(); if (mod != null) { Object root = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new Tr... |
{ TreeModel mod = tree.getModel(); if (mod != null) | { if (treeModel != null) | public TreePath getPathForRow(JTree tree, int row) { TreeModel mod = tree.getModel(); if (mod != null) { Object node = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node); for (int i = 0; i < row; i++) n... |
Object node = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node); | Object node = treeModel.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node); | public TreePath getPathForRow(JTree tree, int row) { TreeModel mod = tree.getModel(); if (mod != null) { Object node = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node); for (int i = 0; i < row; i++) n... |
TreeModel mod = tree.getModel(); | Object[] getPathToRoot(Object node, int depth) { TreeModel mod = tree.getModel(); if (node == null) { if (depth == 0) return null; return new Object[depth]; } Object[] path = getPathToRoot(getParent(mod.getRoot(), node), depth + 1); path[path.length - depth - 1] =... | |
Object[] path = getPathToRoot(getParent(mod.getRoot(), node), depth + 1); | Object[] path = getPathToRoot(getParent(treeModel.getRoot(), node), depth + 1); | Object[] getPathToRoot(Object node, int depth) { TreeModel mod = tree.getModel(); if (node == null) { if (depth == 0) return null; return new Object[depth]; } Object[] path = getPathToRoot(getParent(mod.getRoot(), node), depth + 1); path[path.length - depth - 1] =... |
TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); | Object parent = getParent(treeModel.getRoot(), node); | Object getPreviousNode(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; Object sibling = getPreviousSibling(node); if (sibling == null) return parent; int size = 0; if (!mod.isLeaf(sibling)) size =... |
if (!mod.isLeaf(sibling)) size = mod.getChildCount(sibling); | if (!treeModel.isLeaf(sibling)) size = treeModel.getChildCount(sibling); | Object getPreviousNode(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; Object sibling = getPreviousSibling(node); if (sibling == null) return parent; int size = 0; if (!mod.isLeaf(sibling)) size =... |
{ sibling = mod.getChild(sibling, size - 1); if (!mod.isLeaf(sibling)) size = mod.getChildCount(sibling); | { sibling = treeModel.getChild(sibling, size - 1); if (!treeModel.isLeaf(sibling)) size = treeModel.getChildCount(sibling); | Object getPreviousNode(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; Object sibling = getPreviousSibling(node); if (sibling == null) return parent; int size = 0; if (!mod.isLeaf(sibling)) size =... |
TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); | Object parent = getParent(treeModel.getRoot(), node); | Object getPreviousSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) - 1; int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (ind... |
int index = mod.getIndexOfChild(parent, node) - 1; | int index = treeModel.getIndexOfChild(parent, node) - 1; | Object getPreviousSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) - 1; int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (ind... |
if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); | if (!treeModel.isLeaf(parent)) size = treeModel.getChildCount(parent); | Object getPreviousSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) - 1; int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (ind... |
return mod.getChild(parent, index); | return treeModel.getChild(parent, index); | Object getPreviousSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) - 1; int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (ind... |
{ TreeModel mod = tree.getModel(); | { | public int getRowCount(JTree tree) { TreeModel mod = tree.getModel(); int count = 0; if (mod != null) { Object node = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath((getPathToRoot(node, 0))))) node = getNextNode(node); while (node != null) ... |
if (mod != null) | if (treeModel != null) | public int getRowCount(JTree tree) { TreeModel mod = tree.getModel(); int count = 0; if (mod != null) { Object node = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath((getPathToRoot(node, 0))))) node = getNextNode(node); while (node != null) ... |
Object node = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath((getPathToRoot(node, 0))))) node = getNextNode(node); while (node != null) { count++; node = getNextVisibleNode(node); | Object node = treeModel.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath((getPathToRoot(node, 0))))) node = getNextNode(node); while (node != null) { count++; node = getNextVisibleNode(node); } | public int getRowCount(JTree tree) { TreeModel mod = tree.getModel(); int count = 0; if (mod != null) { Object node = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath((getPathToRoot(node, 0))))) node = getNextNode(node); while (node != null) ... |
} return count; } | return count; } | public int getRowCount(JTree tree) { TreeModel mod = tree.getModel(); int count = 0; if (mod != null) { Object node = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath((getPathToRoot(node, 0))))) node = getNextNode(node); while (node != null) ... |
{ int row = path.getPathCount(); if (tree.isVisible(path)) return row; path = path.getParentPath(); while (row > 0 && !tree.isVisible(path)) | { int row = 0; Object dest = path.getLastPathComponent(); Object curr = treeModel.getRoot(); while (curr != null && !curr.equals(dest)) | public int getRowForPath(JTree tree, TreePath path) { int row = path.getPathCount(); if (tree.isVisible(path)) return row; path = path.getParentPath(); while (row > 0 && !tree.isVisible(path)) { path = path.getParentPath(); row--; } return row; } |
path = path.getParentPath(); row--; | ++row; curr = getNextVisibleNode(curr); | public int getRowForPath(JTree tree, TreePath path) { int row = path.getPathCount(); if (tree.isVisible(path)) return row; path = path.getParentPath(); while (row > 0 && !tree.isVisible(path)) { path = path.getParentPath(); row--; } return row; } |
{ return 0; } | { return getRowHeight() / 2; } | protected int getVerticalLegBuffer() { // FIXME: not implemented return 0; } |
{ } | { toggleExpandState(path); } | protected void handleExpandControlClick(TreePath path, int mouseX, int mouseY) { // FIXME: not implemented } |
{ if (UIManager.getLookAndFeelDefaults().getIcon("Tree.expandedIcon") == null || UIManager.getLookAndFeelDefaults().getIcon("Tree.collapsedIcon") == null) return false; | { if (UIManager.getLookAndFeelDefaults().getIcon("Tree.expandedIcon") != null || UIManager.getLookAndFeelDefaults().getIcon("Tree.collapsedIcon") != null) | boolean hasControlIcons() { if (UIManager.getLookAndFeelDefaults().getIcon("Tree.expandedIcon") == null || UIManager.getLookAndFeelDefaults().getIcon("Tree.collapsedIcon") == null) return false; return true; } |
} | return false; } | boolean hasControlIcons() { if (UIManager.getLookAndFeelDefaults().getIcon("Tree.expandedIcon") == null || UIManager.getLookAndFeelDefaults().getIcon("Tree.collapsedIcon") == null) return false; return true; } |
{ } | { currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellRenderer(currentCellRenderer); } | protected void installComponents() { // FIXME: not implemented } |
} | tree.setScrollsOnExpand(defaults.getBoolean("Tree.scrollsOnExpand")); setExpandedIcon(defaults.getIcon("Tree.expandedIcon")); setCollapsedIcon(defaults.getIcon("Tree.collapsedIcon")); } | protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); rightChildIndent = defaults.getInt("... |
{ super.installUI(c); tree = (JTree) c; | { prepareForUIInstall(); super.installUI(c); tree = (JTree) c; | public void installUI(JComponent c) { super.installUI(c); tree = (JTree) c; installDefaults(); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; isEditing = f... |
currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; | installComponents(); | public void installUI(JComponent c) { super.installUI(c); tree = (JTree) c; installDefaults(); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; isEditing = f... |
Object node = pathForRow.getLastPathComponent(); return tree.getModel().isLeaf(node); } | Object node = pathForRow.getLastPathComponent(); return treeModel.isLeaf(node); } | protected boolean isLeaf(int row) { TreePath pathForRow = getPathForRow(tree, row); if (pathForRow == null) return true; Object node = pathForRow.getLastPathComponent(); return tree.getModel().isLeaf(node); } |
int mouseY) { return false; } | int mouseY) { boolean cntlClick = false; int row = getRowForPath(tree, path); if (!isLeaf(row)) { if (bounds == null) bounds = getPathBounds(tree, path); if (tree.isExpanded(path) && expandedIcon != null) bounds.x -= expandedIcon.getIconWidth() - 4; else if (collapsedIcon != null) bounds.x -= collapsedIcon.getIconWidt... | protected boolean isLocationInExpandControl(TreePath path, int mouseX, int mouseY) { // FIXME: not implemented return false; } |
{ return false; } | { return (tree.getSelectionModel().getSelectionMode() == TreeSelectionModel.CONTIGUOUS_TREE_SELECTION); } | protected boolean isMultiSelectEvent(MouseEvent event) { // FIXME: not implemented return false; } |
{ return false; } | { return true; } | protected boolean isToggleEvent(MouseEvent event) { // FIXME: not implemented return false; } |
{ return false; } | { return (tree.getSelectionModel().getSelectionMode() == TreeSelectionModel.SINGLE_TREE_SELECTION); } | protected boolean isToggleSelectionEvent(MouseEvent event) { // FIXME: not implemented return false; } |
TreeModel mod = tree.getModel(); | if (treeModel != null) { Object root = treeModel.getRoot(); | public void paint(Graphics g, JComponent c) { JTree tree = (JTree) c; TreeModel mod = tree.getModel(); if (mod != null) { Object root = mod.getRoot(); if (!tree.isRootVisible()) tree.expandPath(new TreePath(root)); paintRecursive(g, 0, 0, 0, 0, tree, mod, root); if ... |
if (mod != null) { Object root = mod.getRoot(); if (!tree.isRootVisible()) tree.expandPath(new TreePath(root)); paintRecursive(g, 0, 0, 0, 0, tree, mod, root); if (hasControlIcons()) paintControlIcons(g, 0, 0, 0, 0, tree, mod, root); } | paintRecursive(g, 0, 0, 0, 0, tree, treeModel, root); if (hasControlIcons()) paintControlIcons(g, 0, 0, 0, 0, tree, treeModel, root); } | public void paint(Graphics g, JComponent c) { JTree tree = (JTree) c; TreeModel mod = tree.getModel(); if (mod != null) { Object root = mod.getRoot(); if (!tree.isRootVisible()) tree.expandPath(new TreePath(root)); paintRecursive(g, 0, 0, 0, 0, tree, mod, root); if ... |
{ int h = descent; int rowHeight = getRowHeight(); Icon ei = UIManager.getLookAndFeelDefaults().getIcon("Tree.expandedIcon"); Icon ci = UIManager.getLookAndFeelDefaults().getIcon("Tree.collapsedIcon"); Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + cli... | { int h = descent; int rowHeight = getRowHeight(); TreePath path = new TreePath(getPathToRoot(node, 0)); Icon icon = getCurrentControlIcon(path); Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return descent; if (mod.isL... | int paintControlIcons(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object node) { int h = descent; int rowHeight = getRowHeight(); Icon ei = UIManager.getLookAndFeelDefaults().getIcon("Tree.expandedIcon")... |
if (tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) { if (!node.equals(mod.getRoot())) ei.paintIcon(tree, g, indentation - rightChildIndent - 3, h); | if (!node.equals(mod.getRoot())) icon.paintIcon(tree, g, indentation - rightChildIndent - 3, h); if (tree.isExpanded(path)) { | int paintControlIcons(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object node) { int h = descent; int rowHeight = getRowHeight(); Icon ei = UIManager.getLookAndFeelDefaults().getIcon("Tree.expandedIcon")... |
} } else if (!node.equals(mod.getRoot())) ci.paintIcon(tree, g, indentation - rightChildIndent - 3, descent - getRowHeight()); | } } | int paintControlIcons(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object node) { int h = descent; int rowHeight = getRowHeight(); Icon ei = UIManager.getLookAndFeelDefaults().getIcon("Tree.expandedIcon")... |
Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) | Rectangle clip = tree.getVisibleRect(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) | int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return de... |
{ g.setColor(getHashColor()); heightOfLine = descent + halfHeight; g.drawLine(indentation + halfWidth, heightOfLine, indentation + rightChildIndent, heightOfLine); } | { g.setColor(getHashColor()); heightOfLine = descent + halfHeight; paintHorizontalLine(g, (JComponent) tree, heightOfLine, indentation + halfWidth, indentation + rightChildIndent); } | int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return de... |
} | int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return de... | |
{ g.setColor(getHashColor()); g.drawLine(indentation + halfWidth, y0, indentation + halfWidth, heightOfLine); } return descent; } | { g.setColor(getHashColor()); paintVerticalLine(g, (JComponent) tree, indentation + halfWidth, y0, heightOfLine); } return descent; } | int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return de... |
if (tree.getSelectionModel().getSelectionMode() == TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION) { | if (tree.getSelectionModel().getSelectionMode() == TreeSelectionModel.SINGLE_TREE_SELECTION) { tree.getSelectionModel().clearSelection(); | void selectPath(JTree tree, TreePath path) { if (path != null) { if (tree.getSelectionModel().getSelectionMode() == TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION) { tree.addSelectionPath(path); tree.setLeadSelectionPath(path); } else if (tree.getSelec... |
} else { tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); tree.getSelectionModel().clearSelection(); | } else { | void selectPath(JTree tree, TreePath path) { if (path != null) { if (tree.getSelectionModel().getSelectionMode() == TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION) { tree.addSelectionPath(path); tree.setLeadSelectionPath(path); } else if (tree.getSelec... |
} | tree.getSelectionModel().setSelectionMode (TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); } | void selectPath(JTree tree, TreePath path) { if (path != null) { if (tree.getSelectionModel().getSelectionMode() == TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION) { tree.addSelectionPath(path); tree.setLeadSelectionPath(path); } else if (tree.getSelec... |
{ } | { if (isToggleSelectionEvent(event)) { if (tree.isPathSelected(path)) tree.removeSelectionPath(path); else { tree.addSelectionPath(path); tree.setAnchorSelectionPath(path); } } else if (isMultiSelectEvent(event)) { TreePath anchor = tree.getAnchorSelectionPath(); if (anchor != null) { int aRow = getRowForPath(tree, anc... | protected void selectPathForEvent(TreePath path, MouseEvent event) { // FIXME: not implemented } |
{ currentCellRenderer = tcr; tree.setCellRenderer(tcr); updateRenderer(); } | { currentCellRenderer = tcr; updateRenderer(); } | protected void setCellRenderer(TreeCellRenderer tcr) { currentCellRenderer = tcr; tree.setCellRenderer(tcr); updateRenderer(); } |
{ } | { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } | protected void toggleExpandState(TreePath path) { // FIXME: not implemented } |
{ } | { currentCellRenderer = null; rendererPane = null; createdRenderer = false; setCellRenderer(currentCellRenderer); } | protected void uninstallComponents() { // FIXME: not implemented } |
TreeModel tm = tree.getModel(); if (tm != null) tm.removeTreeModelListener(treeModelListener); } | if (treeModel != null) treeModel.removeTreeModelListener(treeModelListener); } | protected void uninstallListeners() { tree.removePropertyChangeListener(propertyChangeListener); tree.removeFocusListener(focusListener); tree.removeTreeSelectionListener(treeSelectionListener); tree.removeMouseListener(mouseInputListener); tree.removeKeyListener(keyListener); tree.removePropertyChangeListener(s... |
{ | { prepareForUIUninstall(); | public void uninstallUI(JComponent c) { uninstallDefaults(); uninstallKeyboardActions(); uninstallListeners(); tree = null; completeUIUninstall(); } |
uninstallKeyboardActions(); uninstallListeners(); tree = null; completeUIUninstall(); } | uninstallKeyboardActions(); uninstallListeners(); tree = null; uninstallComponents(); completeUIUninstall(); } | public void uninstallUI(JComponent c) { uninstallDefaults(); uninstallKeyboardActions(); uninstallListeners(); tree = null; completeUIUninstall(); } |
{ } | { depthOffset += getVerticalLegBuffer(); } | protected void updateDepthOffset() { // FIXME: not implemented } |
{ } | { Enumeration expanded = tree.getExpandedDescendants(path); while (expanded.hasMoreElements()) treeState.setExpandedState(((TreePath) expanded.nextElement()), true); } | protected void updateExpandedDescendants(TreePath path) { // FIXME: not implemented } |
{ } | { if (treeModel != null) updateExpandedDescendants(new TreePath(getPathToRoot(treeModel. getRoot(), 0))); } | protected void updateLayoutCacheExpandedNodes() { // FIXME: not implemented } |
{ } | { if (tree != null) tree.setCellRenderer(currentCellRenderer); } | protected void updateRenderer() { // FIXME: not implemented } |
{ } | { preferredSize = null; updateCachedPreferredSize(); tree.treeDidChange(); } | protected void updateSize() { // FIXME: not implemented } |
public void remove(Component comp) | public void remove(int index) | public void remove(Component comp) { synchronized (getTreeLock ()) { for (int i = 0; i < ncomponents; ++i) { if (component[i] == comp) { remove(i); break; } } } } |
No dataset card yet