rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if (clickCount == 2)
if (clickCount == 2 || cntlClick == true)
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; TreePath path = BasicTreeUI.this.tree.getPathForRow(row); if (path == null) { // nothing should be selected if user clicks outside of tree BasicT...
BasicTreeUI.this.tree.getSelectionModel().clearSelection();
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; TreePath path = BasicTreeUI.this.tree.getPathForRow(row); if (path == null) { // nothing should be selected if user clicks outside of tree BasicT...
}
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; TreePath path = BasicTreeUI.this.tree.getPathForRow(row); if (path == null) { // nothing should be selected if user clicks outside of tree BasicT...
private Rectangle getCellBounds(int x, int y, Object cell)
Rectangle getCellBounds(int x, int y, Object cell)
private Rectangle getCellBounds(int x, int y, Object cell) { if (cell != null) { String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(tree.getFont()); // add 22 to width for icon, FIXME later return new Rectangle(x, y, SwingUtilities.compu...
return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s) + 22, fm.getHeight());
return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s), fm.getHeight());
private Rectangle getCellBounds(int x, int y, Object cell) { if (cell != null) { String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(tree.getFont()); // add 22 to width for icon, FIXME later return new Rectangle(x, y, SwingUtilities.compu...
return treeState.getPathClosestTo(x, y);
int row = Math.round(y / getRowHeight()); TreePath path = getPathForRow(tree, row); while (row > 0 && path == null) { --row; path = getPathForRow(tree, row); } return path;
public TreePath getClosestPathForLocation(JTree tree, int x, int y) { return treeState.getPathClosestTo(x, y); }
private DefaultMutableTreeNode getNextVisibleNode(DefaultMutableTreeNode node)
DefaultMutableTreeNode getNextVisibleNode(DefaultMutableTreeNode node)
private DefaultMutableTreeNode getNextVisibleNode(DefaultMutableTreeNode node) { DefaultMutableTreeNode next = null; TreePath current = null; if (node != null) next = node.getNextNode(); if (next != null) { current = new TreePath(next.getPath()); if (tree.isVisible(...
if (path != null) { Object cell = path.getLastPathComponent(); TreeModel mod = tree.getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode) mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(((DefaultMutableTreeNode) root) .getPath()))) root = root.getNextNode(); Point loc = getCellLoc...
public Rectangle getPathBounds(JTree tree, TreePath path) { // FIXME: not implemented return null; }
if (!tree.isRootVisible() && tree.isExpanded(new TreePath(((DefaultMutableTreeNode) node) .getPath()))) node = node.getNextNode();
public TreePath getPathForRow(JTree tree, int row) { DefaultMutableTreeNode node = ((DefaultMutableTreeNode) (tree.getModel()) .getRoot()); for (int i = 0; i < row; i++) node = getNextVisibleNode(node); // in case nothing was found if (node == null) return null; // somet...
private DefaultMutableTreeNode getPreviousVisibleNode
DefaultMutableTreeNode getPreviousVisibleNode
private DefaultMutableTreeNode getPreviousVisibleNode (DefaultMutableTreeNode node) { DefaultMutableTreeNode prev = null; TreePath current = null; if (node != null) prev = node.getPreviousNode(); if (prev != null) { current = new ...
if (!tree.isRootVisible() && tree.isExpanded(new TreePath(((DefaultMutableTreeNode) node) .getPath()))) node = node.getNextNode();
public int getRowCount(JTree tree) { DefaultMutableTreeNode node = ((DefaultMutableTreeNode) (tree.getModel()) .getRoot()); int count = 0; while (node != null) { count++; node = getNextVisibleNode(node); } return count; }
tree.setRootVisible(true); tree.expandPath(new TreePath(((DefaultMutableTreeNode) (tree.getModel()).getRoot()).getPath()));
public void installUI(JComponent c) { super.installUI(c); installDefaults((JTree) c); tree = (JTree) c; setModel(tree.getModel()); treeSelectionModel = tree.getSelectionModel(); installListeners(); installKeyboardActions(); completeUIInstall(); }
return treeState.isRootVisible();
return tree.isRootVisible();
protected boolean isRootVisible() { return treeState.isRootVisible(); }
g.translate(10, 10); paintRecursive(g, 0, 0, 0, 0, tree, mod, mod.getRoot()); g.translate(-10, -10);
Object root = mod.getRoot(); if (!tree.isRootVisible()) tree.expandPath(new TreePath(((DefaultMutableTreeNode) root) .getPath())); paintRecursive(g, 0, 0, 0, 0, tree, mod, root); if (hasControlIcons()) paintControlIcons(g, 0, 0, 0, 0, tree, mod, root); TreePath lead = tree.getLeadSelectionPath(); if (lead != null &...
public void paint(Graphics g, JComponent c) { JTree tree = (JTree) c; TreeModel mod = tree.getModel(); g.translate(10, 10); paintRecursive(g, 0, 0, 0, 0, tree, mod, mod.getRoot()); g.translate(-10, -10); }
private int paintRecursive(Graphics g, int indentation, int descent,
int paintRecursive(Graphics g, int indentation, int descent,
private 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 descent; int...
paintLeaf(g, indentation, descent, tree, curr);
paintNode(g, indentation + 4, descent, tree, curr, true);
private 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 descent; int...
if (depth > 0 || tree.isRootVisible())
if (depth > 0 || isRootVisible)
private 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 descent; int...
paintNonLeaf(g, indentation, descent, tree, curr);
paintNode(g, indentation + 4, descent, tree, curr, false);
private 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 descent; int...
g.drawLine(indentation + halfWidth, heightOfLine, indentation + rightChildIndent, heightOfLine); descent = paintRecursive(g, indentation + rightChildIndent,
g.drawLine(indentation + halfWidth, heightOfLine, indentation + rightChildIndent, heightOfLine); } descent = paintRecursive(g, indent,
private 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 descent; int...
private void selectPath(JTree tree, TreePath path)
void selectPath(JTree tree, TreePath path)
private void selectPath(JTree tree, TreePath path) { if (path != null) { if (tree.isPathSelected(path)) tree.removeSelectionPath(path); else if (tree.getSelectionModel().getSelectionMode() == TreeSelectionModel.SINGLE_TREE_SELECTION) { tree.get...
treeState.setModel(model);
tree.setModel(model);
protected void setModel(TreeModel model) { treeState.setModel(model); treeModel = model; }
treeState.setRootVisible(newValue);
tree.setRootVisible(newValue);
protected void setRootVisible(boolean newValue) { treeState.setRootVisible(newValue); }
public void firePropertyChange(String propertyName, Object oldValue,
protected void firePropertyChange(String propertyName, Object oldValue,
public void firePropertyChange(String propertyName, Object oldValue, Object newValue) { // Does nothing. }
if (name.startsWith("org.mmtk.")) {
if (name.startsWith("org.mmtk.") || type.isEnum()) {
protected void copyStaticFields(VmSystemClassLoader cl, VmSharedStatics sharedStatics, VmIsolatedStatics isolatedStatics, NativeStream os, ObjectEmitter emitter) throws ClassNotFoundException { for (VmType< ? > type : cl.getLoadedClasses()) { final String name = ty...
loadClass(VmArchitecture.Space.class).link();
loadClass(VirtualMemoryRegion.class).link();
private final void doExecute() throws BuildException { debug = (getProject().getProperty("jnode.debug") != null); final long lmKernel = kernelFile.lastModified(); final long lmDest = destFile.lastModified(); final long lmPIL = getPluginListFile().lastModified(); if (version == nul...
if(annotation == null) clss[0] = RMIClassLoader.loadClass(intfs[0]);
for (int i = 0; i < intfs.length; i++) { if (annotation == null) clss[i] = RMIClassLoader.loadClass(intfs[i]); else clss[i] = RMIClassLoader.loadClass(annotation, intfs[i]); } ClassLoader loader; if (clss.length > 0) { ArrayList loaders = new ArrayList(intfs.length); ClassLoader cx; for (int i = 0; i < clss.length; ...
protected Class resolveProxyClass(String intfs[]) throws IOException, ClassNotFoundException{ String annotation = (String)getAnnotation(); Class clss[] = new Class[intfs.length]; if(annotation == null) clss[0] = RMIClassLoader.loadClass(intfs[0]); else clss[0] = RMIClassLoader.loadClas...
clss[0] = RMIClassLoader.loadClass(annotation, intfs[0]); ClassLoader loader = clss[0].getClassLoader(); for (int i = 0; i < intfs.length; i++) clss[i] = Class.forName(intfs[i], false, loader); try {
loader = ClassLoader.getSystemClassLoader(); try {
protected Class resolveProxyClass(String intfs[]) throws IOException, ClassNotFoundException{ String annotation = (String)getAnnotation(); Class clss[] = new Class[intfs.length]; if(annotation == null) clss[0] = RMIClassLoader.loadClass(intfs[0]); else clss[0] = RMIClassLoader.loadClas...
if ( (attrib=getCount()) !=null) writeOut( outputstream, " count=\"" + attrib + "\"");
if ( (attrib=getCount()) !=null) { writeOut( outputstream, " count=\""); writeOutAttribute(outputstream, ((Integer) attrib).toString()); writeOut(outputstream, "\""); }
protected void specificIOStyleToXDF( OutputStream outputstream, String indent) { synchronized (attribHash) { //open the node writeOut(outputstream, "<" + classXDFNodeName); //writeOutAttributes Object attrib=null; if ( (attrib=getCount()) !=null) writeOut( outputstream, " count=\"" ...
writeOut(outputstream, " output=\"" + attrib + "\"");
{ writeOut(outputstream, " output=\""); writeOutAttribute(outputstream, (String) attrib); writeOut(outputstream, "\""); }
protected void specificIOStyleToXDF( OutputStream outputstream, String indent) { synchronized (attribHash) { //open the node writeOut(outputstream, "<" + classXDFNodeName); //writeOutAttributes Object attrib=null; if ( (attrib=getCount()) !=null) writeOut( outputstream, " count=\"" ...
public abstract PageFormat pageDialog(PageFormat page_format);
public abstract PageFormat pageDialog(PageFormat page_format) throws HeadlessException;
public abstract PageFormat pageDialog(PageFormat page_format);
public abstract boolean printDialog();
public abstract boolean printDialog() throws HeadlessException;
public abstract boolean printDialog();
bad.minor = Minor.Any;
public static FormatMismatch extract(Any any) { try { EmptyExceptionHolder h = (EmptyExceptionHolder) any.extract_Streamable(); return (FormatMismatch) h.value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("FormatMismatch expected"); ...
public RequestSenseData requestSense() throws SCSIException,
public SenseData requestSense() throws SCSIException,
public RequestSenseData requestSense() throws SCSIException, TimeoutException, InterruptedException { final byte[] data = new byte[ 256]; final CDB cdb = new CDBRequestSense(data.length); api.executeCommand(cdb, data, 0, 5000); return new RequestSenseData(data); }
return new RequestSenseData(data);
return new SenseData(data);
public RequestSenseData requestSense() throws SCSIException, TimeoutException, InterruptedException { final byte[] data = new byte[ 256]; final CDB cdb = new CDBRequestSense(data.length); api.executeCommand(cdb, data, 0, 5000); return new RequestSenseData(data); }
System.out.println("getKeyStrokeText " + lastKeyMnemonic);
public final static String getKeyStrokeText(KeyEvent ke) { if (!workStroke.equals(ke)) { workStroke.setAttributes(ke); lastKeyMnemonic = (String)mappedKeys.get(workStroke); } System.out.println("getKeyStrokeText " + lastKeyMnemonic); return lastKeyMnemonic; }
if (locked) { throw new RuntimeException("Locked"); }
private final synchronized int alloc(byte type, int length) { final int idx = next; types[idx] = type; next += length; return idx; }
if (locked) { throw new RuntimeException("Locked"); }
final void setInt(int idx, int value) { if (types[idx] != TYPE_INT) { throw new IllegalArgumentException("Type error " + types[idx]); } statics[idx] = value; }
if (locked) { throw new RuntimeException("Locked"); }
final void setLong(int idx, long value) { if (types[idx] != TYPE_LONG) { throw new IllegalArgumentException("Type error " + types[idx]); } if (lsbFirst) { statics[idx + 0] = (int) (value & 0xFFFFFFFFL); statics[idx + 1] = (int) ((value >>> 32) & 0xFFFFFFFFL); } else { statics[idx + 1] = (int) (value & 0xFF...
if (locked) { throw new RuntimeException("Locked"); }
final void setMethod(int idx, VmMethod value) { if (types[idx] != TYPE_METHOD) { throw new IllegalArgumentException("Type error " + types[idx]); } setRawObject(idx, value); }
if (locked) { throw new RuntimeException("Locked"); }
final void setObject(int idx, Object value) { if (types[idx] != TYPE_OBJECT) { throw new IllegalArgumentException("Type error " + types[idx]); } setRawObject(idx, value); }
System.out.println("VmStatics#verifyBeforeEmit");
System.out.println("VmStatics#verifyBeforeEmit " + slotLength + ", " + resolver);
public void verifyBeforeEmit() { System.out.println("VmStatics#verifyBeforeEmit"); final int max = statics.length; for (int i = 0; i < max; i++) { final Object value = objects[i]; if (value != null) { if (slotLength == 1) { statics[i] = resolver.addressOf32(value); } else { final long lvalue = res...
objects = null; locked = true; System.out.println("VmStatics#verifyBeforeEmit count=" + count);
public void verifyBeforeEmit() { System.out.println("VmStatics#verifyBeforeEmit"); final int max = statics.length; for (int i = 0; i < max; i++) { final Object value = objects[i]; if (value != null) { if (slotLength == 1) { statics[i] = resolver.addressOf32(value); } else { final long lvalue = res...
bad.minor = Minor.Any;
public static NameValuePair extract(Any any) { try { return ((NameValuePairHolder) any.extract_Streamable()).value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("NameValuePair expected"); bad.initCause(cex); throw bad; } }
bad.minor = Minor.Any;
public static NameComponent[] extract(Any a) { try { return ((NameHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { BAD_OPERATION bad = new BAD_OPERATION("Name expected"); bad.initCause(ex); throw bad; } }
if (! allowsChildren) throw new IllegalStateException();
if (isNodeAncestor(child)) throw new IllegalArgumentException("Cannot add ancestor node.");
public void add(MutableTreeNode child) { if (child == null) throw new IllegalArgumentException(); if (! allowsChildren) throw new IllegalStateException(); children.add(child); child.setParent(this); }
try { return super.clone(); } catch (CloneNotSupportedException e) { return null; }
return new DefaultMutableTreeNode(this.userObject, this.allowsChildren);
public Object clone() { try { return super.clone(); // TODO: Do we need to do more here ? } catch (CloneNotSupportedException e) { // This never happens. return null; } }
if (node == null) throw new IllegalArgumentException("Null 'node' argument.");
public int getIndex(TreeNode node) { return children.indexOf(node); }
if (parent == null)
DefaultMutableTreeNode sibling = getNextSibling(); if (sibling != null) return sibling.getFirstLeaf(); if (parent != null) return ((DefaultMutableTreeNode) parent).getNextLeaf();
public DefaultMutableTreeNode getNextLeaf() { if (parent == null) return null; // TODO: Fix implementation. return null; //return parent.getChildAfter(this); }
return null;
public DefaultMutableTreeNode getNextLeaf() { if (parent == null) return null; // TODO: Fix implementation. return null; //return parent.getChildAfter(this); }
if (parent == null) return null;
DefaultMutableTreeNode sibling = getPreviousSibling(); if (sibling != null) return sibling.getLastLeaf(); if (parent != null) return ((DefaultMutableTreeNode) parent).getPreviousLeaf();
public DefaultMutableTreeNode getPreviousLeaf() { if (parent == null) return null; // TODO: Fix implementation. return null; //return parent.getChildBefore(this); }
if (! allowsChildren) throw new IllegalStateException(); if (node == null) throw new IllegalArgumentException("Null 'node' argument."); if (isNodeAncestor(node)) throw new IllegalArgumentException("Cannot insert ancestor node.");
public void insert(MutableTreeNode node, int index) { children.insertElementAt(node, index); }
if (node == this) return true;
public boolean isNodeSibling(TreeNode node) { if (node == null) return false; return (node.getParent() == getParent() && getParent() != null); }
children.remove(index);
MutableTreeNode child = (MutableTreeNode) children.remove(index); child.setParent(null);
public void remove(int index) { children.remove(index); }
children.removeAllElements();
for (int i = getChildCount() - 1; i >= 0; i--) remove(i);
public void removeAllChildren() { children.removeAllElements(); }
if (!allowsChildren) removeAllChildren();
public void setAllowsChildren(boolean allowsChildren) { this.allowsChildren = allowsChildren; }
Point p = awtFrame.getLocationOnScreen(); Insets ins = swingPeer.getInsets(); awtFrame.reshape(p.x + x, p.y + y, width + ins.left + ins.right, height + ins.top + ins.bottom);
if (awtFrame.isVisible()) { Point p = awtFrame.getLocationOnScreen(); Insets ins = swingPeer.getInsets(); awtFrame.reshape(p.x + x, p.y + y, width + ins.left + ins.right, height + ins.top + ins.bottom); }
public void reshape(int x, int y, int width, int height) { super.reshape(x, y, width, height); //TODO fix it Point p = awtFrame.getLocationOnScreen(); Insets ins = swingPeer.getInsets(); awtFrame.reshape(p.x + x, p.y + y, width + ins.left + ins.right, heigh...
return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s),
if (s != null) return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s) + 4,
Rectangle getCellBounds(int x, int y, Object cell) { if (cell != null) { String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(tree.getFont()); return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s), fm.getHeight()); ...
return null;
return new Rectangle(x, y, 0, 0);
Rectangle getCellBounds(int x, int y, Object cell) { if (cell != null) { String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(tree.getFont()); return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s), fm.getHeight()); ...
if (!tree.isRootVisible() && tree.isExpanded(new TreePath(( (DefaultMutableTreeNode) mod.getRoot()).getPath())))
if (!tree.isRootVisible() && tree.isExpanded(new TreePath(mod.getRoot())))
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(( (DefaultMutableTreeNode) mod.getRoot...
&& tree.isExpanded(new TreePath(((DefaultMutableTreeNode) root) .getPath())))
&& tree.isExpanded(new TreePath(root)))
public Rectangle getPathBounds(JTree tree, TreePath path) { if (path != null) { Object cell = path.getLastPathComponent(); TreeModel mod = tree.getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode) mod.getRoot(); if (!tree.isRootVisible() && tree.isE...
public int getRightChildIndent(int newAmount)
public int getRightChildIndent()
public int getRightChildIndent(int newAmount) { return rightChildIndent; }
tree.expandPath(new TreePath(((DefaultMutableTreeNode) (tree.getModel()).getRoot()).getPath()));
tree.expandPath(new TreePath(tree.getModel().getRoot()));
public void installUI(JComponent c) { super.installUI(c); installDefaults((JTree) c); tree = (JTree) c; setModel(tree.getModel()); tree.setRootVisible(true); tree.expandPath(new TreePath(((DefaultMutableTreeNode) (tree.getModel()).getRoot()).getPath())); treeSelectionModel = tree.getSelectio...
tree.expandPath(new TreePath(((DefaultMutableTreeNode) root) .getPath()));
tree.expandPath(new TreePath(root));
public void paint(Graphics g, JComponent c) { JTree tree = (JTree) c; TreeModel mod = tree.getModel(); Object root = mod.getRoot(); if (!tree.isRootVisible()) tree.expandPath(new TreePath(((DefaultMutableTreeNode) root) .getPath())); paintRecursive(g, 0, 0, 0, 0, tree...
TreePath lead = tree.getLeadSelectionPath(); if (lead != null && tree.isPathSelected(lead)) { Rectangle cell = getPathBounds(tree, lead); g.setColor(UIManager.getLookAndFeelDefaults().getColor( "Tree.selectionBorderColor")); g.drawRect(cell.x + rightChildIndent - 4, cell.y, cell.width + 4, cell.height); }
public void paint(Graphics g, JComponent c) { JTree tree = (JTree) c; TreeModel mod = tree.getModel(); Object root = mod.getRoot(); if (!tree.isRootVisible()) tree.expandPath(new TreePath(((DefaultMutableTreeNode) root) .getPath())); paintRecursive(g, 0, 0, 0, 0, tree...
g.fillRect(cell.x + rightChildIndent - 4, cell.y, cell.width + 4,
g.fillRect(cell.x + icon.getIconWidth()/2, cell.y, cell.width,
void paintNode(Graphics g, int x, int y, JTree tree, Object node, boolean isLeaf) { TreePath curr = new TreePath(((DefaultMutableTreeNode) node).getPath()); boolean selected = tree.isPathSelected(curr); boolean expanded = false; if (tree.isVisible(curr)) { DefaultTreeCellRend...
else rendererPane.paintComponent(g, c, c.getParent(), getCellBounds(x, y, node)); }
void paintNode(Graphics g, int x, int y, JTree tree, Object node, boolean isLeaf) { TreePath curr = new TreePath(((DefaultMutableTreeNode) node).getPath()); boolean selected = tree.isPathSelected(curr); boolean expanded = false; if (tree.isVisible(curr)) { DefaultTreeCellRend...
tree.getCellEditor().removeCellEditorListener(cellEditorListener);
protected void uninstallListeners() { tree.removePropertyChangeListener(propertyChangeListener); tree.removeFocusListener(focusListener); tree.removeTreeSelectionListener(treeSelectionListener); tree.removeMouseListener(mouseInputListener); tree.removeKeyListener(keyListener); tree.removePropertyChangeListener(s...
tree.getModel().removeTreeModelListener(treeModelListener);
TreeCellEditor tce = tree.getCellEditor(); if (tce != null) tce.removeCellEditorListener(cellEditorListener); TreeModel tm = tree.getModel(); if (tm != null) tm.removeTreeModelListener(treeModelListener);
protected void uninstallListeners() { tree.removePropertyChangeListener(propertyChangeListener); tree.removeFocusListener(focusListener); tree.removeTreeSelectionListener(treeSelectionListener); tree.removeMouseListener(mouseInputListener); tree.removeKeyListener(keyListener); tree.removePropertyChangeListener(s...
throw new BAD_OPERATION();
BAD_OPERATION bad = new BAD_OPERATION(); bad.initCause(ex); bad.minor = Minor.Any; throw bad;
public static NotFound extract(Any a) { try { return ((NotFoundHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { throw new BAD_OPERATION(); } }
StringWriter sw = new StringWriter(); jnasmppInput(new PrintWriter(sw)); ReInit(new StringReader(sw.toString()));
public void print(Writer w){ try{ jnasmppInput(new PrintWriter(w)); } catch (Exception pe){ pe.printStackTrace(); System.exit(-1); } }
public void setValue(Object value)
public void setValue(Object aValue)
public void setValue(Object value) { // TODO: should be setting the value in the editorComp this.value = value; }
this.value = value;
value = aValue;
public void setValue(Object value) { // TODO: should be setting the value in the editorComp this.value = value; }
clickCountToStart = 3;
clickCountToStart = 2; delegate = new JTextFieldDelegate(); textfield.addActionListener(delegate);
public DefaultCellEditor(JTextField textfield) { editorComponent = textfield; clickCountToStart = 3; } // DefaultCellEditor()
if (editorComponent instanceof JTextField) { ((JTextField)editorComponent).setText(value.toString()); delegate = new EditorDelegate(); ((JTextField)editorComponent).addActionListener(delegate); } else { }
delegate.setValue(value);
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { // NOTE: as specified by Sun, we don't call new() everytime, we return // editorComponent on each call...
String getDTDType();
QName getDTDType();
String getDTDType();
v[i] = getModel().getElementAt(i);
v[i] = getModel().getElementAt(idx[i]);
public Object[] getSelectedValues() { int [] idx = getSelectedIndices(); Object [] v = new Object[idx.length]; for (int i = 0; i < idx.length; ++i) v[i] = getModel().getElementAt(i); return v; }
tree.revalidate();
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 i...
tree.revalidate();
public void editingStopped(ChangeEvent e) { editingPath = null; editingRow = -1; stopEditingInCompleteEditing = false; if (editingComponent != null) { tree.remove(editingComponent.getParent()); editingComponent = null; } if (cellEditor != null) { ...
updateCurrentVisiblePath(); tree.revalidate();
public void propertyChange(PropertyChangeEvent event) { if ((event.getPropertyName()).equals("rootVisible")) { validCachedPreferredSize = false; updateCurrentVisiblePath(); tree.revalidate(); tree.repaint(); } }
updateCurrentVisiblePath(); tree.revalidate();
public void treeCollapsed(TreeExpansionEvent event) { validCachedPreferredSize = false; updateCurrentVisiblePath(); tree.revalidate(); tree.repaint(); }
updateCurrentVisiblePath(); tree.revalidate();
public void treeExpanded(TreeExpansionEvent event) { validCachedPreferredSize = false; updateCurrentVisiblePath(); tree.revalidate(); tree.repaint(); }
updateCurrentVisiblePath(); tree.revalidate();
public void treeNodesChanged(TreeModelEvent e) { validCachedPreferredSize = false; updateCurrentVisiblePath(); tree.revalidate(); tree.repaint(); }
updateCurrentVisiblePath(); tree.revalidate();
public void treeNodesInserted(TreeModelEvent e) { validCachedPreferredSize = false; updateCurrentVisiblePath(); tree.revalidate(); tree.repaint(); }
updateCurrentVisiblePath(); tree.revalidate();
public void treeNodesRemoved(TreeModelEvent e) { validCachedPreferredSize = false; updateCurrentVisiblePath(); tree.revalidate(); tree.repaint(); }
updateCurrentVisiblePath();
public void treeStructureChanged(TreeModelEvent e) { if (e.getPath().length == 1 && !e.getPath()[0].equals(treeModel.getRoot())) tree.expandPath(new TreePath(treeModel.getRoot())); updateCurrentVisiblePath(); validCachedPreferredSize = false; tree.revalidate(); tree.repai...
tree.revalidate();
public void treeStructureChanged(TreeModelEvent e) { if (e.getPath().length == 1 && !e.getPath()[0].equals(treeModel.getRoot())) tree.expandPath(new TreePath(treeModel.getRoot())); updateCurrentVisiblePath(); validCachedPreferredSize = false; tree.revalidate(); tree.repai...
TreePath path = new TreePath(mod.getRoot());
Object root = mod.getRoot(); if (root != null) { TreePath path = new TreePath(root);
public void installUI(JComponent c) { tree = (JTree) c; prepareForUIInstall(); super.installUI(c); installDefaults(); installComponents(); installKeyboardActions(); installListeners(); setCellEditor(createDefaultCellEditor()); createdCellEditor = true; isEditing = false; TreeMode...
}
public void installUI(JComponent c) { tree = (JTree) c; prepareForUIInstall(); super.installUI(c); installDefaults(); installComponents(); installKeyboardActions(); installListeners(); setCellEditor(createDefaultCellEditor()); createdCellEditor = true; isEditing = false; TreeMode...
if (currentVisiblePath == null)
public void paint(Graphics g, JComponent c) { JTree tree = (JTree) c; if (currentVisiblePath == null) updateCurrentVisiblePath(); Rectangle clip = g.getClipBounds(); Insets insets = tree.getInsets(); if (clip != null && treeModel != null && currentVisiblePath != null) { int startIndex...
tree.revalidate();
protected void pathWasCollapsed(TreePath path) { validCachedPreferredSize = false; tree.revalidate(); tree.repaint(); }
tree.revalidate();
protected void pathWasExpanded(TreePath path) { validCachedPreferredSize = false; tree.revalidate(); tree.repaint(); }
tree.revalidate();
protected boolean startEditing(TreePath path, MouseEvent event) { int x; int y; if (event == null) { Rectangle bounds = getPathBounds(tree, path); x = bounds.x; y = bounds.y; } else { x = event.getX(); y = event.getY(); } updateCellEditor(); Tr...
updateCurrentVisiblePath();
protected void toggleExpandState(TreePath path) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); updateCurrentVisiblePath(); }
if (next == null) return;
void updateCurrentVisiblePath() { if (treeModel == null) return; Object next = treeModel.getRoot(); TreePath rootPath = new TreePath(next); Rectangle bounds = getPathBounds(tree, rootPath); // If root is not a valid size to be visible, or is // not visible and the tree is expanded, then th...
toolBar.setBorder(new ToolBarBorder());
toolBar.setBorder(defaults.getBorder("ToolBar.border"));
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); toolBar.setBorder(new ToolBarBorder()); toolBar.setBackground(defaults.getColor("ToolBar.background")); toolBar.setForeground(defaults.getColor("ToolBar.foreground")); toolBar.setFont(defaults.getFont("ToolBar...
if (tex instanceof SyntaxError) {
if (tex instanceof SyntaxErrorException) {
public void invoke(String cmdLineStr) { final CommandLine cmdLine = new CommandLine(cmdLineStr); if (!cmdLine.hasNext()) return; String cmdName = cmdLine.next(); commandShell.addCommandToHistory(cmdLineStr); // System.err.println("Got command: "+cmdLineStr+", name="+cmdName...
if (from != null && from.length() > 0) msg.setFrom(new InternetAddress(from));
if (from == null) from = SMTPProperties.getProperty("mail.smtp.from"); if (from != null && from.length() > 0) { pers = SMTPProperties.getProperty("mail.smtp.realname"); if (pers != null) msg.setFrom(new InternetAddress(from, pers)); }
public boolean send() throws Exception { try { if(!loadConfig(configFile)) return false; Session session = Session.getDefaultInstance(SMTPProperties, null); session.setDebug(false); // create the Multipart and its parts to it Multipart mp = new MimeMultipart();...
for (int x = 0; x < ia.length; x++) { error += "Invalid Address: " + ia[x].toString() + "\n";
if (ia != null) { for (int x = 0; x < ia.length; x++) { error += "Invalid Address: " + ia[x].toString() + "\n"; }
private void showFailedException(SendFailedException sfe) { String error = sfe.getMessage() + "\n"; Address[] ia = sfe.getInvalidAddresses(); for (int x = 0; x < ia.length; x++) { error += "Invalid Address: " + ia[x].toString() + "\n"; } JTextArea ea = new JTextArea(error,6,50); ...
public HostNameArgument(String _name, String _description)
public HostNameArgument(String _name, String _description, boolean _multi)
public HostNameArgument(String _name, String _description) { super(_name, _description); }
super(_name, _description);
super(_name, _description, _multi);
public HostNameArgument(String _name, String _description) { super(_name, _description); }