rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
Class expCls; try {
public RemoteStub exportObject(Remote obj) throws RemoteException { if (myself == null) { myself = obj; // Save it to server manager, to let client calls in the same VM to issue // local call manager.serverobj = obj; // Find and install the stub Class cls = obj.getClass(); Class expCls; try { // where ist th...
expCls = findStubSkelClass(cls); } catch (Exception ex) { throw new RemoteException("can not find stubs for class: " + cls, ex);
Class expCls = expCls = findStubSkelClass(cls); if (expCls != null) { stub = (RemoteStub) getHelperClass(expCls, "_Stub"); skel = (Skeleton) getHelperClass(expCls, "_Skel"); }
public RemoteStub exportObject(Remote obj) throws RemoteException { if (myself == null) { myself = obj; // Save it to server manager, to let client calls in the same VM to issue // local call manager.serverobj = obj; // Find and install the stub Class cls = obj.getClass(); Class expCls; try { // where ist th...
stub = (RemoteStub)getHelperClass(expCls, "_Stub"); if (stub == null) { throw new RemoteException("failed to export: " + cls); } skel = (Skeleton)getHelperClass(expCls, "_Skel");
if (stub == null) stub = createProxyStub(obj.getClass(), this);
public RemoteStub exportObject(Remote obj) throws RemoteException { if (myself == null) { myself = obj; // Save it to server manager, to let client calls in the same VM to issue // local call manager.serverobj = obj; // Find and install the stub Class cls = obj.getClass(); Class expCls; try { // where ist th...
return (stub); }
return stub; }
public RemoteStub exportObject(Remote obj) throws RemoteException { if (myself == null) { myself = obj; // Save it to server manager, to let client calls in the same VM to issue // local call manager.serverobj = obj; // Find and install the stub Class cls = obj.getClass(); Class expCls; try { // where ist th...
private Class findStubSkelClass(Class startCls) throws Exception {
private Class findStubSkelClass(Class startCls) {
private Class findStubSkelClass(Class startCls) throws Exception { Class cls = startCls; while (true) { try { String stubClassname = cls.getName() + "_Stub"; ClassLoader cl = cls.getClassLoader(); Class scls = cl == null ? Class.forName(stubClassname) : cl.loadClass(stubClassname); return cls; // found it...
throw new Exception("Neither " + startCls + " nor one of their superclasses (like" + cls + ")" + " has a _Stub");
return null;
private Class findStubSkelClass(Class startCls) throws Exception { Class cls = startCls; while (true) { try { String stubClassname = cls.getName() + "_Stub"; ClassLoader cl = cls.getClassLoader(); Class scls = cl == null ? Class.forName(stubClassname) : cl.loadClass(stubClassname); return cls; // found it...
public RemoteStub getStub(){
public Remote getStub() {
public RemoteStub getStub(){ return stub;}
* For debugging purposes - we don't handle CodeBases * quite right so we don't always find the stubs. This * lets us know that.
* For debugging purposes - we don't handle CodeBases quite right so * we don't always find the stubs. This lets us know that.
public Object incomingMessageCall(UnicastConnection conn, int method, long hash) throws Exception {//System.out.println("method = " + method + ", hash = " + hash); // If method is -1 then this is JDK 1.2 RMI - so use the hash // to locate the method if (method == -1) { Method meth = (Method)methods.get(new Long (hash)...
else { throw new Error("The remote method threw a java.lang.Throwable that is neither java.lang.Exception nor java.lang.Error.", e);
else { throw new Error( "The remote method threw a java.lang.Throwable that"+ " is neither java.lang.Exception nor java.lang.Error.", e);
public Object incomingMessageCall(UnicastConnection conn, int method, long hash) throws Exception {//System.out.println("method = " + method + ", hash = " + hash); // If method is -1 then this is JDK 1.2 RMI - so use the hash // to locate the method if (method == -1) { Method meth = (Method)methods.get(new Long (hash)...
(screenSize.height - frameSize.height) / 2);
(screenSize.height - frameSize.height) / 3);
private void jbInit() throws Exception { try { setIconImage(GUIGraphicsUtils.getApplicationIcon().getImage()); // set title setTitle(LangTool.getString("xtfr.wizardTitle")); // Load the JDBC driver. Driver driver2 = (Driver)Class.forName("com.ibm.as400.access.AS400JDBCDri...
if (!ck.toByteArray ().equals (toByteArray ()))
if (! Arrays.equals (ck.toByteArray (), toByteArray ()))
public boolean equals (Object obj) { if (! (obj instanceof CollationKey)) return false; CollationKey ck = (CollationKey) obj; if (ck.collator != collator) return false; if (!ck.getSourceString ().equals (getSourceString ())) return false; if (!ck.toByteArray ().equals (toByteArray ())) ...
synchronized (axesIOList) {
if (axesIOList == null) return parentArray.getAxes(); else
public List getIOAxesOrder() { synchronized (axesIOList) { return axesIOList; } }
}
public List getIOAxesOrder() { synchronized (axesIOList) { return axesIOList; } }
for (int i = 0, size = axesIOList.size(); i < size; i++) {
for (int i = 0, size = axisOrderList.size(); i < size; i++) {
private void privateSetIOAxesOrder (List axisOrderList) { synchronized (axesIOList) { axesIOList = Collections.synchronizedList(new ArrayList()); for (int i = 0, size = axesIOList.size(); i < size; i++) { axesIOList.add(axisOrderList.get(i)); } } }
Log.debug("in Locator(Array)");
public Locator(Array array) { Log.debug("in Locator(Array)"); parentArray = array; List axisList = parentArray.getAxisList(); /**now, since we KNOW _parentArray is defined * (has to be instanciated via Array ONLY) * we can proceed to initialize the axis, index positions * to the origin (ie ind...
return null;
if (accessibleContext == null) accessibleContext = new AccessibleJWindow(); return accessibleContext;
public AccessibleContext getAccessibleContext() { return null; }
public PrinterThread (char[] sc, Font font, int cols, int rows,
public PrinterThread (Screen5250 scr, Font font, int cols, int rows,
public PrinterThread (char[] sc, Font font, int cols, int rows, Color colorBg, boolean toDefaultPrinter, Session ses) { setPriority(1); session = ses; session.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); config = ses.getConfiguration(); screen = new ch...
screen = new char[sc.length]; System.arraycopy(sc, 0, screen, 0, sc.length);
int len = scr.getScreenLength(); screen = new char[len]; screenAttr = new char[len]; int ret = scr.GetScreen(screen, len, PLANE_TEXT); ret = scr.GetScreen(screenAttr, len, PLANE_EXTENDED);
public PrinterThread (char[] sc, Font font, int cols, int rows, Color colorBg, boolean toDefaultPrinter, Session ses) { setPriority(1); session = ses; session.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); config = ses.getConfiguration(); screen = new ch...
int len = sc.length;
public PrinterThread (char[] sc, Font font, int cols, int rows, Color colorBg, boolean toDefaultPrinter, Session ses) { setPriority(1); session = ses; session.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); config = ses.getConfiguration(); screen = new ch...
if (screen[getPos(m,i)] >= ' ') {
if (screen[getPos(m,i)] >= ' ' && ((screen[getPos(m,i)] & EXTENDED_5250_NON_DSP) == 0)) {
public int print (Graphics g, PageFormat pageFormat, int page) { Graphics2D g2; //--- Validate the page number, we only print the first page if (page == 0) { //--- Create a graphic2D object and set the default parameters g2 = (Graphics2D) g; g2.setColor (Color.black); /...
if ((screenAttr[getPos(m,i)] & EXTENDED_5250_UNDERLINE) == 1) g.drawLine(x, (int)(y + (h1 - l.getLeading()-3)), (int)(x + w1), (int)(y + (h1 - l.getLeading())-3));
public int print (Graphics g, PageFormat pageFormat, int page) { Graphics2D g2; //--- Validate the page number, we only print the first page if (page == 0) { //--- Create a graphic2D object and set the default parameters g2 = (Graphics2D) g; g2.setColor (Color.black); /...
screen = null; screenAttr = null;
public void run () {// Toolkit tk = Toolkit.getDefaultToolkit();//int [][] range = new int[][] {//new int[] { 1, 1 }//};// JobAttributes jobAttributes = new JobAttributes(1, JobAttributes.DefaultSelectionType.ALL, JobAttributes.DestinationType.PRINTER, JobAttributes.DialogType.NONE, "file", 1, 1, JobAttributes.Multi...
bad.minor = Minor.Any;
public static NoServant extract(Any any) { try { EmptyExceptionHolder h = (EmptyExceptionHolder) any.extract_Streamable(); return (NoServant) h.value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("NoServant expected"); bad.initCaus...
descr = new PluginDescriptorModel(root);
if (root.getName().equals("plugin")) { descr = new PluginDescriptorModel(root); } else if (root.getName().equals("fragment")) { descr = new FragmentDescriptorModel(root); } else { throw new BuildException("Unknown root tag " + root.getName()); }
protected PluginDescriptorModel readDescriptor(File descriptor) { final PluginDescriptorModel descr; try { final XMLElement root = new XMLElement(new Hashtable(), true, false); try { final FileReader r = new FileReader(descriptor); try { ...
pendingUnlock =false;
public final boolean disconnect() { if (me != null && me.isAlive()) { me.interrupt(); keepTrucking = false; pthread.interrupt(); } screen52.setStatus(screen52.STATUS_SYSTEM,screen52.STATUS_VALUE_ON,"X - Disconnected"); screen52.setKeyboardLocked(false); try { ...
screen52.setKeyboardLocked(false);
pendingUnlock = true;
private void parseIncoming() { boolean controlChars = false; byte control0; byte control1; boolean done = false; boolean error = false; try { while (bk.hasNext() && !done) { byte b = bk.getNextByte(); switch (b) { case 0: case 1:...
else pendingUnlock =false;
private void processCC0 (byte byte0) {// System.out.println(" Control byte0 " + Integer.toBinaryString(byte0 & 0xff)); boolean lockKeyboard = true; boolean resetMDT=false; boolean resetMDTAll = false; boolean nullMDT = false; boolean nullAll = false; // Bits 3 to 6 are reserved and...
pendingUnlock = false;
private final void readImmediate(int readType) { if (screen52.isStatusErrorCode()) { screen52.restoreErrorLine(); screen52.setStatus(screen52.STATUS_ERROR_CODE,screen52.STATUS_VALUE_OFF,null); } if (!enhanced) { screen52.setCursorOff(); } screen52.setStatus(screen5...
screen52.setKeyboardLocked(false);
pendingUnlock = true;
public void run () { while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; } // lets play nicel...
if (pendingUnlock) screen52.setKeyboardLocked(false);
public void run () { while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; } // lets play nicel...
pendingUnlock = false;
public final boolean sendAidKey(int aid) { if (screen52.isStatusErrorCode()) { screen52.restoreErrorLine(); screen52.setStatus(screen52.STATUS_ERROR_CODE,screen52.STATUS_VALUE_OFF,null); } if (!enhanced) { screen52.setCursorOff(); } screen52.setStatus(screen52.STAT...
super("ttf");
public TTFontProvider() { log.debug("new TTFontProvider"); }
final String renderer = (String)AccessController.doPrivileged(new GetPropertyAction("jnode.font.renderer", "simple"));
protected TextRenderer createTextRenderer(RenderCache renderCache, Font font) { final String renderer = (String)AccessController.doPrivileged(new GetPropertyAction("jnode.font.renderer", "simple")); TextRenderer r; if (false || renderer.equals("new")) { r = new TTFTextRenderer(renderCac...
if (false || renderer.equals("new")) {
protected TextRenderer createTextRenderer(RenderCache renderCache, Font font) { final String renderer = (String)AccessController.doPrivileged(new GetPropertyAction("jnode.font.renderer", "simple")); TextRenderer r; if (false || renderer.equals("new")) { r = new TTFTextRenderer(renderCac...
} else { r = new TTFSimpleTextRenderer(getFontData(font), font.getSize()); }
protected TextRenderer createTextRenderer(RenderCache renderCache, Font font) { final String renderer = (String)AccessController.doPrivileged(new GetPropertyAction("jnode.font.renderer", "simple")); TextRenderer r; if (false || renderer.equals("new")) { r = new TTFTextRenderer(renderCac...
this(10);
this(DEFAULT_BUFSIZE);
public GapContent() { this(10); }
txt.array = new char[len];
int length = length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); if ((where + len) > length) throw new BadLocationException("len plus where cannot be greater" + " than the content length", len + where);
public void getChars(int where, int len, Segment txt) throws BadLocationException { txt.array = new char[len]; System.arraycopy(buf.toString().toCharArray(), where, txt.array, 0, len); txt.count = len; txt.offset = 0; }
System.arraycopy(buf.toString().toCharArray(), where, txt.array, 0, len); txt.count = len;
if ((where < gapStart) && ((gapStart - where) < len)) { char[] copy = new char[len]; int lenFirst = gapStart - where; System.arraycopy(buffer, where, copy, 0, lenFirst); System.arraycopy(buffer, gapEnd, copy, lenFirst, len - lenFirst); txt.array = copy;
public void getChars(int where, int len, Segment txt) throws BadLocationException { txt.array = new char[len]; System.arraycopy(buf.toString().toCharArray(), where, txt.array, 0, len); txt.count = len; txt.offset = 0; }
}
txt.count = len; } else { txt.array = buffer; if (where < gapStart) txt.offset = where; else txt.offset = where + (gapEnd - gapStart); txt.count = len; } }
public void getChars(int where, int len, Segment txt) throws BadLocationException { txt.array = new char[len]; System.arraycopy(buf.toString().toCharArray(), where, txt.array, 0, len); txt.count = len; txt.offset = 0; }
return buf.substring(where, where+len);
Segment seg = new Segment(); getChars(where, len, seg); return new String(seg.array, seg.offset, seg.count);
public String getString(int where, int len) throws BadLocationException { return buf.substring(where, where+len); }
buf.insert(where, str);
int length = length(); int strLen = str.length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); if ((gapEnd - gapStart) < strLen) shiftEnd(strLen + DEFAULT_BUFSIZE); if (where != gapStart) shiftGap(where); System.arraycopy(str.t...
public UndoableEdit insertString(int where, String str) throws BadLocationException { buf.insert(where, str); return null; }
return buf.length();
return buffer.length - (gapEnd - gapStart);
public int length() { return buf.length(); }
buf.delete(where, where + nitems);
int length = length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); if ((where + nitems) > length) throw new BadLocationException("where + nitems cannot be greater" + " than the content length", where + nitems); if (where != gapStart...
public UndoableEdit remove(int where, int nitems) throws BadLocationException { buf.delete(where, where + nitems); return null; }
super.setPropertiesFromAttributes();
protected void setPropertiesFromAttributes() { // FIXME: Implement this. }
TreeNode last = null;
Object last = null;
public void keyPressed(KeyEvent e) { TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); TreeNode last = null; if (start != null) last = (TreeNode) start.getLastPathComponent(); if (last != null) { // DOWN, KP_DOWN if (e.getKeyCode() == Key...
last = (TreeNode) start.getLastPathComponent();
last = start.getLastPathComponent();
public void keyPressed(KeyEvent e) { TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); TreeNode last = null; if (start != null) last = (TreeNode) start.getLastPathComponent(); if (last != null) { // DOWN, KP_DOWN if (e.getKeyCode() == Key...
TreeNode next = (TreeNode) BasicTreeUI.this. getNextVisibleNode(last);
Object next = BasicTreeUI.this.getNextVisibleNode(last);
public void keyPressed(KeyEvent e) { TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); TreeNode last = null; if (start != null) last = (TreeNode) start.getLastPathComponent(); if (last != null) { // DOWN, KP_DOWN if (e.getKeyCode() == Key...
else if (!next.isLeaf() && e.isShiftDown())
else if (!mod.isLeaf(next) && e.isShiftDown())
public void keyPressed(KeyEvent e) { TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); TreeNode last = null; if (start != null) last = (TreeNode) start.getLastPathComponent(); if (last != null) { // DOWN, KP_DOWN if (e.getKeyCode() == Key...
TreeNode prev = (TreeNode) BasicTreeUI.this. getPreviousVisibleNode(last);
Object prev = BasicTreeUI.this.getPreviousVisibleNode(last);
public void keyPressed(KeyEvent e) { TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); TreeNode last = null; if (start != null) last = (TreeNode) start.getLastPathComponent(); if (last != null) { // DOWN, KP_DOWN if (e.getKeyCode() == Key...
else if (!prev.isLeaf() && e.isShiftDown())
else if (!mod.isLeaf(prev) && e.isShiftDown())
public void keyPressed(KeyEvent e) { TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); TreeNode last = null; if (start != null) last = (TreeNode) start.getLastPathComponent(); if (last != null) { // DOWN, KP_DOWN if (e.getKeyCode() == Key...
TreeNode p = last.getParent();
Object p = getParent(mod.getRoot(), last);
public void keyPressed(KeyEvent e) { TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); TreeNode last = null; if (start != null) last = (TreeNode) start.getLastPathComponent(); if (last != null) { // DOWN, KP_DOWN if (e.getKeyCode() == Key...
if (!last.isLeaf() && BasicTreeUI.this.tree.isExpanded(path))
if (!mod.isLeaf(last) && BasicTreeUI.this.tree.isExpanded(path))
public void keyPressed(KeyEvent e) { TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); TreeNode last = null; if (start != null) last = (TreeNode) start.getLastPathComponent(); if (last != null) { // DOWN, KP_DOWN if (e.getKeyCode() == Key...
if (!last.isLeaf() && BasicTreeUI.this.tree.isCollapsed(path))
if (!mod.isLeaf(last) && BasicTreeUI.this.tree.isCollapsed(path))
public void keyPressed(KeyEvent e) { TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); TreeNode last = null; if (start != null) last = (TreeNode) start.getLastPathComponent(); if (last != null) { // DOWN, KP_DOWN if (e.getKeyCode() == Key...
if (!last.isLeaf())
if (!mod.isLeaf(last))
public void keyPressed(KeyEvent e) { TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); TreeNode last = null; if (start != null) last = (TreeNode) start.getLastPathComponent(); if (last != null) { // DOWN, KP_DOWN if (e.getKeyCode() == Key...
try { BasicTreeUI.this.tree.fireTreeWillExpand(path); } catch (ExpandVetoException ev) { }
public void keyPressed(KeyEvent e) { TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); TreeNode last = null; if (start != null) last = (TreeNode) start.getLastPathComponent(); if (last != null) { // DOWN, KP_DOWN if (e.getKeyCode() == Key...
try { BasicTreeUI.this.tree.fireTreeWillExpand(path); } catch (ExpandVetoException ev) { }
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / BasicTreeUI.this.getRowHeight()); TreePath path = BasicTreeUI.this.getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = f...
if (!tree.isRootVisible() && tree.isExpanded(new TreePath(mod.getRoot()))) return new Point(x + ((getLevel((TreeNode) node)) * rightChildIndent), y);
if (!tree.isRootVisible() && tree.isExpanded(new TreePath(mod.getRoot()))) return new Point(x + ((getLevel(node)) * rightChildIndent), y);
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()))) return new Point(x + ((getL...
return new Point(x + ((getLevel((TreeNode) node) + 1) * rightChildIndent), y);
return new Point(x + ((getLevel(node) + 1) * rightChildIndent), y);
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()))) return new Point(x + ((getL...
&& tree.isExpanded(new TreePath(getPathToRoot(((TreeNode) startNode), 0))))
&& tree.isExpanded(new TreePath(getPathToRoot(startNode, 0))) && mod.getChildCount(startNode) > 0)
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()))) return new Point(x + ((getL...
getNextVisibleNode((TreeNode) startNode));
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()))) return new Point(x + ((getL...
public int getLevel(TreeNode node)
int getLevel(Object node)
public int getLevel(TreeNode node) { int count = -1; TreeNode current = node; do { current = current.getParent(); count++; } while (current != null); return count; }
TreeNode current = node;
Object current = node;
public int getLevel(TreeNode node) { int count = -1; TreeNode current = node; do { current = current.getParent(); count++; } while (current != null); return count; }
current = current.getParent();
current = getParent(tree.getModel().getRoot(), current);
public int getLevel(TreeNode node) { int count = -1; TreeNode current = node; do { current = current.getParent(); count++; } while (current != null); return count; }
TreeNode getNextNode(TreeNode curr)
Object getNextNode(Object curr)
TreeNode getNextNode(TreeNode curr) { if (curr.getChildCount() != 0) return curr.getChildAt(0); TreeNode node = curr; TreeNode sibling; do { sibling = getNextSibling(node); node = node.getParent(); } while (sibling == null && node != null); return sibl...
if (curr.getChildCount() != 0) return curr.getChildAt(0);
TreeModel mod = tree.getModel(); if (mod.getChildCount(curr) > 0) return mod.getChild(curr, 0);
TreeNode getNextNode(TreeNode curr) { if (curr.getChildCount() != 0) return curr.getChildAt(0); TreeNode node = curr; TreeNode sibling; do { sibling = getNextSibling(node); node = node.getParent(); } while (sibling == null && node != null); return sibl...
TreeNode node = curr; TreeNode sibling;
Object node = curr; Object sibling = null;
TreeNode getNextNode(TreeNode curr) { if (curr.getChildCount() != 0) return curr.getChildAt(0); TreeNode node = curr; TreeNode sibling; do { sibling = getNextSibling(node); node = node.getParent(); } while (sibling == null && node != null); return sibl...
node = node.getParent();
node = getParent(mod.getRoot(), node);
TreeNode getNextNode(TreeNode curr) { if (curr.getChildCount() != 0) return curr.getChildAt(0); TreeNode node = curr; TreeNode sibling; do { sibling = getNextSibling(node); node = node.getParent(); } while (sibling == null && node != null); return sibl...
TreeNode getNextSibling(TreeNode node)
Object getNextSibling(Object node)
TreeNode getNextSibling(TreeNode node) { TreeNode parent = node.getParent(); if (parent == null) return null; int index = parent.getIndex(node) + 1; if (index == parent.getChildCount()) return null; return parent.getChildAt(index); }
TreeNode parent = node.getParent();
TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node);
TreeNode getNextSibling(TreeNode node) { TreeNode parent = node.getParent(); if (parent == null) return null; int index = parent.getIndex(node) + 1; if (index == parent.getChildCount()) return null; return parent.getChildAt(index); }
int index = parent.getIndex(node) + 1;
int index = mod.getIndexOfChild(parent, node) + 1;
TreeNode getNextSibling(TreeNode node) { TreeNode parent = node.getParent(); if (parent == null) return null; int index = parent.getIndex(node) + 1; if (index == parent.getChildCount()) return null; return parent.getChildAt(index); }
if (index == parent.getChildCount())
if (index == 0 || index >= mod.getChildCount(parent))
TreeNode getNextSibling(TreeNode node) { TreeNode parent = node.getParent(); if (parent == null) return null; int index = parent.getIndex(node) + 1; if (index == parent.getChildCount()) return null; return parent.getChildAt(index); }
return parent.getChildAt(index);
return mod.getChild(parent, index);
TreeNode getNextSibling(TreeNode node) { TreeNode parent = node.getParent(); if (parent == null) return null; int index = parent.getIndex(node) + 1; if (index == parent.getChildCount()) return null; return parent.getChildAt(index); }
TreeNode getNextVisibleNode(TreeNode node)
Object getNextVisibleNode(Object node)
TreeNode getNextVisibleNode(TreeNode node) { TreeNode next = null; TreePath current = null; if (node != null) next = getNextNode(node); if (next != null) { current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return next; while (n...
TreeNode next = null;
Object next = null;
TreeNode getNextVisibleNode(TreeNode node) { TreeNode next = null; TreePath current = null; if (node != null) next = getNextNode(node); if (next != null) { current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return next; while (n...
TreeNode root = (TreeNode) mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(root)))
if (mod != null) { Object root = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(root)))
public Rectangle getPathBounds(JTree tree, TreePath path) { if (path != null) { Object cell = path.getLastPathComponent(); TreeModel mod = tree.getModel(); TreeNode root = (TreeNode) mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(root))) ...
}
public Rectangle getPathBounds(JTree tree, TreePath path) { if (path != null) { Object cell = path.getLastPathComponent(); TreeModel mod = tree.getModel(); TreeNode root = (TreeNode) mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(root))) ...
TreeNode node = ((TreeNode) (tree.getModel()).getRoot());
TreeModel mod = tree.getModel(); if (mod != null) { Object node = mod.getRoot();
public TreePath getPathForRow(JTree tree, int row) { TreeNode node = ((TreeNode) (tree.getModel()).getRoot()); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node); for (int i = 0; i < row; i++) node = getNextVisibleNode(node); /...
return null; }
public TreePath getPathForRow(JTree tree, int row) { TreeNode node = ((TreeNode) (tree.getModel()).getRoot()); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node); for (int i = 0; i < row; i++) node = getNextVisibleNode(node); /...
TreeNode[] getPathToRoot(TreeNode node, int depth)
Object[] getPathToRoot(Object node, int depth)
TreeNode[] getPathToRoot(TreeNode node, int depth) { if (node == null) { if (depth == 0) return null; return new TreeNode[depth]; } TreeNode[] path = getPathToRoot(node.getParent(), depth + 1); path[path.length - depth - 1] = node; return path; }
return new TreeNode[depth];
return new Object[depth];
TreeNode[] getPathToRoot(TreeNode node, int depth) { if (node == null) { if (depth == 0) return null; return new TreeNode[depth]; } TreeNode[] path = getPathToRoot(node.getParent(), depth + 1); path[path.length - depth - 1] = node; return path; }
TreeNode[] path = getPathToRoot(node.getParent(), depth + 1);
Object[] path = getPathToRoot(getParent(mod.getRoot(), node), depth + 1);
TreeNode[] getPathToRoot(TreeNode node, int depth) { if (node == null) { if (depth == 0) return null; return new TreeNode[depth]; } TreeNode[] path = getPathToRoot(node.getParent(), depth + 1); path[path.length - depth - 1] = node; return path; }
TreeNode getPreviousNode(TreeNode node)
Object getPreviousNode(Object node)
TreeNode getPreviousNode(TreeNode node) { TreeNode parent = node.getParent(); if (parent == null) return null; TreeNode sibling = getPreviousSibling(node); if (sibling == null) return parent; int size = sibling.getChildCount(); while (size > 0) { sibling = sibling.getChildAt(s...
TreeNode parent = node.getParent();
TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node);
TreeNode getPreviousNode(TreeNode node) { TreeNode parent = node.getParent(); if (parent == null) return null; TreeNode sibling = getPreviousSibling(node); if (sibling == null) return parent; int size = sibling.getChildCount(); while (size > 0) { sibling = sibling.getChildAt(s...
TreeNode sibling = getPreviousSibling(node);
Object sibling = getPreviousSibling(node);
TreeNode getPreviousNode(TreeNode node) { TreeNode parent = node.getParent(); if (parent == null) return null; TreeNode sibling = getPreviousSibling(node); if (sibling == null) return parent; int size = sibling.getChildCount(); while (size > 0) { sibling = sibling.getChildAt(s...
int size = sibling.getChildCount();
int size = mod.getChildCount(sibling);
TreeNode getPreviousNode(TreeNode node) { TreeNode parent = node.getParent(); if (parent == null) return null; TreeNode sibling = getPreviousSibling(node); if (sibling == null) return parent; int size = sibling.getChildCount(); while (size > 0) { sibling = sibling.getChildAt(s...
sibling = sibling.getChildAt(size - 1); size = sibling.getChildCount();
sibling = mod.getChild(sibling, size - 1); size = mod.getChildCount(sibling);
TreeNode getPreviousNode(TreeNode node) { TreeNode parent = node.getParent(); if (parent == null) return null; TreeNode sibling = getPreviousSibling(node); if (sibling == null) return parent; int size = sibling.getChildCount(); while (size > 0) { sibling = sibling.getChildAt(s...
TreeNode getPreviousSibling(TreeNode node)
Object getPreviousSibling(Object node)
TreeNode getPreviousSibling(TreeNode node) { TreeNode parent = node.getParent(); if (parent == null) return null; int index = parent.getIndex(node) - 1; if (index < 0) return null; return parent.getChildAt(index); }
TreeNode parent = node.getParent();
TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node);
TreeNode getPreviousSibling(TreeNode node) { TreeNode parent = node.getParent(); if (parent == null) return null; int index = parent.getIndex(node) - 1; if (index < 0) return null; return parent.getChildAt(index); }
int index = parent.getIndex(node) - 1;
int index = mod.getIndexOfChild(parent, node) - 1;
TreeNode getPreviousSibling(TreeNode node) { TreeNode parent = node.getParent(); if (parent == null) return null; int index = parent.getIndex(node) - 1; if (index < 0) return null; return parent.getChildAt(index); }
if (index < 0)
if (index < 0 || index >= mod.getChildCount(parent))
TreeNode getPreviousSibling(TreeNode node) { TreeNode parent = node.getParent(); if (parent == null) return null; int index = parent.getIndex(node) - 1; if (index < 0) return null; return parent.getChildAt(index); }
return parent.getChildAt(index);
return mod.getChild(parent, index);
TreeNode getPreviousSibling(TreeNode node) { TreeNode parent = node.getParent(); if (parent == null) return null; int index = parent.getIndex(node) - 1; if (index < 0) return null; return parent.getChildAt(index); }
TreeNode getPreviousVisibleNode(TreeNode node)
Object getPreviousVisibleNode(Object node)
TreeNode getPreviousVisibleNode(TreeNode node) { TreeNode prev = null; TreePath current = null; if (node != null) prev = getPreviousNode(node); if (prev != null) { current = new TreePath(getPathToRoot(prev, 0)); if (tree.isVisible(current)) return prev; ...
TreeNode prev = null;
Object prev = null;
TreeNode getPreviousVisibleNode(TreeNode node) { TreeNode prev = null; TreePath current = null; if (node != null) prev = getPreviousNode(node); if (prev != null) { current = new TreePath(getPathToRoot(prev, 0)); if (tree.isVisible(current)) return prev; ...
TreeNode node = ((TreeNode) (tree.getModel()) .getRoot());
TreeModel mod = tree.getModel(); int count = 0; if (mod != null) { Object node = mod.getRoot();
public int getRowCount(JTree tree) { TreeNode node = ((TreeNode) (tree.getModel()) .getRoot()); if (!tree.isRootVisible() && tree.isExpanded(new TreePath((getPathToRoot(node, 0))))) node = getNextNode(node); int count = 0; while (node != null) { count++...
int count = 0;
public int getRowCount(JTree tree) { TreeNode node = ((TreeNode) (tree.getModel()) .getRoot()); if (!tree.isRootVisible() && tree.isExpanded(new TreePath((getPathToRoot(node, 0))))) node = getNextNode(node); int count = 0; while (node != null) { count++...
}
public int getRowCount(JTree tree) { TreeNode node = ((TreeNode) (tree.getModel()) .getRoot()); if (!tree.isRootVisible() && tree.isExpanded(new TreePath((getPathToRoot(node, 0))))) node = getNextNode(node); int count = 0; while (node != null) { count++...
if (treeModel != null)
protected void installListeners() { tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseInputListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionModelPropert...
setModel(tree.getModel());
TreeModel mod = tree.getModel(); setModel(mod);
public void installUI(JComponent c) { super.installUI(c); installDefaults((JTree) c); tree = (JTree) c; setModel(tree.getModel()); tree.setRootVisible(true); tree.expandPath(new TreePath(tree.getModel().getRoot())); treeSelectionModel = tree.getSelectionModel(); installListeners(); installKeyboardAction...
tree.expandPath(new TreePath(tree.getModel().getRoot()));
if (mod != null) tree.expandPath(new TreePath(mod.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(tree.getModel().getRoot())); treeSelectionModel = tree.getSelectionModel(); installListeners(); installKeyboardAction...
if (node instanceof TreeNode) return ((TreeNode) node).isLeaf(); else return true;
return tree.getModel().isLeaf(node);
protected boolean isLeaf(int row) { TreePath pathForRow = getPathForRow(tree, row); if (pathForRow == null) return true; Object node = pathForRow.getLastPathComponent(); if (node instanceof TreeNode) return ((TreeNode) node).isLeaf(); else return true; }