bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
|---|---|---|
public void invalidateSizes() { // TODO } // invalidateSizes()
|
public void invalidateSizes() { // TODO } // invalidateSizes()
| 10,521
|
public boolean isExpanded(TreePath value0) { return false; // TODO } // isExpanded()
|
public boolean isExpanded(TreePath value0) { return false; // TODO } // isExpanded()
| 10,522
|
public boolean isExpanded(TreePath value0) { return false; // TODO } // isExpanded()
|
public boolean isExpanded(TreePath value0) { return false; // TODO } // isExpanded()
| 10,523
|
public void setExpandedState(TreePath value0, boolean value1) { // TODO } // setExpandedState()
|
public void setExpandedState(TreePath value0, boolean value1) { // TODO } // setExpandedState()
| 10,524
|
public void setExpandedState(TreePath value0, boolean value1) { // TODO } // setExpandedState()
|
public void setExpandedState(TreePath value0, boolean value1) { // TODO } // setExpandedState()
| 10,525
|
public void setModel(TreeModel value0) { // TODO } // setModel()
|
public void setModel(TreeModel value0) { // TODO } // setModel()
| 10,526
|
public void setModel(TreeModel value0) { // TODO } // setModel()
|
public void setModel(TreeModel value0) { // TODO } // setModel()
| 10,527
|
public void setNodeDimensions(NodeDimensions value0) { // TODO } // setNodeDimensions()
|
public void setNodeDimensions(NodeDimensions value0) { // TODO } // setNodeDimensions()
| 10,528
|
public void setNodeDimensions(NodeDimensions value0) { // TODO } // setNodeDimensions()
|
public void setNodeDimensions(NodeDimensions value0) { // TODO } // setNodeDimensions()
| 10,529
|
public void setRootVisible(boolean value0) { // TODO } // setRootVisible()
|
public void setRootVisible(boolean value0) { // TODO } // setRootVisible()
| 10,530
|
public void setRootVisible(boolean value0) { // TODO } // setRootVisible()
|
public void setRootVisible(boolean value0) { // TODO } // setRootVisible()
| 10,531
|
public void treeNodesChanged(TreeModelEvent value0) { // TODO } // treeNodesChanged()
|
public void treeNodesChanged(TreeModelEvent value0) { // TODO } // treeNodesChanged()
| 10,532
|
public void treeNodesChanged(TreeModelEvent value0) { // TODO } // treeNodesChanged()
|
public void treeNodesChanged(TreeModelEvent value0) { // TODO } // treeNodesChanged()
| 10,533
|
public void treeNodesInserted(TreeModelEvent value0) { // TODO } // treeNodesInserted()
|
public void treeNodesInserted(TreeModelEvent value0) { // TODO } // treeNodesInserted()
| 10,534
|
public void treeNodesInserted(TreeModelEvent value0) { // TODO } // treeNodesInserted()
|
public void treeNodesInserted(TreeModelEvent value0) { // TODO } // treeNodesInserted()
| 10,535
|
public void treeNodesRemoved(TreeModelEvent value0) { // TODO } // treeNodesRemoved()
|
public void treeNodesRemoved(TreeModelEvent value0) { // TODO } // treeNodesRemoved()
| 10,536
|
public void treeNodesRemoved(TreeModelEvent value0) { // TODO } // treeNodesRemoved()
|
public void treeNodesRemoved(TreeModelEvent value0) { // TODO } // treeNodesRemoved()
| 10,537
|
public void treeStructureChanged(TreeModelEvent value0) { // TODO } // treeStructureChanged()
|
public void treeStructureChanged(TreeModelEvent value0) { // TODO } // treeStructureChanged()
| 10,538
|
public void treeStructureChanged(TreeModelEvent value0) { // TODO } // treeStructureChanged()
|
public void treeStructureChanged(TreeModelEvent value0) { // TODO } // treeStructureChanged()
| 10,539
|
public static Binding extract(Any a) { try { return ((BindingHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { throw new BAD_OPERATION("Binding expected"); } }
|
public static Binding extract(Any a) { try { return ((BindingHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { BAD_OPERATION bad = new BAD_OPERATION("Binding expected"); bad.minor = Minor.Any; bad.initCause(ex); throw bad; } }
| 10,540
|
public final void restoreScreen() throws IOException { int which = 0; try {// System.out.println("Restore "); bk.getNextByte(); bk.getNextByte(); int rows = bk.getNextByte() & 0xff; int cols = bk.getNextByte() & 0xff; int pos = bk.getNextByte() << 8 & 0xff00; pos |= bk.getNextByte() & 0xff; int hPos = bk.getNextByte() << 8 & 0xff00; hPos |= bk.getNextByte() & 0xff; if (rows != screen52.getRows()) screen52.setRowsCols(rows,cols); screen52.clearAll(); // initialize what we currenty have int b = 32; int la = 32; int len = rows * cols; for (int y = 0;y < len; y++) { b = bk.getNextByte(); if (isAttribute(b)) { screen52.screen[y].setCharAndAttr( screen52.screen[y].getChar(), b, true); la = b; } else { screen52.screen[y].setCharAndAttr( getASCIIChar(b), la, false); } } int numFields = bk.getNextByte() << 8 & 0xff00; numFields |= bk.getNextByte() & 0xff;// System.out.println("number of fields " + numFields); if (numFields > 0) { int x = 0; int attr = 0; int fPos = 0; int fLen = 0; int ffw1 = 0; int ffw2 = 0; int fcw1 = 0; int fcw2 = 0; boolean mdt = false; ScreenField sf = null; while (x < numFields) { attr = bk.getNextByte(); fPos = bk.getNextByte() << 8 & 0xff00; fPos |= bk.getNextByte() & 0xff; if (bk.getNextByte() == 1) mdt = true; else mdt = false; fLen = bk.getNextByte() << 8 & 0xff00; fLen |= bk.getNextByte() & 0xff; ffw1 = bk.getNextByte(); ffw2 = bk.getNextByte(); fcw1 = bk.getNextByte(); fcw2 = bk.getNextByte(); sf = screen52.getScreenFields().setField(attr, screen52.getRow(fPos), screen52.getCol(fPos), fLen, ffw1, ffw2, fcw1, fcw2); if (mdt) sf.setMDT();// System.out.println("/nRestored ");// System.out.println(sf.toString());// x++; } } screen52.restoreScreen(); // display the screen screen52.homePos = hPos; screen52.goto_XY(pos); screen52.isInField(); if (screen52.isUsingGuiInterface()) screen52.drawFields(); } catch (Exception e) { System.out.println("error restoring screen " + which + " with " + e.getMessage()); } }
|
public final void restoreScreen() throws IOException { int which = 0; try {// System.out.println("Restore "); bk.getNextByte(); bk.getNextByte(); int rows = bk.getNextByte() & 0xff; int cols = bk.getNextByte() & 0xff; int pos = bk.getNextByte() << 8 & 0xff00; pos |= bk.getNextByte() & 0xff; int hPos = bk.getNextByte() << 8 & 0xff00; hPos |= bk.getNextByte() & 0xff; if (rows != screen52.getRows()) screen52.setRowsCols(rows,cols); screen52.clearAll(); // initialize what we currenty have int b = 32; int la = 32; int len = rows * cols; for (int y = 0;y < len; y++) { b = bk.getNextByte(); if (isAttribute(b)) { screen52.screen[y].setCharAndAttr( screen52.screen[y].getChar(), b, true); la = b; } else { screen52.screen[y].setCharAndAttr( getASCIIChar(b), la, false); } } int numFields = bk.getNextByte() << 8 & 0xff00; numFields |= bk.getNextByte() & 0xff;// System.out.println("number of fields " + numFields); if (numFields > 0) { int x = 0; int attr = 0; int fPos = 0; int fLen = 0; int ffw1 = 0; int ffw2 = 0; int fcw1 = 0; int fcw2 = 0; boolean mdt = false; ScreenField sf = null; while (x < numFields) { attr = bk.getNextByte(); fPos = bk.getNextByte() << 8 & 0xff00; fPos |= bk.getNextByte() & 0xff; if (bk.getNextByte() == 1) mdt = true; else mdt = false; fLen = bk.getNextByte() << 8 & 0xff00; fLen |= bk.getNextByte() & 0xff; ffw1 = bk.getNextByte(); ffw2 = bk.getNextByte(); fcw1 = bk.getNextByte(); fcw2 = bk.getNextByte(); sf = screen52.getScreenFields().setField(attr, screen52.getRow(fPos), screen52.getCol(fPos), fLen, ffw1, ffw2, fcw1, fcw2); if (mdt) sf.setMDT();// System.out.println("/nRestored ");// System.out.println(sf.toString());// x++; } } screen52.restoreScreen(); // display the screen screen52.setPendingInsert(true,screen52.getRow(pos), screen52.getCol(pos)); screen52.goto_XY(pos); screen52.isInField(); if (screen52.isUsingGuiInterface()) screen52.drawFields(); } catch (Exception e) { System.out.println("error restoring screen " + which + " with " + e.getMessage()); } }
| 10,541
|
void layoutAlgorithm(Container parent, Direction layoutDir, Direction crossDir) { if (parent != container) throw new AWTError("invalid parent"); Dimension parentSize = parent.getSize(); Insets insets = parent.getInsets(); Dimension innerSize = new Dimension(parentSize.width - insets.left - insets.right, parentSize.height - insets.bottom - insets.top); // Set all components to their preferredSizes and sum up the allocated // space. Create SizeReqs for each component and store them in // sizeReqs. Find the maximum size in the crossing direction. Component[] children = AWTUtilities.getVisibleChildren(parent); Vector sizeReqs = new Vector(); int allocated = 0; for (int i = 0; i < children.length; i++) { Component c = children[i]; SizeReq sizeReq = new SizeReq(c, layoutDir); int preferred = layoutDir.size(c.getPreferredSize()); sizeReq.size = preferred; allocated += preferred; sizeReqs.add(sizeReq); } // Distribute remaining space (may be positive or negative) over components int remainder = layoutDir.size(innerSize) - allocated; distributeSpace(sizeReqs, remainder, layoutDir); // Resize and relocate components. If the component can be sized to // take the full space in the crossing direction, then do so, otherwise // align according to its alingnmentX or alignmentY property. int loc = 0; int offset1 = layoutDir.lower(insets); int offset2 = crossDir.lower(insets); for (Iterator i = sizeReqs.iterator(); i.hasNext();) { SizeReq sizeReq = (SizeReq) i.next(); Component c = sizeReq.comp; int availCrossSize = crossDir.size(innerSize); int maxCross = crossDir.size(c.getMaximumSize()); int crossSize = Math.min(availCrossSize, maxCross); int crossRemainder = availCrossSize - crossSize; int crossLoc = (int) (crossDir.alignment(c) * crossRemainder); layoutDir.setSize(c, sizeReq.size, crossSize); layoutDir.setLocation(c, offset1 + loc, offset2 + crossLoc); loc += sizeReq.size; } }
|
void layoutAlgorithm(Container parent, Direction layoutDir, Direction crossDir) { if (parent != container) throw new AWTError("invalid parent"); Dimension parentSize = parent.getSize(); Insets insets = parent.getInsets(); Dimension innerSize = new Dimension(parentSize.width - insets.left - insets.right, parentSize.height - insets.bottom - insets.top); // Set all components to their preferredSizes and sum up the allocated // space. Create SizeReqs for each component and store them in // sizeReqs. Find the maximum size in the crossing direction. List children = AWTUtilities.getVisibleChildren(parent); Vector sizeReqs = new Vector(); int allocated = 0; for (int i = 0; i < children.length; i++) { Component c = children[i]; SizeReq sizeReq = new SizeReq(c, layoutDir); int preferred = layoutDir.size(c.getPreferredSize()); sizeReq.size = preferred; allocated += preferred; sizeReqs.add(sizeReq); } // Distribute remaining space (may be positive or negative) over components int remainder = layoutDir.size(innerSize) - allocated; distributeSpace(sizeReqs, remainder, layoutDir); // Resize and relocate components. If the component can be sized to // take the full space in the crossing direction, then do so, otherwise // align according to its alingnmentX or alignmentY property. int loc = 0; int offset1 = layoutDir.lower(insets); int offset2 = crossDir.lower(insets); for (Iterator i = sizeReqs.iterator(); i.hasNext();) { SizeReq sizeReq = (SizeReq) i.next(); Component c = sizeReq.comp; int availCrossSize = crossDir.size(innerSize); int maxCross = crossDir.size(c.getMaximumSize()); int crossSize = Math.min(availCrossSize, maxCross); int crossRemainder = availCrossSize - crossSize; int crossLoc = (int) (crossDir.alignment(c) * crossRemainder); layoutDir.setSize(c, sizeReq.size, crossSize); layoutDir.setLocation(c, offset1 + loc, offset2 + crossLoc); loc += sizeReq.size; } }
| 10,542
|
void layoutAlgorithm(Container parent, Direction layoutDir, Direction crossDir) { if (parent != container) throw new AWTError("invalid parent"); Dimension parentSize = parent.getSize(); Insets insets = parent.getInsets(); Dimension innerSize = new Dimension(parentSize.width - insets.left - insets.right, parentSize.height - insets.bottom - insets.top); // Set all components to their preferredSizes and sum up the allocated // space. Create SizeReqs for each component and store them in // sizeReqs. Find the maximum size in the crossing direction. Component[] children = AWTUtilities.getVisibleChildren(parent); Vector sizeReqs = new Vector(); int allocated = 0; for (int i = 0; i < children.length; i++) { Component c = children[i]; SizeReq sizeReq = new SizeReq(c, layoutDir); int preferred = layoutDir.size(c.getPreferredSize()); sizeReq.size = preferred; allocated += preferred; sizeReqs.add(sizeReq); } // Distribute remaining space (may be positive or negative) over components int remainder = layoutDir.size(innerSize) - allocated; distributeSpace(sizeReqs, remainder, layoutDir); // Resize and relocate components. If the component can be sized to // take the full space in the crossing direction, then do so, otherwise // align according to its alingnmentX or alignmentY property. int loc = 0; int offset1 = layoutDir.lower(insets); int offset2 = crossDir.lower(insets); for (Iterator i = sizeReqs.iterator(); i.hasNext();) { SizeReq sizeReq = (SizeReq) i.next(); Component c = sizeReq.comp; int availCrossSize = crossDir.size(innerSize); int maxCross = crossDir.size(c.getMaximumSize()); int crossSize = Math.min(availCrossSize, maxCross); int crossRemainder = availCrossSize - crossSize; int crossLoc = (int) (crossDir.alignment(c) * crossRemainder); layoutDir.setSize(c, sizeReq.size, crossSize); layoutDir.setLocation(c, offset1 + loc, offset2 + crossLoc); loc += sizeReq.size; } }
|
void layoutAlgorithm(Container parent, Direction layoutDir, Direction crossDir) { if (parent != container) throw new AWTError("invalid parent"); Dimension parentSize = parent.getSize(); Insets insets = parent.getInsets(); Dimension innerSize = new Dimension(parentSize.width - insets.left - insets.right, parentSize.height - insets.bottom - insets.top); // Set all components to their preferredSizes and sum up the allocated // space. Create SizeReqs for each component and store them in // sizeReqs. Find the maximum size in the crossing direction. Component[] children = AWTUtilities.getVisibleChildren(parent); Vector sizeReqs = new Vector(); int allocated = 0; for (Iterator i = children.iterator(); i.hasNext();) { Component c = children[i]; SizeReq sizeReq = new SizeReq(c, layoutDir); int preferred = layoutDir.size(c.getPreferredSize()); sizeReq.size = preferred; allocated += preferred; sizeReqs.add(sizeReq); } // Distribute remaining space (may be positive or negative) over components int remainder = layoutDir.size(innerSize) - allocated; distributeSpace(sizeReqs, remainder, layoutDir); // Resize and relocate components. If the component can be sized to // take the full space in the crossing direction, then do so, otherwise // align according to its alingnmentX or alignmentY property. int loc = 0; int offset1 = layoutDir.lower(insets); int offset2 = crossDir.lower(insets); for (Iterator i = sizeReqs.iterator(); i.hasNext();) { SizeReq sizeReq = (SizeReq) i.next(); Component c = sizeReq.comp; int availCrossSize = crossDir.size(innerSize); int maxCross = crossDir.size(c.getMaximumSize()); int crossSize = Math.min(availCrossSize, maxCross); int crossRemainder = availCrossSize - crossSize; int crossLoc = (int) (crossDir.alignment(c) * crossRemainder); layoutDir.setSize(c, sizeReq.size, crossSize); layoutDir.setLocation(c, offset1 + loc, offset2 + crossLoc); loc += sizeReq.size; } }
| 10,543
|
void layoutAlgorithm(Container parent, Direction layoutDir, Direction crossDir) { if (parent != container) throw new AWTError("invalid parent"); Dimension parentSize = parent.getSize(); Insets insets = parent.getInsets(); Dimension innerSize = new Dimension(parentSize.width - insets.left - insets.right, parentSize.height - insets.bottom - insets.top); // Set all components to their preferredSizes and sum up the allocated // space. Create SizeReqs for each component and store them in // sizeReqs. Find the maximum size in the crossing direction. Component[] children = AWTUtilities.getVisibleChildren(parent); Vector sizeReqs = new Vector(); int allocated = 0; for (int i = 0; i < children.length; i++) { Component c = children[i]; SizeReq sizeReq = new SizeReq(c, layoutDir); int preferred = layoutDir.size(c.getPreferredSize()); sizeReq.size = preferred; allocated += preferred; sizeReqs.add(sizeReq); } // Distribute remaining space (may be positive or negative) over components int remainder = layoutDir.size(innerSize) - allocated; distributeSpace(sizeReqs, remainder, layoutDir); // Resize and relocate components. If the component can be sized to // take the full space in the crossing direction, then do so, otherwise // align according to its alingnmentX or alignmentY property. int loc = 0; int offset1 = layoutDir.lower(insets); int offset2 = crossDir.lower(insets); for (Iterator i = sizeReqs.iterator(); i.hasNext();) { SizeReq sizeReq = (SizeReq) i.next(); Component c = sizeReq.comp; int availCrossSize = crossDir.size(innerSize); int maxCross = crossDir.size(c.getMaximumSize()); int crossSize = Math.min(availCrossSize, maxCross); int crossRemainder = availCrossSize - crossSize; int crossLoc = (int) (crossDir.alignment(c) * crossRemainder); layoutDir.setSize(c, sizeReq.size, crossSize); layoutDir.setLocation(c, offset1 + loc, offset2 + crossLoc); loc += sizeReq.size; } }
|
void layoutAlgorithm(Container parent, Direction layoutDir, Direction crossDir) { if (parent != container) throw new AWTError("invalid parent"); Dimension parentSize = parent.getSize(); Insets insets = parent.getInsets(); Dimension innerSize = new Dimension(parentSize.width - insets.left - insets.right, parentSize.height - insets.bottom - insets.top); // Set all components to their preferredSizes and sum up the allocated // space. Create SizeReqs for each component and store them in // sizeReqs. Find the maximum size in the crossing direction. Component[] children = AWTUtilities.getVisibleChildren(parent); Vector sizeReqs = new Vector(); int allocated = 0; for (int i = 0; i < children.length; i++) { Component c = children[i]; SizeReq sizeReq = new SizeReq(c, layoutDir); int preferred = layoutDir.size(c.getPreferredSize()); sizeReq.size = preferred; allocated += preferred; sizeReqs.add(sizeReq); } // Distribute remaining space (may be positive or negative) over components int remainder = layoutDir.size(innerSize) - allocated; distributeSpace(sizeReqs, remainder, layoutDir); // Resize and relocate components. If the component can be sized to // take the full space in the crossing direction, then do so, otherwise // align according to its alingnmentX or alignmentY property. int loc = 0; int offset1 = layoutDir.lower(insets); int offset2 = crossDir.lower(insets); for (Iterator i = sizeReqs.iterator(); i.hasNext();) { SizeReq sizeReq = (SizeReq) i.next(); Component c = sizeReq.comp; int availCrossSize = crossDir.size(innerSize); int maxCross = crossDir.size(c.getMaximumSize()); int crossSize = Math.min(availCrossSize, maxCross); int crossRemainder = availCrossSize - crossSize; int crossLoc = (int) (crossDir.alignment(c) * crossRemainder); layoutDir.setSize(c, sizeReq.size, crossSize); layoutDir.setLocation(c, offset1 + loc, offset2 + crossLoc); loc += sizeReq.size; } }
| 10,544
|
public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.top + insets.bottom; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); x += sz.width; // Check for overflow. if (x < 0) x = Integer.MAX_VALUE; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); y += sz.height; // Check for overflow if (y < 0) y = Integer.MAX_VALUE; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
|
public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.top + insets.bottom; List children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); x += sz.width; // Check for overflow. if (x < 0) x = Integer.MAX_VALUE; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); y += sz.height; // Check for overflow if (y < 0) y = Integer.MAX_VALUE; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
| 10,545
|
public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.top + insets.bottom; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); x += sz.width; // Check for overflow. if (x < 0) x = Integer.MAX_VALUE; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); y += sz.height; // Check for overflow if (y < 0) y = Integer.MAX_VALUE; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
|
public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.top + insets.bottom; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (Iterator i = children.iterator(); i.hasNext();) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); x += sz.width; // Check for overflow. if (x < 0) x = Integer.MAX_VALUE; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (Iterator i = children.iterator(); i.hasNext();) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); y += sz.height; // Check for overflow if (y < 0) y = Integer.MAX_VALUE; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
| 10,546
|
public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.top + insets.bottom; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); x += sz.width; // Check for overflow. if (x < 0) x = Integer.MAX_VALUE; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); y += sz.height; // Check for overflow if (y < 0) y = Integer.MAX_VALUE; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
|
public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.top + insets.bottom; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = (Component) i.next(); Dimension sz = comp.getMaximumSize(); x += sz.width; // Check for overflow. if (x < 0) x = Integer.MAX_VALUE; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = (Component) i.next(); Dimension sz = comp.getMaximumSize(); y += sz.height; // Check for overflow if (y < 0) y = Integer.MAX_VALUE; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
| 10,547
|
public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.top + insets.bottom; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); x += sz.width; // Check for overflow. if (x < 0) x = Integer.MAX_VALUE; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); y += sz.height; // Check for overflow if (y < 0) y = Integer.MAX_VALUE; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
|
public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.top + insets.bottom; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (Iterator i = children.iterator(); i.hasNext();) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); x += sz.width; // Check for overflow. if (x < 0) x = Integer.MAX_VALUE; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (Iterator i = children.iterator(); i.hasNext();) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); y += sz.height; // Check for overflow if (y < 0) y = Integer.MAX_VALUE; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
| 10,548
|
public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.top + insets.bottom; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); x += sz.width; // Check for overflow. if (x < 0) x = Integer.MAX_VALUE; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); y += sz.height; // Check for overflow if (y < 0) y = Integer.MAX_VALUE; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
|
public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.top + insets.bottom; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = (Component) i.next(); Dimension sz = comp.getMaximumSize(); x += sz.width; // Check for overflow. if (x < 0) x = Integer.MAX_VALUE; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = (Component) i.next(); Dimension sz = comp.getMaximumSize(); y += sz.height; // Check for overflow if (y < 0) y = Integer.MAX_VALUE; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
| 10,549
|
public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
|
public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; List children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
| 10,550
|
public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
|
public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (Iterator i = children.iterator(); i.hasNext();) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (Iterator i = children.iterator(); i.hasNext();) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
| 10,551
|
public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
|
public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = (Component) i.next(); Dimension sz = comp.getMinimumSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = (Component) i.next(); Dimension sz = comp.getMinimumSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
| 10,552
|
public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
|
public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (Iterator i = children.iterator(); i.hasNext();) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (Iterator i = children.iterator(); i.hasNext();) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
| 10,553
|
public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
|
public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = (Component) i.next(); Dimension sz = comp.getMinimumSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = (Component) i.next(); Dimension sz = comp.getMinimumSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
| 10,554
|
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = 0; int y = 0; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { x = insets.left + insets.right; // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); x += sz.width; y = Math.max(y, sz.height); } y += insets.bottom + insets.top; } else { y = insets.top + insets.bottom; // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); y += sz.height; x = Math.max(x, sz.width); } x += insets.left + insets.right; } return new Dimension(x, y); }
|
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = 0; int y = 0; List children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { x = insets.left + insets.right; // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); x += sz.width; y = Math.max(y, sz.height); } y += insets.bottom + insets.top; } else { y = insets.top + insets.bottom; // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); y += sz.height; x = Math.max(x, sz.width); } x += insets.left + insets.right; } return new Dimension(x, y); }
| 10,555
|
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = 0; int y = 0; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { x = insets.left + insets.right; // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); x += sz.width; y = Math.max(y, sz.height); } y += insets.bottom + insets.top; } else { y = insets.top + insets.bottom; // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); y += sz.height; x = Math.max(x, sz.width); } x += insets.left + insets.right; } return new Dimension(x, y); }
|
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = 0; int y = 0; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { x = insets.left + insets.right; // sum up preferred widths of components, find maximum of preferred // heights for (Iterator i = children.iterator(); i.hasNext();) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); x += sz.width; y = Math.max(y, sz.height); } y += insets.bottom + insets.top; } else { y = insets.top + insets.bottom; // sum up preferred heights of components, find maximum of // preferred widths for (Iterator i = children.iterator(); i.hasNext();) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); y += sz.height; x = Math.max(x, sz.width); } x += insets.left + insets.right; } return new Dimension(x, y); }
| 10,556
|
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = 0; int y = 0; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { x = insets.left + insets.right; // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); x += sz.width; y = Math.max(y, sz.height); } y += insets.bottom + insets.top; } else { y = insets.top + insets.bottom; // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); y += sz.height; x = Math.max(x, sz.width); } x += insets.left + insets.right; } return new Dimension(x, y); }
|
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = 0; int y = 0; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { x = insets.left + insets.right; // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = (Component) i.next(); Dimension sz = comp.getPreferredSize(); x += sz.width; y = Math.max(y, sz.height); } y += insets.bottom + insets.top; } else { y = insets.top + insets.bottom; // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = (Component) i.next(); Dimension sz = comp.getPreferredSize(); y += sz.height; x = Math.max(x, sz.width); } x += insets.left + insets.right; } return new Dimension(x, y); }
| 10,557
|
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = 0; int y = 0; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { x = insets.left + insets.right; // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); x += sz.width; y = Math.max(y, sz.height); } y += insets.bottom + insets.top; } else { y = insets.top + insets.bottom; // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); y += sz.height; x = Math.max(x, sz.width); } x += insets.left + insets.right; } return new Dimension(x, y); }
|
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = 0; int y = 0; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { x = insets.left + insets.right; // sum up preferred widths of components, find maximum of preferred // heights for (Iterator i = children.iterator(); i.hasNext();) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); x += sz.width; y = Math.max(y, sz.height); } y += insets.bottom + insets.top; } else { y = insets.top + insets.bottom; // sum up preferred heights of components, find maximum of // preferred widths for (Iterator i = children.iterator(); i.hasNext();) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); y += sz.height; x = Math.max(x, sz.width); } x += insets.left + insets.right; } return new Dimension(x, y); }
| 10,558
|
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = 0; int y = 0; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { x = insets.left + insets.right; // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); x += sz.width; y = Math.max(y, sz.height); } y += insets.bottom + insets.top; } else { y = insets.top + insets.bottom; // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); y += sz.height; x = Math.max(x, sz.width); } x += insets.left + insets.right; } return new Dimension(x, y); }
|
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = 0; int y = 0; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { x = insets.left + insets.right; // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = (Component) i.next(); Dimension sz = comp.getPreferredSize(); x += sz.width; y = Math.max(y, sz.height); } y += insets.bottom + insets.top; } else { y = insets.top + insets.bottom; // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = (Component) i.next(); Dimension sz = comp.getPreferredSize(); y += sz.height; x = Math.max(x, sz.width); } x += insets.left + insets.right; } return new Dimension(x, y); }
| 10,559
|
public void endDocument() throws SAXException { // do nothing, method required by interface }
|
XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); public XDF.setXMLNotationHash(Notation); void XDF.setXMLNotationHash(Notation); endDocument() XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); throws XDF.setXMLNotationHash(Notation); SAXException XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); { XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); // XDF.setXMLNotationHash(Notation); do XDF.setXMLNotationHash(Notation); nothing, XDF.setXMLNotationHash(Notation); method XDF.setXMLNotationHash(Notation); required XDF.setXMLNotationHash(Notation); by XDF.setXMLNotationHash(Notation); interface XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); XDF.setXMLNotationHash(Notation); }
| 10,561
|
public void processingInstruction(String target, String data) throws SAXException { Log.debugln("H_PROCESSING_INSTRUCTION:"+"<?"+target+" "+data+"?>"); // do nothing, method required by interface }
|
public void processingInstruction(String target, String data) throws SAXException { Log.debugln("H_PROCESSING_INSTRUCTION:"+"<?"+target+" "+data+"?>"); // do nothing, method required by interface }
| 10,562
|
public void startDocument() throws SAXException { // do nothing, method required by interface }
|
public void startDocument() throws SAXException { // do nothing, method required by interface }
| 10,563
|
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 (colorBg); g2.setColor (Color.black); //--- Translate the origin to be (0,0) g2.translate (pageFormat.getImageableX (), pageFormat.getImageableY ()); int w = (int)pageFormat.getImageableWidth() / numCols; // proposed width int h = (int)pageFormat.getImageableHeight() / numRows; // proposed height Font k = new Font("Courier New",Font.PLAIN,8); LineMetrics l; FontRenderContext f = null; float j = 1; for (; j < 36; j++) { // derive the font and obtain the relevent information to compute // the width and height k = font.deriveFont(j); f = new FontRenderContext(k.getTransform(),true,true); l = k.getLineMetrics("Wy",f); if ( (w < (int)k.getStringBounds("W",f).getWidth() + 1) || h < (int)(k.getStringBounds("g",f).getHeight() + l.getDescent() + l.getLeading()) ) break; } // since we were looking for an overrun of the width or height we need // to adjust the font one down to get the last one that fit. k = font.deriveFont(--j); f = new FontRenderContext(k.getTransform(),true,true); l = k.getLineMetrics("Wy",f); // set the font of the print job g2.setFont(k); // get the width and height of the character bounds int w1 = (int)k.getStringBounds("W",f).getWidth() + 1; int h1 = (int)(k.getStringBounds("g",f).getHeight() + l.getDescent() + l.getLeading()); int x; int y; // loop through all the screen characters and print them out. for (int m = 0;m < numRows; m++) for (int i = 0; i < numCols; i++) { x = w1 * i; y = h1 * m; // only draw printable characters (in this case >= ' ') if (screen[getPos(m,i)].getChar() >= ' ' && !screen[getPos(m,i)].nonDisplay) { g2.drawChars(screen[getPos(m,i)].sChar, 0, 1,x , (int)(y + h1 - (l.getDescent() + l.getLeading())-2)); } // if it is underlined then underline the character if (screen[getPos(m,i)].underLine && !screen[getPos(m,i)].attributePlace) g.drawLine(x, (int)(y + (h1 - l.getLeading()-3)), (int)(x + w1), (int)(y + (h1 - l.getLeading())-3)); } return (PAGE_EXISTS); } else return (NO_SUCH_PAGE); }
|
publicintprint(Graphicsg,PageFormatpageFormat,intpage){Graphics2Dg2;//---Validatethepagenumber,weonlyprintthefirstpageif(page==0){//---Createagraphic2Dobjectandsetthedefaultparametersg2=(Graphics2D)g;//g2.setColor(colorBg);g2.setColor(Color.black);//---Translatetheorigintobe(0,0)g2.translate(pageFormat.getImageableX(),pageFormat.getImageableY());intw=(int)pageFormat.getImageableWidth()/numCols;//proposedwidthinth=(int)pageFormat.getImageableHeight()/numRows;//proposedheightFontk=newFont("CourierNew",Font.PLAIN,8);LineMetricsl;FontRenderContextf=null;floatj=1;for(;j<36;j++){//derivethefontandobtainthereleventinformationtocompute//thewidthandheightk=font.deriveFont(j);f=newFontRenderContext(k.getTransform(),true,true);l=k.getLineMetrics("Wy",f);if((w<(int)k.getStringBounds("W",f).getWidth()+1)||h<(int)(k.getStringBounds("g",f).getHeight()+l.getDescent()+l.getLeading()))break;}//sincewewerelookingforanoverrunofthewidthorheightweneed//toadjustthefontonedowntogetthelastonethatfit.k=font.deriveFont(--j);f=newFontRenderContext(k.getTransform(),true,true);l=k.getLineMetrics("Wy",f);//setthefontoftheprintjobg2.setFont(k);//getthewidthandheightofthecharacterboundsintw1=(int)k.getStringBounds("W",f).getWidth()+1;inth1=(int)(k.getStringBounds("g",f).getHeight()+l.getDescent()+l.getLeading());intx;inty;//loopthroughallthescreencharactersandprintthemout.for(intm=0;m<numRows;m++)for(inti=0;i<numCols;i++){x=w1*i;y=h1*m;//onlydrawprintablecharacters(inthiscase>='')if(screen[getPos(m,i)].getChar()>=''&&!screen[getPos(m,i)].nonDisplay){g2.drawChars(screen[getPos(m,i)].sChar,0,1,x,(int)(y+h1-(l.getDescent()+l.getLeading())-2));}//ifitisunderlinedthenunderlinethecharacterif(screen[getPos(m,i)].underLine&&!screen[getPos(m,i)].attributePlace)g.drawLine(x,(int)(y+(h1-l.getLeading()-3)),(int)(x+w1),(int)(y+(h1-l.getLeading())-3));}return(PAGE_EXISTS);}elsereturn(NO_SUCH_PAGE);}
| 10,564
|
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.MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_COLLATED_COPIES, range, "HP LaserJet", JobAttributes.SidesType.ONE_SIDED);//PrintJob job = tk.getPrintJob(null, "Print", jobAttributes, null);//if (job != null) { //--- Create a printerJob object PrinterJob printJob = PrinterJob.getPrinterJob (); printJob.setJobName("tn5250j"); //--- Set the printable class to this one since we //--- are implementing the Printable interface printJob.setPrintable (this); // set the cursor back session.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); //--- Show a print dialog to the user. If the user //--- clicks the print button, then print, otherwise //--- cancel the print job if (printJob.printDialog()) { try { // we do this because of loosing focus with jdk 1.4.0 session.requestFocus(); printJob.print(); } catch (Exception PrintException) { PrintException.printStackTrace(); } } else { // we do this because of loosing focus with jdk 1.4.0 session.requestFocus(); } session = null; int len = screen.length; for (int x = 0; x < len; x++) { screen[x] = null; } screen = 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.MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_COLLATED_COPIES, range, "HP LaserJet", JobAttributes.SidesType.ONE_SIDED);//PrintJob job = tk.getPrintJob(null, "Print", jobAttributes, null);//if (job != null) { //--- Create a printerJob object PrinterJob printJob = PrinterJob.getPrinterJob (); printJob.setJobName("tn5250j"); //--- Set the printable class to this one since we //--- are implementing the Printable interface printJob.setPrintable (this,pf); // set the cursor back session.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); //--- Show a print dialog to the user. If the user //--- clicks the print button, then print, otherwise //--- cancel the print job if (printJob.printDialog()) { try { // we do this because of loosing focus with jdk 1.4.0 session.requestFocus(); printJob.print(); } catch (Exception PrintException) { PrintException.printStackTrace(); } } else { // we do this because of loosing focus with jdk 1.4.0 session.requestFocus(); } session = null; int len = screen.length; for (int x = 0; x < len; x++) { screen[x] = null; } screen = null; }
| 10,565
|
protected ChangeListener createChangeListener() { return new ChangeListener() { public void stateChanged(ChangeEvent e) { AbstractButton.this.fireStateChanged(); AbstractButton.this.repaint(); } }; }
|
protected ChangeListener createChangeListener() { return new ChangeListener() { public void stateChanged(ChangeEvent e) { AbstractButton.this.fireStateChanged(); AbstractButton.this.repaint(); } }; }
| 10,569
|
private void checkMonitorCanceled() throws InterruptedIOException { if ( monitor.isCanceled() ) { throw new InterruptedIOException("ProgressMonitor was canceled"); } }
|
private void checkMonitorCanceled() throws InterruptedIOException { if (monitor.isCanceled()) { throw new InterruptedIOException("ProgressMonitor was canceled"); } }
| 10,573
|
public Rectangle getViewportBorderBounds(JScrollPane scrollPane) { return null; }
|
public Rectangle getViewportBorderBounds(JScrollPane scrollPane) { return null; }
| 10,574
|
public void layoutContainer(Container parent) { // Sun's implementation simply throws a ClassCastException if // parent is no JScrollPane, so do we. JScrollPane sc = (JScrollPane) parent; JViewport viewport = sc.getViewport(); Component view = viewport.getView(); // If there is no view in the viewport, there is no work to be done. if (view == null) return; Dimension viewSize = viewport.getView().getPreferredSize(); int x1 = 0, x2 = 0, x3 = 0, x4 = 0; int y1 = 0, y2 = 0, y3 = 0, y4 = 0; Rectangle scrollPaneBounds = SwingUtilities.calculateInnerArea(sc, null); x1 = scrollPaneBounds.x; y1 = scrollPaneBounds.y; x4 = scrollPaneBounds.x + scrollPaneBounds.width; y4 = scrollPaneBounds.y + scrollPaneBounds.height; if (colHead != null) y2 = y1 + colHead.getPreferredSize().height; else y2 = y1; if (rowHead != null) x2 = x1 + rowHead.getPreferredSize().width; else x2 = x1; int vsbPolicy = sc.getVerticalScrollBarPolicy(); int hsbPolicy = sc.getHorizontalScrollBarPolicy(); int vsWidth = 0; int hsHeight = 0; boolean showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); if (showVsb) vsWidth = vsb.getPreferredSize().width; // The horizontal scroll bar may become necessary if the vertical scroll // bar appears, reducing the space, left for the component. boolean showHsb = (hsb != null) && ((hsbPolicy == HORIZONTAL_SCROLLBAR_ALWAYS) || (hsbPolicy == HORIZONTAL_SCROLLBAR_AS_NEEDED && viewSize.width > (x4 - x2 - vsWidth))); if (showHsb) hsHeight = hsb.getPreferredSize().height; // If the horizontal scroll bar appears, and the vertical scroll bar // was not necessary assuming that there is no horizontal scroll bar, // the vertical scroll bar may become necessary because the horizontal // scroll bar reduces the vertical space for the component. if (!showVsb) { showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); if (showVsb) vsWidth = vsb.getPreferredSize().width; } x3 = x4 - vsWidth; y3 = y4 - hsHeight; // now set the layout if (viewport != null) viewport.setBounds(new Rectangle(x2, y2, x3 - x2, y3 - y2)); if (colHead != null) colHead.setBounds(new Rectangle(x2, y1, x3 - x2, y2 - y1)); if (rowHead != null) rowHead.setBounds(new Rectangle(x1, y2, x2 - x1, y3 - y2)); if (showVsb) { vsb.setVisible(true); vsb.setBounds(new Rectangle(x3, y2, x4 - x3, y3 - y2)); } else if (vsb != null) vsb.setVisible(false); if (showHsb) { hsb.setVisible(true); hsb.setBounds(new Rectangle(x2, y3, x3 - x2, y4 - y3)); } else if (hsb != null) hsb.setVisible(false); if (upperLeft != null) upperLeft.setBounds(new Rectangle(x1, y1, x2 - x1, y2 - y1)); if (upperRight != null) upperRight.setBounds(new Rectangle(x3, y1, x4 - x3, y2 - y1)); if (lowerLeft != null) lowerLeft.setBounds(new Rectangle(x1, y3, x2 - x1, y4 - y3)); if (lowerRight != null) lowerRight.setBounds(new Rectangle(x3, y3, x4 - x3, y4 - y3)); }
|
public void layoutContainer(Container parent) { // Sun's implementation simply throws a ClassCastException if // parent is no JScrollPane, so do we. JScrollPane sc = (JScrollPane) parent; JViewport viewport = sc.getViewport(); Component view = viewport.getView(); // If there is no view in the viewport, there is no work to be done. if (view == null) return; Dimension viewSize = viewport.getView().getPreferredSize(); int x1 = 0, x2 = 0, x3 = 0, x4 = 0; int y1 = 0, y2 = 0, y3 = 0, y4 = 0; Rectangle scrollPaneBounds = SwingUtilities.calculateInnerArea(sc, null); x1 = scrollPaneBounds.x; y1 = scrollPaneBounds.y; x4 = scrollPaneBounds.x + scrollPaneBounds.width; y4 = scrollPaneBounds.y + scrollPaneBounds.height; if (colHead != null) y2 = y1 + colHead.getPreferredSize().height; else y2 = y1; if (rowHead != null) x2 = x1 + rowHead.getPreferredSize().width; else x2 = x1; int vsbPolicy = sc.getVerticalScrollBarPolicy(); int hsbPolicy = sc.getHorizontalScrollBarPolicy(); int vsWidth = 0; int hsHeight = 0; boolean showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); if (showVsb) vsWidth = vsb.getPreferredSize().width; // The horizontal scroll bar may become necessary if the vertical scroll // bar appears, reducing the space, left for the component. boolean showHsb = (hsb != null) && ((hsbPolicy == HORIZONTAL_SCROLLBAR_ALWAYS) || (hsbPolicy == HORIZONTAL_SCROLLBAR_AS_NEEDED && viewSize.width > (x4 - x2 - vsWidth))); if (showHsb) hsHeight = hsb.getPreferredSize().height; // If the horizontal scroll bar appears, and the vertical scroll bar // was not necessary assuming that there is no horizontal scroll bar, // the vertical scroll bar may become necessary because the horizontal // scroll bar reduces the vertical space for the component. if (!showVsb) { showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); if (showVsb) vsWidth = vsb.getPreferredSize().width; } x3 = x4 - vsWidth; y3 = y4 - hsHeight; // now set the layout if (viewport != null) viewport.setBounds(new Rectangle(x2 + vpi.left, y2 + vpi.top, x3 - x2 - vpi.left - vpi.right, y3 - y2 - vpi.top - vpi.bottom)); if (colHead != null) colHead.setBounds(new Rectangle(x2, y1, x3 - x2, y2 - y1)); if (rowHead != null) rowHead.setBounds(new Rectangle(x1, y2, x2 - x1, y3 - y2)); if (showVsb) { vsb.setVisible(true); vsb.setBounds(new Rectangle(x3, y2, x4 - x3, y3 - y2)); } else if (vsb != null) vsb.setVisible(false); if (showHsb) { hsb.setVisible(true); hsb.setBounds(new Rectangle(x2, y3, x3 - x2, y4 - y3)); } else if (hsb != null) hsb.setVisible(false); if (upperLeft != null) upperLeft.setBounds(new Rectangle(x1, y1, x2 - x1, y2 - y1)); if (upperRight != null) upperRight.setBounds(new Rectangle(x3, y1, x4 - x3, y2 - y1)); if (lowerLeft != null) lowerLeft.setBounds(new Rectangle(x1, y3, x2 - x1, y4 - y3)); if (lowerRight != null) lowerRight.setBounds(new Rectangle(x3, y3, x4 - x3, y4 - y3)); }
| 10,575
|
public void layoutContainer(Container parent) { // Sun's implementation simply throws a ClassCastException if // parent is no JScrollPane, so do we. JScrollPane sc = (JScrollPane) parent; JViewport viewport = sc.getViewport(); Component view = viewport.getView(); // If there is no view in the viewport, there is no work to be done. if (view == null) return; Dimension viewSize = viewport.getView().getPreferredSize(); int x1 = 0, x2 = 0, x3 = 0, x4 = 0; int y1 = 0, y2 = 0, y3 = 0, y4 = 0; Rectangle scrollPaneBounds = SwingUtilities.calculateInnerArea(sc, null); x1 = scrollPaneBounds.x; y1 = scrollPaneBounds.y; x4 = scrollPaneBounds.x + scrollPaneBounds.width; y4 = scrollPaneBounds.y + scrollPaneBounds.height; if (colHead != null) y2 = y1 + colHead.getPreferredSize().height; else y2 = y1; if (rowHead != null) x2 = x1 + rowHead.getPreferredSize().width; else x2 = x1; int vsbPolicy = sc.getVerticalScrollBarPolicy(); int hsbPolicy = sc.getHorizontalScrollBarPolicy(); int vsWidth = 0; int hsHeight = 0; boolean showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); if (showVsb) vsWidth = vsb.getPreferredSize().width; // The horizontal scroll bar may become necessary if the vertical scroll // bar appears, reducing the space, left for the component. boolean showHsb = (hsb != null) && ((hsbPolicy == HORIZONTAL_SCROLLBAR_ALWAYS) || (hsbPolicy == HORIZONTAL_SCROLLBAR_AS_NEEDED && viewSize.width > (x4 - x2 - vsWidth))); if (showHsb) hsHeight = hsb.getPreferredSize().height; // If the horizontal scroll bar appears, and the vertical scroll bar // was not necessary assuming that there is no horizontal scroll bar, // the vertical scroll bar may become necessary because the horizontal // scroll bar reduces the vertical space for the component. if (!showVsb) { showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); if (showVsb) vsWidth = vsb.getPreferredSize().width; } x3 = x4 - vsWidth; y3 = y4 - hsHeight; // now set the layout if (viewport != null) viewport.setBounds(new Rectangle(x2, y2, x3 - x2, y3 - y2)); if (colHead != null) colHead.setBounds(new Rectangle(x2, y1, x3 - x2, y2 - y1)); if (rowHead != null) rowHead.setBounds(new Rectangle(x1, y2, x2 - x1, y3 - y2)); if (showVsb) { vsb.setVisible(true); vsb.setBounds(new Rectangle(x3, y2, x4 - x3, y3 - y2)); } else if (vsb != null) vsb.setVisible(false); if (showHsb) { hsb.setVisible(true); hsb.setBounds(new Rectangle(x2, y3, x3 - x2, y4 - y3)); } else if (hsb != null) hsb.setVisible(false); if (upperLeft != null) upperLeft.setBounds(new Rectangle(x1, y1, x2 - x1, y2 - y1)); if (upperRight != null) upperRight.setBounds(new Rectangle(x3, y1, x4 - x3, y2 - y1)); if (lowerLeft != null) lowerLeft.setBounds(new Rectangle(x1, y3, x2 - x1, y4 - y3)); if (lowerRight != null) lowerRight.setBounds(new Rectangle(x3, y3, x4 - x3, y4 - y3)); }
|
public void layoutContainer(Container parent) { // Sun's implementation simply throws a ClassCastException if // parent is no JScrollPane, so do we. JScrollPane sc = (JScrollPane) parent; JViewport viewport = sc.getViewport(); Component view = viewport.getView(); // If there is no view in the viewport, there is no work to be done. if (view == null) return; Dimension viewSize = viewport.getView().getPreferredSize(); int x1 = 0, x2 = 0, x3 = 0, x4 = 0; int y1 = 0, y2 = 0, y3 = 0, y4 = 0; Rectangle scrollPaneBounds = SwingUtilities.calculateInnerArea(sc, null); x1 = scrollPaneBounds.x; y1 = scrollPaneBounds.y; x4 = scrollPaneBounds.x + scrollPaneBounds.width; y4 = scrollPaneBounds.y + scrollPaneBounds.height; if (colHead != null) y2 = y1 + colHead.getPreferredSize().height; else y2 = y1; if (rowHead != null) x2 = x1 + rowHead.getPreferredSize().width; else x2 = x1; int vsbPolicy = sc.getVerticalScrollBarPolicy(); int hsbPolicy = sc.getHorizontalScrollBarPolicy(); int vsWidth = 0; int hsHeight = 0; boolean showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); if (showVsb) vsWidth = vsb.getPreferredSize().width; // The horizontal scroll bar may become necessary if the vertical scroll // bar appears, reducing the space, left for the component. boolean showHsb = (hsb != null) && ((hsbPolicy == HORIZONTAL_SCROLLBAR_ALWAYS) || (hsbPolicy == HORIZONTAL_SCROLLBAR_AS_NEEDED && viewSize.width > (x4 - x2 - vsWidth))); if (showHsb) hsHeight = hsb.getPreferredSize().height; // If the horizontal scroll bar appears, and the vertical scroll bar // was not necessary assuming that there is no horizontal scroll bar, // the vertical scroll bar may become necessary because the horizontal // scroll bar reduces the vertical space for the component. if (!showVsb) { showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); if (showVsb) vsWidth = vsb.getPreferredSize().width; } x3 = x4 - vsWidth; y3 = y4 - hsHeight; // now set the layout if (viewport != null) viewport.setBounds(new Rectangle(x2, y2, x3 - x2, y3 - y2)); if (colHead != null) colHead.setBounds(new Rectangle(x2, y1, x3 - x2, y2 - y1)); if (rowHead != null) rowHead.setBounds(new Rectangle(x1, y2, x2 - x1, y3 - y2)); if (showVsb) { vsb.setVisible(true); vsb.setBounds(new Rectangle(x3, y2, x4 - x3, y3 - y2 )); } else if (vsb != null) vsb.setVisible(false); if (showHsb) { hsb.setVisible(true); hsb.setBounds(new Rectangle(x2, y3, x3 - x2, y4 - y3)); } else if (hsb != null) hsb.setVisible(false); if (upperLeft != null) upperLeft.setBounds(new Rectangle(x1, y1, x2 - x1, y2 - y1)); if (upperRight != null) upperRight.setBounds(new Rectangle(x3, y1, x4 - x3, y2 - y1)); if (lowerLeft != null) lowerLeft.setBounds(new Rectangle(x1, y3, x2 - x1, y4 - y3)); if (lowerRight != null) lowerRight.setBounds(new Rectangle(x3, y3, x4 - x3, y4 - y3)); }
| 10,576
|
public void layoutContainer(Container parent) { // Sun's implementation simply throws a ClassCastException if // parent is no JScrollPane, so do we. JScrollPane sc = (JScrollPane) parent; JViewport viewport = sc.getViewport(); Component view = viewport.getView(); // If there is no view in the viewport, there is no work to be done. if (view == null) return; Dimension viewSize = viewport.getView().getPreferredSize(); int x1 = 0, x2 = 0, x3 = 0, x4 = 0; int y1 = 0, y2 = 0, y3 = 0, y4 = 0; Rectangle scrollPaneBounds = SwingUtilities.calculateInnerArea(sc, null); x1 = scrollPaneBounds.x; y1 = scrollPaneBounds.y; x4 = scrollPaneBounds.x + scrollPaneBounds.width; y4 = scrollPaneBounds.y + scrollPaneBounds.height; if (colHead != null) y2 = y1 + colHead.getPreferredSize().height; else y2 = y1; if (rowHead != null) x2 = x1 + rowHead.getPreferredSize().width; else x2 = x1; int vsbPolicy = sc.getVerticalScrollBarPolicy(); int hsbPolicy = sc.getHorizontalScrollBarPolicy(); int vsWidth = 0; int hsHeight = 0; boolean showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); if (showVsb) vsWidth = vsb.getPreferredSize().width; // The horizontal scroll bar may become necessary if the vertical scroll // bar appears, reducing the space, left for the component. boolean showHsb = (hsb != null) && ((hsbPolicy == HORIZONTAL_SCROLLBAR_ALWAYS) || (hsbPolicy == HORIZONTAL_SCROLLBAR_AS_NEEDED && viewSize.width > (x4 - x2 - vsWidth))); if (showHsb) hsHeight = hsb.getPreferredSize().height; // If the horizontal scroll bar appears, and the vertical scroll bar // was not necessary assuming that there is no horizontal scroll bar, // the vertical scroll bar may become necessary because the horizontal // scroll bar reduces the vertical space for the component. if (!showVsb) { showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); if (showVsb) vsWidth = vsb.getPreferredSize().width; } x3 = x4 - vsWidth; y3 = y4 - hsHeight; // now set the layout if (viewport != null) viewport.setBounds(new Rectangle(x2, y2, x3 - x2, y3 - y2)); if (colHead != null) colHead.setBounds(new Rectangle(x2, y1, x3 - x2, y2 - y1)); if (rowHead != null) rowHead.setBounds(new Rectangle(x1, y2, x2 - x1, y3 - y2)); if (showVsb) { vsb.setVisible(true); vsb.setBounds(new Rectangle(x3, y2, x4 - x3, y3 - y2)); } else if (vsb != null) vsb.setVisible(false); if (showHsb) { hsb.setVisible(true); hsb.setBounds(new Rectangle(x2, y3, x3 - x2, y4 - y3)); } else if (hsb != null) hsb.setVisible(false); if (upperLeft != null) upperLeft.setBounds(new Rectangle(x1, y1, x2 - x1, y2 - y1)); if (upperRight != null) upperRight.setBounds(new Rectangle(x3, y1, x4 - x3, y2 - y1)); if (lowerLeft != null) lowerLeft.setBounds(new Rectangle(x1, y3, x2 - x1, y4 - y3)); if (lowerRight != null) lowerRight.setBounds(new Rectangle(x3, y3, x4 - x3, y4 - y3)); }
|
public void layoutContainer(Container parent) { // Sun's implementation simply throws a ClassCastException if // parent is no JScrollPane, so do we. JScrollPane sc = (JScrollPane) parent; JViewport viewport = sc.getViewport(); Component view = viewport.getView(); // If there is no view in the viewport, there is no work to be done. if (view == null) return; Dimension viewSize = viewport.getView().getPreferredSize(); int x1 = 0, x2 = 0, x3 = 0, x4 = 0; int y1 = 0, y2 = 0, y3 = 0, y4 = 0; Rectangle scrollPaneBounds = SwingUtilities.calculateInnerArea(sc, null); x1 = scrollPaneBounds.x; y1 = scrollPaneBounds.y; x4 = scrollPaneBounds.x + scrollPaneBounds.width; y4 = scrollPaneBounds.y + scrollPaneBounds.height; if (colHead != null) y2 = y1 + colHead.getPreferredSize().height; else y2 = y1; if (rowHead != null) x2 = x1 + rowHead.getPreferredSize().width; else x2 = x1; int vsbPolicy = sc.getVerticalScrollBarPolicy(); int hsbPolicy = sc.getHorizontalScrollBarPolicy(); int vsWidth = 0; int hsHeight = 0; boolean showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); if (showVsb) vsWidth = vsb.getPreferredSize().width; // The horizontal scroll bar may become necessary if the vertical scroll // bar appears, reducing the space, left for the component. boolean showHsb = (hsb != null) && ((hsbPolicy == HORIZONTAL_SCROLLBAR_ALWAYS) || (hsbPolicy == HORIZONTAL_SCROLLBAR_AS_NEEDED && viewSize.width > (x4 - x2 - vsWidth))); if (showHsb) hsHeight = hsb.getPreferredSize().height; // If the horizontal scroll bar appears, and the vertical scroll bar // was not necessary assuming that there is no horizontal scroll bar, // the vertical scroll bar may become necessary because the horizontal // scroll bar reduces the vertical space for the component. if (!showVsb) { showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); if (showVsb) vsWidth = vsb.getPreferredSize().width; } x3 = x4 - vsWidth; y3 = y4 - hsHeight; // now set the layout if (viewport != null) viewport.setBounds(new Rectangle(x2, y2, x3 - x2, y3 - y2)); if (colHead != null) colHead.setBounds(new Rectangle(x2, y1, x3 - x2, y2 - y1)); if (rowHead != null) rowHead.setBounds(new Rectangle(x1, y2, x2 - x1, y3 - y2)); if (showVsb) { vsb.setVisible(true); vsb.setBounds(new Rectangle(x3, y2, x4 - x3, y3 - y2)); } else if (vsb != null) vsb.setVisible(false); if (showHsb) { hsb.setVisible(true); hsb.setBounds(new Rectangle(x2 , y3, x3 - x2, y4 - y3)); } else if (hsb != null) hsb.setVisible(false); if (upperLeft != null) upperLeft.setBounds(new Rectangle(x1, y1, x2 - x1, y2 - y1)); if (upperRight != null) upperRight.setBounds(new Rectangle(x3, y1, x4 - x3, y2 - y1)); if (lowerLeft != null) lowerLeft.setBounds(new Rectangle(x1, y3, x2 - x1, y4 - y3)); if (lowerRight != null) lowerRight.setBounds(new Rectangle(x3, y3, x4 - x3, y4 - y3)); }
| 10,577
|
public void removeLayoutComponent(Component component) { if (component == viewport) viewport = null; else if (component == vsb) vsb = null; else if (component == hsb) hsb = null; else if (component == rowHead) rowHead = null; else if (component == colHead) colHead = null; else if (component == lowerRight) lowerRight = null; else if (component == upperRight) upperRight = null; else if (component == lowerLeft) lowerLeft = null; else if (component == upperLeft) upperLeft = null; }
|
public void removeLayoutComponent(Component component) { if (component == viewport) viewport = null; else if (component == vsb) vsb = null; else if (component == hsb) hsb = null; else if (component == rowHead) rowHead = null; else if (component == colHead) colHead = null; else if (component == lowerRight) lowerRight = null; else if (component == upperRight) upperRight = null; else if (component == lowerLeft) lowerLeft = null; else if (component == upperLeft) upperLeft = null; }
| 10,580
|
public void syncWithScrollPane(JScrollPane scrollPane) { viewport = scrollPane.getViewport(); rowHead = scrollPane.getRowHeader(); colHead = scrollPane.getColumnHeader(); vsb = scrollPane.getVerticalScrollBar(); hsb = scrollPane.getHorizontalScrollBar(); vsbPolicy = scrollPane.getVerticalScrollBarPolicy(); hsbPolicy = scrollPane.getHorizontalScrollBarPolicy(); lowerLeft = scrollPane.getCorner(LOWER_LEFT_CORNER); lowerRight = scrollPane.getCorner(LOWER_RIGHT_CORNER); upperLeft = scrollPane.getCorner(UPPER_LEFT_CORNER); upperRight = scrollPane.getCorner(UPPER_RIGHT_CORNER); }
|
public void syncWithScrollPane(JScrollPane scrollPane) { viewport = scrollPane.getViewport(); rowHead = scrollPane.getRowHeader(); colHead = scrollPane.getColumnHeader(); vsb = scrollPane.getVerticalScrollBar(); hsb = scrollPane.getHorizontalScrollBar(); vsbPolicy = scrollPane.getVerticalScrollBarPolicy(); hsbPolicy = scrollPane.getHorizontalScrollBarPolicy(); lowerLeft = scrollPane.getCorner(LOWER_LEFT_CORNER); lowerRight = scrollPane.getCorner(LOWER_RIGHT_CORNER); upperLeft = scrollPane.getCorner(UPPER_LEFT_CORNER); upperRight = scrollPane.getCorner(UPPER_RIGHT_CORNER); }
| 10,581
|
private void fireVetoableChange(String name, boolean oldValue, boolean newValue) throws PropertyVetoException { super.fireVetoableChange(name, new Boolean(oldValue), new Boolean(newValue)); }
|
private void fireVetoableChange(String name, boolean oldValue, boolean newValue) throws PropertyVetoException { super.fireVetoableChange(name, Boolean.valueOf(oldValue), Boolean.valueOf(newValue)); }
| 10,582
|
static final void applicationProcessorMain() { final VmX86Processor cpu = (VmX86Processor)Unsafe.getCurrentProcessor(); BootLog.info("Starting Application Processor " + cpu.getId()); // First force a load of CPUID cpu.getCPUID(); // Detect and start logical CPU's try { detectAndstartLogicalProcessors(cpu.rm); } catch (ResourceNotFreeException ex) { BootLog.error("Cannot detect logical processors", ex); } // TODO do something useful. }
|
static final void applicationProcessorMain() throws PragmaLoadStatics { final VmX86Processor cpu = (VmX86Processor)Unsafe.getCurrentProcessor(); BootLog.info("Starting Application Processor " + cpu.getId()); // First force a load of CPUID cpu.getCPUID(); // Detect and start logical CPU's try { detectAndstartLogicalProcessors(cpu.rm); } catch (ResourceNotFreeException ex) { BootLog.error("Cannot detect logical processors", ex); } // TODO do something useful. }
| 10,583
|
private final void setupStructures() { // Clone GDT this.gdt = new GDT(); gdt.setBase(GDT.PROCESSOR_ENTRY, Address.valueOf(this)); // Clone TSS this.tss = new TSS(); gdt.setBase(GDT.TSS_ENTRY, tss.getAddress()); // Create kernel stack tss.setKernelStack(new byte[VmThread.DEFAULT_STACK_SIZE]); // Create user stack final byte[] userStack = new byte[VmThread.DEFAULT_STACK_SIZE]; tss.setUserStack(userStack); this.currentThread = new VmX86Thread(userStack); gdt.dump(System.out); }
|
private final void setupStructures() { // Clone GDT this.gdt = new GDT(); gdt.setBase(GDT.PROCESSOR_ENTRY, Address.valueOf(this)); // Clone TSS this.tss = new TSS(); gdt.setBase(GDT.TSS_ENTRY, tss.getAddress()); // Create kernel stack tss.setKernelStack(new byte[VmThread.DEFAULT_STACK_SIZE]); // Create user stack final byte[] userStack = new byte[VmThread.DEFAULT_STACK_SIZE]; tss.setUserStack(userStack); this.currentThread = new VmX86Thread(userStack); }
| 10,584
|
final void startup(ResourceManager rm) throws ResourceNotFreeException { // Save resource manager, so when this processor starts, it can be // used right away. this.rm = rm; final VmProcessor me = Unsafe.getCurrentProcessor(); BootLog.info("Startup of 0x" + NumberUtils.hex(getId(), 2) + " from " + NumberUtils.hex(me.getId(), 2)); // Setup kernel structures setupStructures(); // Setup the boot code setupBootCode(rm); // Make sure APIC is enabled (the apic of the current CPU!) BootLog.info("Enabling APIC current state " + apic.isEnabled()); apic.setEnabled(true); apic.clearErrors(); //TimeUtils.loop(5000); // Send INIT IPI BootLog.info("Sending INIT IPI"); apic.sendInitIPI(getId(), true); apic.loopUntilNotBusy(); TimeUtils.loop(10); // Send INIT-DeAssert IPI BootLog.info("Sending INIT-DeAssert IPI"); apic.sendInitIPI(getId(), false); apic.loopUntilNotBusy(); TimeUtils.loop(10); final int numStarts = 2; for (int i = 0; i < numStarts; i++) { // Send STARTUP IPI BootLog.info("Sending STARTUP IPI"); apic.clearErrors(); apic.sendStartupIPI(getId(), bootCode.getAddress()); apic.loopUntilNotBusy(); BootLog.info("Not busy"); TimeUtils.loop(100); apic.clearErrors(); } BootLog.info("loop 5000"); TimeUtils.loop(5000); }
|
final void startup(ResourceManager rm) throws ResourceNotFreeException { // Save resource manager, so when this processor starts, it can be // used right away. this.rm = rm; final VmProcessor me = Unsafe.getCurrentProcessor(); BootLog.info("Startup of 0x" + NumberUtils.hex(getId(), 2) + " from " + NumberUtils.hex(me.getId(), 2)); // Setup kernel structures setupStructures(); // Setup the boot code setupBootCode(rm); // Make sure APIC is enabled (the apic of the current CPU!) BootLog.info("Enabling APIC current state " + apic.isEnabled()); apic.setEnabled(true); apic.clearErrors(); //TimeUtils.loop(5000); // Send INIT IPI BootLog.info("Sending INIT IPI"); apic.sendInitIPI(getId(), true); apic.loopUntilNotBusy(); TimeUtils.loop(10); // Send INIT-DeAssert IPI BootLog.info("Sending INIT-DeAssert IPI"); apic.sendInitIPI(getId(), false); apic.loopUntilNotBusy(); TimeUtils.loop(10); final int numStarts = 2; for (int i = 0; i < numStarts; i++) { // Send STARTUP IPI BootLog.info("Sending STARTUP IPI"); apic.clearErrors(); apic.sendStartupIPI(getId(), bootCode.getAddress()); apic.loopUntilNotBusy(); TimeUtils.loop(100); apic.clearErrors(); } BootLog.info("loop 5000"); TimeUtils.loop(5000); }
| 10,585
|
final void startup(ResourceManager rm) throws ResourceNotFreeException { // Save resource manager, so when this processor starts, it can be // used right away. this.rm = rm; final VmProcessor me = Unsafe.getCurrentProcessor(); BootLog.info("Startup of 0x" + NumberUtils.hex(getId(), 2) + " from " + NumberUtils.hex(me.getId(), 2)); // Setup kernel structures setupStructures(); // Setup the boot code setupBootCode(rm); // Make sure APIC is enabled (the apic of the current CPU!) BootLog.info("Enabling APIC current state " + apic.isEnabled()); apic.setEnabled(true); apic.clearErrors(); //TimeUtils.loop(5000); // Send INIT IPI BootLog.info("Sending INIT IPI"); apic.sendInitIPI(getId(), true); apic.loopUntilNotBusy(); TimeUtils.loop(10); // Send INIT-DeAssert IPI BootLog.info("Sending INIT-DeAssert IPI"); apic.sendInitIPI(getId(), false); apic.loopUntilNotBusy(); TimeUtils.loop(10); final int numStarts = 2; for (int i = 0; i < numStarts; i++) { // Send STARTUP IPI BootLog.info("Sending STARTUP IPI"); apic.clearErrors(); apic.sendStartupIPI(getId(), bootCode.getAddress()); apic.loopUntilNotBusy(); BootLog.info("Not busy"); TimeUtils.loop(100); apic.clearErrors(); } BootLog.info("loop 5000"); TimeUtils.loop(5000); }
|
final void startup(ResourceManager rm) throws ResourceNotFreeException { // Save resource manager, so when this processor starts, it can be // used right away. this.rm = rm; final VmProcessor me = Unsafe.getCurrentProcessor(); BootLog.info("Startup of 0x" + NumberUtils.hex(getId(), 2) + " from " + NumberUtils.hex(me.getId(), 2)); // Setup kernel structures setupStructures(); // Setup the boot code setupBootCode(rm); // Make sure APIC is enabled (the apic of the current CPU!) BootLog.info("Enabling APIC current state " + apic.isEnabled()); apic.setEnabled(true); apic.clearErrors(); //TimeUtils.loop(5000); // Send INIT IPI BootLog.info("Sending INIT IPI"); apic.sendInitIPI(getId(), true); apic.loopUntilNotBusy(); TimeUtils.loop(10); // Send INIT-DeAssert IPI BootLog.info("Sending INIT-DeAssert IPI"); apic.sendInitIPI(getId(), false); apic.loopUntilNotBusy(); TimeUtils.loop(10); final int numStarts = 2; for (int i = 0; i < numStarts; i++) { // Send STARTUP IPI BootLog.info("Sending STARTUP IPI"); apic.clearErrors(); apic.sendStartupIPI(getId(), bootCode.getAddress()); apic.loopUntilNotBusy(); BootLog.info("Not busy"); TimeUtils.loop(100); apic.clearErrors(); } BootLog.info("loop 5000"); TimeUtils.loop(5000); }
| 10,586
|
public Component getCorner(String key) { if (getComponentOrientation() == ComponentOrientation.LEFT_TO_RIGHT) { if (key == LOWER_LEADING_CORNER) key = LOWER_LEFT_CORNER; else if (key == LOWER_TRAILING_CORNER) key = LOWER_RIGHT_CORNER; else if (key == UPPER_LEADING_CORNER) key = UPPER_LEFT_CORNER; else if (key == UPPER_TRAILING_CORNER) key = UPPER_RIGHT_CORNER; } else if (getComponentOrientation() == ComponentOrientation.RIGHT_TO_LEFT) { if (key == LOWER_LEADING_CORNER) key = LOWER_RIGHT_CORNER; else if (key == LOWER_TRAILING_CORNER) key = LOWER_LEFT_CORNER; else if (key == UPPER_LEADING_CORNER) key = UPPER_RIGHT_CORNER; else if (key == UPPER_TRAILING_CORNER) key = UPPER_LEFT_CORNER; } if (key == LOWER_RIGHT_CORNER) return lowerRight; else if (key == UPPER_RIGHT_CORNER) return upperRight; else if (key == LOWER_LEFT_CORNER) return lowerLeft; else if (key == UPPER_LEFT_CORNER) return upperLeft; return null; }
|
public Component getCorner(String key) { if (getComponentOrientation() == ComponentOrientation.LEFT_TO_RIGHT) { if (key == LOWER_LEADING_CORNER) key = LOWER_LEFT_CORNER; else if (key == LOWER_TRAILING_CORNER) key = LOWER_RIGHT_CORNER; else if (key == UPPER_LEADING_CORNER) key = UPPER_LEFT_CORNER; else if (key == UPPER_TRAILING_CORNER) key = UPPER_RIGHT_CORNER; } else if (getComponentOrientation() == ComponentOrientation.RIGHT_TO_LEFT) { if (key == LOWER_LEADING_CORNER) key = LOWER_RIGHT_CORNER; else if (key == LOWER_TRAILING_CORNER) key = LOWER_LEFT_CORNER; else if (key == UPPER_LEADING_CORNER) key = UPPER_RIGHT_CORNER; else if (key == UPPER_TRAILING_CORNER) key = UPPER_LEFT_CORNER; } if (key == LOWER_RIGHT_CORNER) return lowerRight; else if (key == UPPER_RIGHT_CORNER) return upperRight; else if (key == LOWER_LEFT_CORNER) return lowerLeft; else if (key == UPPER_LEFT_CORNER) return upperLeft; return null; }
| 10,587
|
public Rectangle getViewportBorderBounds() { if (viewportBorder == null) { if (getViewport() == null) return new Rectangle(0,0,0,0); else return getViewport().getBounds(); } else { Insets i = viewportBorder.getBorderInsets(getViewport()); if (getViewport() == null) return new Rectangle(0,0, i.left+i.right, i.top+i.bottom); else { Rectangle b = getViewport().getBounds(); return new Rectangle(b.x - i.left, b.y - i.top, b.width + i.left + i.right, b.height + i.top + i.bottom); } } }
|
public Rectangle getViewportBorderBounds() { if (viewportBorder == null) { if (getViewport() == null) return new Rectangle(0, 0, 0, 0); else return getViewport().getBounds(); } else { Insets i = viewportBorder.getBorderInsets(getViewport()); if (getViewport() == null) return new Rectangle(0,0, i.left+i.right, i.top+i.bottom); else { Rectangle b = getViewport().getBounds(); return new Rectangle(b.x - i.left, b.y - i.top, b.width + i.left + i.right, b.height + i.top + i.bottom); } } }
| 10,588
|
public Rectangle getViewportBorderBounds() { if (viewportBorder == null) { if (getViewport() == null) return new Rectangle(0,0,0,0); else return getViewport().getBounds(); } else { Insets i = viewportBorder.getBorderInsets(getViewport()); if (getViewport() == null) return new Rectangle(0,0, i.left+i.right, i.top+i.bottom); else { Rectangle b = getViewport().getBounds(); return new Rectangle(b.x - i.left, b.y - i.top, b.width + i.left + i.right, b.height + i.top + i.bottom); } } }
|
public Rectangle getViewportBorderBounds() { if (viewportBorder == null) { if (getViewport() == null) return new Rectangle(0,0,0,0); else return getViewport().getBounds(); } else { Insets i = viewportBorder.getBorderInsets(getViewport()); if (getViewport() == null) return new Rectangle(0,0, i.left+i.right, i.top+i.bottom); else { Rectangle b = getViewport().getBounds(); return new Rectangle(b.x - i.left, b.y - i.top, b.width + i.left + i.right, b.height + i.top + i.bottom); } } }
| 10,589
|
addLayoutComponent(Component component, Object constraints){ if (constraints != null && ! (constraints instanceof String)) throw new IllegalArgumentException("Constraint must be a string"); String str = (String)constraints; if (str == null || str.equals(CENTER)) center = component; else if (str.equals(NORTH)) north = component; else if (str.equals(SOUTH)) south = component; else if (str.equals(EAST)) east = component; else if (str.equals(WEST)) west = component; else if (str.equals(BEFORE_FIRST_LINE)) firstLine = component; else if (str.equals(AFTER_LAST_LINE)) lastLine = component; else if (str.equals(BEFORE_LINE_BEGINS)) firstItem = component; else if (str.equals(AFTER_LINE_ENDS)) lastItem = component; else throw new IllegalArgumentException("Constraint value not valid: " + str);}
|
addLayoutComponent(Component component, Object constraints){ if (constraints != null && ! (constraints instanceof String)) throw new IllegalArgumentException("Constraint must be a string"); String str = (String)constraints; if (str == null || str.equals(CENTER)) center = component; else if (str.equals(NORTH)) north = component; else if (str.equals(SOUTH)) south = component; else if (str.equals(EAST)) east = component; else if (str.equals(WEST)) west = component; else if (str.equals(BEFORE_FIRST_LINE)) firstLine = component; else if (str.equals(AFTER_LAST_LINE)) lastLine = component; else if (str.equals(BEFORE_LINE_BEGINS)) firstItem = component; else if (str.equals(AFTER_LINE_ENDS)) lastItem = component; else throw new IllegalArgumentException("Constraint value not valid: " + str);}
| 10,590
|
calcCompSize(Component comp, int what){ if (comp == null) return new Dimension(0, 0); if (what == MIN) return comp.getMinimumSize(); else if (what == MAX) return comp.getMaximumSize(); return comp.getPreferredSize();}
|
calcCompSize(Component comp, int what){ if (comp == null || !comp.isVisible()) return new Dimension(0, 0); if (what == MIN) return comp.getMinimumSize(); else if (what == MAX) return comp.getMaximumSize(); return comp.getPreferredSize();}
| 10,591
|
layoutContainer(Container target){ synchronized (target.getTreeLock ()) { Insets i = target.getInsets(); ComponentOrientation orient = target.getComponentOrientation (); boolean left_to_right = orient.isLeftToRight (); Component my_north = north; Component my_east = east; Component my_south = south; Component my_west = west; // Note that we currently don't handle vertical layouts. Neither // does JDK 1.3. if (firstLine != null) my_north = firstLine; if (lastLine != null) my_south = lastLine; if (firstItem != null) { if (left_to_right) my_west = firstItem; else my_east = firstItem; } if (lastItem != null) { if (left_to_right) my_east = lastItem; else my_west = lastItem; } Dimension c = calcCompSize(center, PREF); Dimension n = calcCompSize(my_north, PREF); Dimension s = calcCompSize(my_south, PREF); Dimension e = calcCompSize(my_east, PREF); Dimension w = calcCompSize(my_west, PREF); Dimension t = target.getSize(); /* <-> hgap <-> hgap +----------------------------+ } |t | } i.top | +----------------------+ | --- y1 } | |n | | | +----------------------+ | } vgap | +---+ +----------+ +---+ | --- y2 } } | |w | |c | |e | | } hh | +---+ +----------+ +---+ | } vgap } | +----------------------+ | --- y3 } | |s | | | +----------------------+ | } | | } i.bottom +----------------------------+ } |x1 |x2 |x3 <----------------------> <--> ww <--> i.left i.right */ int x1 = i.left; int x2 = x1 + w.width + hgap; int x3 = t.width - i.right - e.width; int ww = t.width - i.right - i.left; int y1 = i.top; int y2 = y1 + n.height + vgap; int y3 = t.height - i.bottom - s.height; int hh = y3-y2-vgap; setBounds(center, x2, y2, x3-x2-hgap, hh); setBounds(my_north, x1, y1, ww, n.height); setBounds(my_south, x1, y3, ww, s.height); setBounds(my_west, x1, y2, w.width, hh); setBounds(my_east, x3, y2, e.width, hh); }}
|
layoutContainer(Container target){ synchronized (target.getTreeLock ()) { Insets i = target.getInsets(); ComponentOrientation orient = target.getComponentOrientation (); boolean left_to_right = orient.isLeftToRight (); Component my_north = north; Component my_east = east; Component my_south = south; Component my_west = west; // Note that we currently don't handle vertical layouts. Neither // does JDK 1.3. if (firstLine != null) my_north = firstLine; if (lastLine != null) my_south = lastLine; if (firstItem != null) { if (left_to_right) my_west = firstItem; else my_east = firstItem; } if (lastItem != null) { if (left_to_right) my_east = lastItem; else my_west = lastItem; } Dimension c = calcCompSize(center, PREF); Dimension n = calcCompSize(my_north, PREF); Dimension s = calcCompSize(my_south, PREF); Dimension e = calcCompSize(my_east, PREF); Dimension w = calcCompSize(my_west, PREF); Dimension t = target.getSize(); /* <-> hgap <-> hgap +----------------------------+ } |t | } i.top | +----------------------+ | --- y1 } | |n | | | +----------------------+ | } vgap | +---+ +----------+ +---+ | --- y2 } } | |w | |c | |e | | } hh | +---+ +----------+ +---+ | } vgap } | +----------------------+ | --- y3 } | |s | | | +----------------------+ | } | | } i.bottom +----------------------------+ } |x1 |x2 |x3 <----------------------> <--> ww <--> i.left i.right */ int x1 = i.left; int x2 = x1 + w.width + hgap; int x3 = Math.max(x2 + w.width + hgap, t.width - i.right - e.width); int ww = t.width - i.right - i.left; int y1 = i.top; int y2 = y1 + n.height + vgap; int y3 = t.height - i.bottom - s.height; int hh = y3-y2-vgap; setBounds(center, x2, y2, x3-x2-hgap, hh); setBounds(my_north, x1, y1, ww, n.height); setBounds(my_south, x1, y3, ww, s.height); setBounds(my_west, x1, y2, w.width, hh); setBounds(my_east, x3, y2, e.width, hh); }}
| 10,592
|
layoutContainer(Container target){ synchronized (target.getTreeLock ()) { Insets i = target.getInsets(); ComponentOrientation orient = target.getComponentOrientation (); boolean left_to_right = orient.isLeftToRight (); Component my_north = north; Component my_east = east; Component my_south = south; Component my_west = west; // Note that we currently don't handle vertical layouts. Neither // does JDK 1.3. if (firstLine != null) my_north = firstLine; if (lastLine != null) my_south = lastLine; if (firstItem != null) { if (left_to_right) my_west = firstItem; else my_east = firstItem; } if (lastItem != null) { if (left_to_right) my_east = lastItem; else my_west = lastItem; } Dimension c = calcCompSize(center, PREF); Dimension n = calcCompSize(my_north, PREF); Dimension s = calcCompSize(my_south, PREF); Dimension e = calcCompSize(my_east, PREF); Dimension w = calcCompSize(my_west, PREF); Dimension t = target.getSize(); /* <-> hgap <-> hgap +----------------------------+ } |t | } i.top | +----------------------+ | --- y1 } | |n | | | +----------------------+ | } vgap | +---+ +----------+ +---+ | --- y2 } } | |w | |c | |e | | } hh | +---+ +----------+ +---+ | } vgap } | +----------------------+ | --- y3 } | |s | | | +----------------------+ | } | | } i.bottom +----------------------------+ } |x1 |x2 |x3 <----------------------> <--> ww <--> i.left i.right */ int x1 = i.left; int x2 = x1 + w.width + hgap; int x3 = t.width - i.right - e.width; int ww = t.width - i.right - i.left; int y1 = i.top; int y2 = y1 + n.height + vgap; int y3 = t.height - i.bottom - s.height; int hh = y3-y2-vgap; setBounds(center, x2, y2, x3-x2-hgap, hh); setBounds(my_north, x1, y1, ww, n.height); setBounds(my_south, x1, y3, ww, s.height); setBounds(my_west, x1, y2, w.width, hh); setBounds(my_east, x3, y2, e.width, hh); }}
|
layoutContainer(Container target){ synchronized (target.getTreeLock ()) { Insets i = target.getInsets(); ComponentOrientation orient = target.getComponentOrientation (); boolean left_to_right = orient.isLeftToRight (); Component my_north = north; Component my_east = east; Component my_south = south; Component my_west = west; // Note that we currently don't handle vertical layouts. Neither // does JDK 1.3. if (firstLine != null) my_north = firstLine; if (lastLine != null) my_south = lastLine; if (firstItem != null) { if (left_to_right) my_west = firstItem; else my_east = firstItem; } if (lastItem != null) { if (left_to_right) my_east = lastItem; else my_west = lastItem; } Dimension c = calcCompSize(center, PREF); Dimension n = calcCompSize(my_north, PREF); Dimension s = calcCompSize(my_south, PREF); Dimension e = calcCompSize(my_east, PREF); Dimension w = calcCompSize(my_west, PREF); Dimension t = target.getSize(); /* <-> hgap <-> hgap +----------------------------+ } |t | } i.top | +----------------------+ | --- y1 } | |n | | | +----------------------+ | } vgap | +---+ +----------+ +---+ | --- y2 } } | |w | |c | |e | | } hh | +---+ +----------+ +---+ | } vgap } | +----------------------+ | --- y3 } | |s | | | +----------------------+ | } | | } i.bottom +----------------------------+ } |x1 |x2 |x3 <----------------------> <--> ww <--> i.left i.right */ int x1 = i.left; int x2 = x1 + w.width + hgap; int x3 = t.width - i.right - e.width; int ww = t.width - i.right - i.left; int y1 = i.top; int y2 = y1 + n.height + vgap; int midh = Math.max(e.height, Math.max(w.height, c.height)); int y3 = Math.max(y2 + midh + vgap, t.height - i.bottom - s.height); int hh = y3-y2-vgap; setBounds(center, x2, y2, x3-x2-hgap, hh); setBounds(my_north, x1, y1, ww, n.height); setBounds(my_south, x1, y3, ww, s.height); setBounds(my_west, x1, y2, w.width, hh); setBounds(my_east, x3, y2, e.width, hh); }}
| 10,593
|
public void keyPressed(KeyEvent e) { }
|
public void keyPressed(KeyEvent evt) { }
| 10,594
|
private void updateSelection(boolean controlPressed) { if (table.getRowSelectionAllowed()) { int lo_row = table.rowAtPoint(begin); int hi_row = table.rowAtPoint(curr); ListSelectionModel rowModel = table.getSelectionModel(); if (lo_row != -1 && hi_row != -1) { if (controlPressed && rowModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) rowModel.addSelectionInterval(lo_row, hi_row); else rowModel.setSelectionInterval(lo_row, hi_row); } } if (table.getColumnSelectionAllowed()) { int lo_col = table.columnAtPoint(begin); int hi_col = table.columnAtPoint(curr); ListSelectionModel colModel = table.getColumnModel(). getSelectionModel(); if (lo_col != -1 && hi_col != -1) { if (controlPressed && colModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) colModel.addSelectionInterval(lo_col, hi_col); else colModel.setSelectionInterval(lo_col, hi_col); } } }
|
private void updateSelection(boolean controlPressed) { if (table.getRowSelectionAllowed()) { int lo_row = table.rowAtPoint(begin); int hi_row = table.rowAtPoint(curr); ListSelectionModel rowModel = table.getSelectionModel(); if (lo_row != -1 && hi_row != -1) { if (controlPressed && rowModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) rowModel.addSelectionInterval(lo_row, hi_row); else rowModel.setSelectionInterval(lo_row, hi_row); } } if (table.getColumnSelectionAllowed()) { int lo_col = table.columnAtPoint(begin); int hi_col = table.columnAtPoint(curr); ListSelectionModel colModel = table.getColumnModel(). getSelectionModel(); if (lo_col != -1 && hi_col != -1) { if (controlPressed && colModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) colModel.addSelectionInterval(lo_col, hi_col); else colModel.setSelectionInterval(lo_col, hi_col); } } }
| 10,596
|
private void updateSelection(boolean controlPressed) { if (table.getRowSelectionAllowed()) { int lo_row = table.rowAtPoint(begin); int hi_row = table.rowAtPoint(curr); ListSelectionModel rowModel = table.getSelectionModel(); if (lo_row != -1 && hi_row != -1) { if (controlPressed && rowModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) rowModel.addSelectionInterval(lo_row, hi_row); else rowModel.setSelectionInterval(lo_row, hi_row); } } if (table.getColumnSelectionAllowed()) { int lo_col = table.columnAtPoint(begin); int hi_col = table.columnAtPoint(curr); ListSelectionModel colModel = table.getColumnModel(). getSelectionModel(); if (lo_col != -1 && hi_col != -1) { if (controlPressed && colModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) colModel.addSelectionInterval(lo_col, hi_col); else colModel.setSelectionInterval(lo_col, hi_col); } } }
|
private void updateSelection(boolean controlPressed) { if (table.getRowSelectionAllowed()) { int lo_row = table.rowAtPoint(begin); int hi_row = table.rowAtPoint(curr); ListSelectionModel rowModel = table.getSelectionModel(); if (lo_row != -1 && hi_row != -1) { if (controlPressed && rowModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) rowModel.addSelectionInterval(lo_row, hi_row); else rowModel.setSelectionInterval(lo_row, hi_row); if (table.getColumnSelectionAllowed()) { int lo_col = table.columnAtPoint(begin); int hi_col = table.columnAtPoint(curr); ListSelectionModel colModel = table.getColumnModel(). getSelectionModel(); if (lo_col != -1 && hi_col != -1) { if (controlPressed && colModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) colModel.addSelectionInterval(lo_col, hi_col); else colModel.setSelectionInterval(lo_col, hi_col); }
| 10,597
|
private void updateSelection(boolean controlPressed) { if (table.getRowSelectionAllowed()) { int lo_row = table.rowAtPoint(begin); int hi_row = table.rowAtPoint(curr); ListSelectionModel rowModel = table.getSelectionModel(); if (lo_row != -1 && hi_row != -1) { if (controlPressed && rowModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) rowModel.addSelectionInterval(lo_row, hi_row); else rowModel.setSelectionInterval(lo_row, hi_row); } } if (table.getColumnSelectionAllowed()) { int lo_col = table.columnAtPoint(begin); int hi_col = table.columnAtPoint(curr); ListSelectionModel colModel = table.getColumnModel(). getSelectionModel(); if (lo_col != -1 && hi_col != -1) { if (controlPressed && colModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) colModel.addSelectionInterval(lo_col, hi_col); else colModel.setSelectionInterval(lo_col, hi_col); } } }
|
private void updateSelection(boolean controlPressed) { if (table.getRowSelectionAllowed()) { int lo_row = table.rowAtPoint(begin); int hi_row = table.rowAtPoint(curr); ListSelectionModel rowModel = table.getSelectionModel(); if (lo_row != -1 && hi_row != -1) { if (controlPressed && rowModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) rowModel.addSelectionInterval(lo_row, hi_row); else rowModel.setSelectionInterval(lo_row, hi_row); } } if (table.getColumnSelectionAllowed()) { int lo_col = table.columnAtPoint(begin); int hi_col = table.columnAtPoint(curr); ListSelectionModel colModel = table.getColumnModel(). getSelectionModel(); if (lo_col != -1 && hi_col != -1) { if (controlPressed && colModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) colModel.addSelectionInterval(lo_col, hi_col); else colModel.setSelectionInterval(lo_col, hi_col); } } }
| 10,598
|
private void updateSelection(boolean controlPressed) { if (table.getRowSelectionAllowed()) { int lo_row = table.rowAtPoint(begin); int hi_row = table.rowAtPoint(curr); ListSelectionModel rowModel = table.getSelectionModel(); if (lo_row != -1 && hi_row != -1) { if (controlPressed && rowModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) rowModel.addSelectionInterval(lo_row, hi_row); else rowModel.setSelectionInterval(lo_row, hi_row); } } if (table.getColumnSelectionAllowed()) { int lo_col = table.columnAtPoint(begin); int hi_col = table.columnAtPoint(curr); ListSelectionModel colModel = table.getColumnModel(). getSelectionModel(); if (lo_col != -1 && hi_col != -1) { if (controlPressed && colModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) colModel.addSelectionInterval(lo_col, hi_col); else colModel.setSelectionInterval(lo_col, hi_col); } } }
|
private void updateSelection(boolean controlPressed) { if (table.getRowSelectionAllowed()) { int lo_row = table.rowAtPoint(begin); int hi_row = table.rowAtPoint(curr); ListSelectionModel rowModel = table.getSelectionModel(); if (lo_row != -1 && hi_row != -1) { if (controlPressed && rowModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) rowModel.addSelectionInterval(lo_row, hi_row); else rowModel.setSelectionInterval(lo_row, hi_row); if (table.getColumnSelectionAllowed()) { int lo_col = table.columnAtPoint(begin); int hi_col = table.columnAtPoint(curr); ListSelectionModel colModel = table.getColumnModel(). getSelectionModel(); if (lo_col != -1 && hi_col != -1) { if (controlPressed && colModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) colModel.addSelectionInterval(lo_col, hi_col); else colModel.setSelectionInterval(lo_col, hi_col); }
| 10,599
|
public final OutputStream _invoke(String method, InputStream input, ResponseHandler rh ) { OutputStream output = null; if (method.equals("destroy")) { // The "destroy" has been invoked. destroy(); output = rh.createReply(); } else if (method.equals("copy")) { // The "copy" has been invoked. org.omg.CORBA.Object returns = copy(); output = rh.createReply(); output.write_Object(this); } else if (method.equals("policy_type")) { // The "policy_type" has been invoked. int returns = policy_type(); output = rh.createReply(); output.write_long(returns); } else if (method.equals("value")) { // The "value" can be invoked on the children types // and must return an integer, representing the policy value // (CORBA enumeration). output = rh.createReply(); output.write_long(policyCode); } else throw new BAD_OPERATION(method, 0, CompletionStatus.COMPLETED_MAYBE); return output; }
|
public final OutputStream _invoke(String method, InputStream input, ResponseHandler rh ) { OutputStream output = null; if (method.equals("destroy")) { // The "destroy" has been invoked. destroy(); output = rh.createReply(); } else if (method.equals("copy")) { // The "copy" has been invoked. org.omg.CORBA.Object returns = copy(); output = rh.createReply(); output.write_Object(this); } else if (method.equals("policy_type")) { // The "policy_type" has been invoked. int returns = policy_type(); output = rh.createReply(); output.write_long(returns); } else if (method.equals("value")) { // The "value" can be invoked on the children types // and must return an integer, representing the policy value // (CORBA enumeration). output = rh.createReply(); output.write_long(policyCode); } else throw new BAD_OPERATION(method, Minor.Method, CompletionStatus.COMPLETED_MAYBE); return output; }
| 10,601
|
public FatLfnDirectory(FatFileSystem fs, int nrEntries) { super(fs, nrEntries); }
|
public FatLfnDirectory(FatFileSystem fs, int nrEntries) { super(fs, nrEntries); }
| 10,603
|
public synchronized void write(BlockDeviceAPI device, long offset) throws IOException { if (label != null) applyLabel(); final byte[] data = new byte[entries.size() * 32]; write(data); device.write(offset, data, 0, data.length); resetDirty(); }
|
public synchronized void write(BlockDeviceAPI device, long offset) throws IOException { if (label != null) applyLabel(); final byte[] data = new byte[entries.size() * 32]; write(data); device.write(offset, data, 0, data.length); resetDirty(); }
| 10,604
|
public synchronized void write(BlockDeviceAPI device, long offset) throws IOException { if (label != null) applyLabel(); final byte[] data = new byte[entries.size() * 32]; write(data); device.write(offset, data, 0, data.length); resetDirty(); }
|
public synchronized void write(BlockDeviceAPI device, long offset) throws IOException { if (label != null) applyLabel(); final byte[] data = new byte[entries.size() * 32]; write(data); device.write(offset, data, 0, data.length); resetDirty(); }
| 10,605
|
protected final void setCharacterAttributes(JEditorPane editor, AttributeSet atts, boolean replace) { Document doc = editor.getDocument(); if (doc instanceof StyledDocument) { StyledDocument styleDoc = (StyledDocument) editor.getDocument(); EditorKit kit = editor.getEditorKit(); if (!(kit instanceof StyledEditorKit)) { StyledEditorKit styleKit = (StyledEditorKit) kit; int start = editor.getSelectionStart(); int end = editor.getSelectionEnd(); int dot = editor.getCaret().getDot(); if (start == dot && end == dot) { // If there is no selection, then we only update the // input attributes. MutableAttributeSet inputAttributes = styleKit.getInputAttributes(); inputAttributes.addAttributes(atts); } else styleDoc.setCharacterAttributes(start, end, atts, replace); } else throw new AssertionError("The EditorKit for StyledTextActions " + "is expected to be a StyledEditorKit"); } else throw new AssertionError("The Document for StyledTextActions is " + "expected to be a StyledDocument."); }
|
protected final void setCharacterAttributes(JEditorPane editor, AttributeSet atts, boolean replace) { Document doc = editor.getDocument(); if (doc instanceof StyledDocument) { StyledDocument styleDoc = (StyledDocument) editor.getDocument(); EditorKit kit = editor.getEditorKit(); if (!(kit instanceof StyledEditorKit)) { StyledEditorKit styleKit = (StyledEditorKit) kit; int start = editor.getSelectionStart(); int end = editor.getSelectionEnd(); int dot = editor.getCaret().getDot(); if (start == dot && end == dot) { // If there is no selection, then we only update the // input attributes. MutableAttributeSet inputAttributes = styleKit.getInputAttributes(); inputAttributes.addAttributes(atts); } else styleDoc.setCharacterAttributes(start, end, atts, replace); } else throw new AssertionError("The EditorKit for StyledTextActions " + "is expected to be a StyledEditorKit"); } else throw new AssertionError("The Document for StyledTextActions is " + "expected to be a StyledDocument."); }
| 10,606
|
protected final void setParagraphAttributes(JEditorPane editor, AttributeSet atts, boolean replace) { Document doc = editor.getDocument(); if (doc instanceof StyledDocument) { StyledDocument styleDoc = (StyledDocument) editor.getDocument(); EditorKit kit = editor.getEditorKit(); if (!(kit instanceof StyledEditorKit)) { StyledEditorKit styleKit = (StyledEditorKit) kit; int start = editor.getSelectionStart(); int end = editor.getSelectionEnd(); int dot = editor.getCaret().getDot(); if (start == dot && end == dot) { // If there is no selection, then we only update the // input attributes. MutableAttributeSet inputAttributes = styleKit.getInputAttributes(); inputAttributes.addAttributes(atts); } else styleDoc.setParagraphAttributes(start, end, atts, replace); } else throw new AssertionError("The EditorKit for StyledTextActions " + "is expected to be a StyledEditorKit"); } else throw new AssertionError("The Document for StyledTextActions is " + "expected to be a StyledDocument."); }
|
protected final void setParagraphAttributes(JEditorPane editor, AttributeSet atts, boolean replace) { Document doc = editor.getDocument(); if (doc instanceof StyledDocument) { StyledDocument styleDoc = (StyledDocument) editor.getDocument(); EditorKit kit = editor.getEditorKit(); if (!(kit instanceof StyledEditorKit)) { StyledEditorKit styleKit = (StyledEditorKit) kit; int start = editor.getSelectionStart(); int end = editor.getSelectionEnd(); int dot = editor.getCaret().getDot(); if (start == dot && end == dot) { // If there is no selection, then we only update the // input attributes. MutableAttributeSet inputAttributes = styleKit.getInputAttributes(); inputAttributes.addAttributes(atts); } else styleDoc.setParagraphAttributes(start, end, atts, replace); } else throw new AssertionError("The EditorKit for StyledTextActions " + "is expected to be a StyledEditorKit"); } else throw new AssertionError("The Document for StyledTextActions is " + "expected to be a StyledDocument."); }
| 10,607
|
public AccessibleContext getAccessibleContext() { // FIXME: disable to make libjava compile; visibility rules are broken // if (accessibleContext == null) // accessibleContext = new AccessibleBoxFiller(); return accessibleContext; }
|
if (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); public AccessibleContext getAccessibleContext()if (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); {if (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); if (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); // FIXME: disable to make libjava compile; visibility rules are brokenif (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); if (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); if (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); if (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); //if (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); if (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); if (accessibleContext == null)if (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); if (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); //if (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); if (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); accessibleContext = new AccessibleBoxFiller();if (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); if (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); return accessibleContext;if (accessibleContext == null) accessibleContext = new AccessibleBoxFiller(); }
| 10,609
|
public AccessibleContext getAccessibleContext() { // if (accessibleContext == null) // accessibleContext = new AccessibleBox(); return accessibleContext; }
|
if (accessibleContext == null) accessibleContext = new AccessibleBox(); public AccessibleContext getAccessibleContext()if (accessibleContext == null) accessibleContext = new AccessibleBox(); {if (accessibleContext == null) accessibleContext = new AccessibleBox(); if (accessibleContext == null) accessibleContext = new AccessibleBox(); //if (accessibleContext == null) accessibleContext = new AccessibleBox(); if (accessibleContext == null) accessibleContext = new AccessibleBox(); if (accessibleContext == null)if (accessibleContext == null) accessibleContext = new AccessibleBox(); if (accessibleContext == null) accessibleContext = new AccessibleBox(); //if (accessibleContext == null) accessibleContext = new AccessibleBox(); if (accessibleContext == null) accessibleContext = new AccessibleBox(); if (accessibleContext == null) accessibleContext = new AccessibleBox(); accessibleContext = new AccessibleBox();if (accessibleContext == null) accessibleContext = new AccessibleBox(); if (accessibleContext == null) accessibleContext = new AccessibleBox(); return accessibleContext;if (accessibleContext == null) accessibleContext = new AccessibleBox(); }
| 10,610
|
private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false); setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(true); loadProps(); screen = new Screen5250(this,defaultProps); this.addComponentListener(this); if (!defaultProps.containsKey("width") || !defaultProps.containsKey("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(Integer.parseInt((String)defaultProps.get("width")), Integer.parseInt((String)defaultProps.get("height")) ); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); addKeyListener(new KeyAdapter() { public void keyTyped(KeyEvent e) { processVTKeyTyped(e); } public void keyPressed(KeyEvent ke) { processVTKeyPressed(ke); } public void keyReleased(KeyEvent e) { processVTKeyReleased(e); } }); keyMap = new KeyMapper(); keyMap.init(); /** * this is taken out right now look at the method for description */// initKeyBindings(); macros = new Macronizer(); macros.init(); keyPad.addActionListener(this); if (getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); }
|
private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false); setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(true); loadProps(); screen = new Screen5250(this,defaultProps); this.addComponentListener(this); if (!defaultProps.containsKey("width") || !defaultProps.containsKey("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(Integer.parseInt((String)defaultProps.get("width")), Integer.parseInt((String)defaultProps.get("height")) ); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); addKeyListener(new KeyAdapter() { public void keyTyped(KeyEvent e) { processVTKeyTyped(e); } public void keyPressed(KeyEvent ke) { processVTKeyPressed(ke); } public void keyReleased(KeyEvent e) { processVTKeyReleased(e); } }); keyMap = new KeyMapper(); keyMap.init(); /** * this is taken out right now look at the method for description */// initKeyBindings(); macros = new Macronizer(); macros.init(); keyPad.addActionListener(this); if (getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); }
| 10,611
|
private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false); setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(true); loadProps(); screen = new Screen5250(this,defaultProps); this.addComponentListener(this); if (!defaultProps.containsKey("width") || !defaultProps.containsKey("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(Integer.parseInt((String)defaultProps.get("width")), Integer.parseInt((String)defaultProps.get("height")) ); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); addKeyListener(new KeyAdapter() { public void keyTyped(KeyEvent e) { processVTKeyTyped(e); } public void keyPressed(KeyEvent ke) { processVTKeyPressed(ke); } public void keyReleased(KeyEvent e) { processVTKeyReleased(e); } }); keyMap = new KeyMapper(); keyMap.init(); /** * this is taken out right now look at the method for description */// initKeyBindings(); macros = new Macronizer(); macros.init(); keyPad.addActionListener(this); if (getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); }
|
private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false); setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(true); loadProps(); screen = new Screen5250(this,defaultProps); this.addComponentListener(this); if (!defaultProps.containsKey("width") || !defaultProps.containsKey("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(Integer.parseInt((String)defaultProps.get("width")), Integer.parseInt((String)defaultProps.get("height")) ); addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { screen.sendKeys("[enter]"); else { screen.moveCursor(e); repaint(); getFocusForMe(); }); addKeyListener(new KeyAdapter() { public void keyTyped(KeyEvent e) { processVTKeyTyped(e); public void keyPressed(KeyEvent ke) { processVTKeyPressed(ke); public void keyReleased(KeyEvent e) { processVTKeyReleased(e); }); keyMap = new KeyMapper(); keyMap.init(); /** * this is taken out right now look at the method for description */// initKeyBindings(); macros = new Macronizer(); macros.init(); keyPad.addActionListener(this); if (getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); }
| 10,612
|
public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } }
|
public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } }
| 10,613
|
public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } }
|
public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { screen.sendKeys("[enter]"); else { screen.moveCursor(e); repaint(); getFocusForMe(); }
| 10,614
|
private void jbInit() throws Exception { this.setSize(new Dimension(400,300)); Properties sesProps = new Properties(); // Start loading properties - Host must exist sesProps.put(SESSION_HOST,getParameter("host")); if (isSpecified("-e")) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p")) { sesProps.put(SESSION_HOST_PORT,getParameter("-p")); }// if (isSpecified("-f",args))// propFileName = getParm("-f",args); if (isSpecified("-cp")) sesProps.put(SESSION_CODE_PAGE ,getParameter("-cp")); if (isSpecified("-gui")) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132")) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // socks proxy host argument if (isSpecified("-sph")) { sesProps.put(SESSION_PROXY_HOST ,getParameter("-sph")); } // socks proxy port argument if (isSpecified("-spp")) sesProps.put(SESSION_PROXY_PORT ,getParameter("-spp")); // check if device name is specified if (isSpecified("-dn")) sesProps.put(SESSION_DEVICE_NAME ,getParameter("-dn")); if (isSpecified("-L")) LangTool.init(parseLocale(getParameter("-L"))); else LangTool.init(); manager = new SessionManager(); Session s = manager.openSession(sesProps,"","Test Applet"); s.grabFocus(); this.getContentPane().add(s); s.connect(); }
|
private void jbInit() throws Exception { this.setSize(new Dimension(400,300)); Properties sesProps = new Properties(); // Start loading properties - Host must exist sesProps.put(SESSION_HOST,getParameter("host")); if (isSpecified("-e")) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p")) { sesProps.put(SESSION_HOST_PORT,getParameter("-p")); }// if (isSpecified("-f",args))// propFileName = getParm("-f",args); if (isSpecified("-cp")) sesProps.put(SESSION_CODE_PAGE ,getParameter("-cp")); if (isSpecified("-gui")) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132")) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // socks proxy host argument if (isSpecified("-sph")) { sesProps.put(SESSION_PROXY_HOST ,getParameter("-sph")); } // socks proxy port argument if (isSpecified("-spp")) sesProps.put(SESSION_PROXY_PORT ,getParameter("-spp")); // check if device name is specified if (isSpecified("-dn")) sesProps.put(SESSION_DEVICE_NAME ,getParameter("-dn")); if (isSpecified("-L")) LangTool.init(parseLocale(getParameter("-L"))); else LangTool.init(); manager = new SessionManager(); Session s = manager.openSession(sesProps,"","Test Applet"); s.grabFocus(); this.getContentPane().add(s); s.connect(); }
| 10,615
|
public static final AudioClip newAudioClip(URL url) { // This requires an implementation of AudioClip in gnu.java.applet. throw new Error("Not implemented"); }
|
public static final AudioClip newAudioClip(URL url) { // This requires an implementation of AudioClip in gnu.java.applet. return new URLAudioClip(url); }
| 10,617
|
protected String paramString() { return super.paramString(); }
|
protected String paramString() { StringBuffer sb = new StringBuffer(super.paramString()); sb.append(",defaultIcon="); if (icon != null) sb.append(icon); sb.append(",disabledIcon="); if (disabledIcon != null) sb.append(disabledIcon); sb.append(",horizontalAlignment="); sb.append(SwingUtilities.convertHorizontalAlignmentCodeToString( horizontalAlignment)); sb.append(",horizontalTextPosition="); sb.append(SwingUtilities.convertHorizontalAlignmentCodeToString( horizontalTextPosition)); sb.append(",iconTextGap=").append(iconTextGap); sb.append(",labelFor="); if (labelFor != null) sb.append(labelFor); sb.append(",text="); if (text != null) sb.append(text); sb.append(",verticalAlignment="); sb.append(SwingUtilities.convertVerticalAlignmentCodeToString( verticalAlignment)); sb.append(",verticalTextPosition="); sb.append(SwingUtilities.convertVerticalAlignmentCodeToString( verticalTextPosition)); return sb.toString(); }
| 10,618
|
public void setLabelFor(Component c) { if (c != labelFor) { // We put the label into the client properties for the labeled // component so that it can be read by the AccessibleJComponent. // The other option would be to reserve a default visible field // in JComponent, but since this is relativly seldomly used, it // would be unnecessary waste of memory to do so. Component oldLabelFor = labelFor; if (oldLabelFor instanceof JComponent) { ((JComponent) oldLabelFor).putClientProperty(LABEL_PROPERTY, null); } labelFor = c; if (labelFor instanceof JComponent) { ((JComponent) labelFor).putClientProperty(LABEL_PROPERTY, this); } firePropertyChange("labelFor", oldLabelFor, labelFor); } }
|
public void setLabelFor(Component c) { if (c != labelFor) { // We put the label into the client properties for the labeled // component so that it can be read by the AccessibleJComponent. // The other option would be to reserve a default visible field // in JComponent, but since this is relativly seldomly used, it // would be unnecessary waste of memory to do so. Component oldLabelFor = labelFor; if (oldLabelFor instanceof JComponent) { ((JComponent) oldLabelFor).putClientProperty(LABEL_PROPERTY, null); } labelFor = c; if (labelFor instanceof JComponent) { ((JComponent) labelFor).putClientProperty(LABEL_PROPERTY, this); } firePropertyChange("labelFor", oldLabelFor, labelFor); } }
| 10,619
|
public void setLabelFor(Component c) { if (c != labelFor) { // We put the label into the client properties for the labeled // component so that it can be read by the AccessibleJComponent. // The other option would be to reserve a default visible field // in JComponent, but since this is relativly seldomly used, it // would be unnecessary waste of memory to do so. Component oldLabelFor = labelFor; if (oldLabelFor instanceof JComponent) { ((JComponent) oldLabelFor).putClientProperty(LABEL_PROPERTY, null); } labelFor = c; if (labelFor instanceof JComponent) { ((JComponent) labelFor).putClientProperty(LABEL_PROPERTY, this); } firePropertyChange("labelFor", oldLabelFor, labelFor); } }
|
public void setLabelFor(Component c) { if (c != labelFor) { // We put the label into the client properties for the labeled // component so that it can be read by the AccessibleJComponent. // The other option would be to reserve a default visible field // in JComponent, but since this is relativly seldomly used, it // would be unnecessary waste of memory to do so. if (oldLabelFor instanceof JComponent) { ((JComponent) oldLabelFor).putClientProperty(LABEL_PROPERTY, null); } labelFor = c; if (labelFor instanceof JComponent) { ((JComponent) labelFor).putClientProperty(LABEL_PROPERTY, this); } firePropertyChange("labelFor", oldLabelFor, labelFor); } }
| 10,620
|
public void setLabelFor(Component c) { if (c != labelFor) { // We put the label into the client properties for the labeled // component so that it can be read by the AccessibleJComponent. // The other option would be to reserve a default visible field // in JComponent, but since this is relativly seldomly used, it // would be unnecessary waste of memory to do so. Component oldLabelFor = labelFor; if (oldLabelFor instanceof JComponent) { ((JComponent) oldLabelFor).putClientProperty(LABEL_PROPERTY, null); } labelFor = c; if (labelFor instanceof JComponent) { ((JComponent) labelFor).putClientProperty(LABEL_PROPERTY, this); } firePropertyChange("labelFor", oldLabelFor, labelFor); } }
|
public void setLabelFor(Component c) { if (c != labelFor) { // We put the label into the client properties for the labeled // component so that it can be read by the AccessibleJComponent. // The other option would be to reserve a default visible field // in JComponent, but since this is relativly seldomly used, it // would be unnecessary waste of memory to do so. Component oldLabelFor = labelFor; if (oldLabelFor instanceof JComponent) { ((JComponent) oldLabelFor).putClientProperty(LABEL_PROPERTY, null); } labelFor = c; if (labelFor instanceof JComponent) { ((JComponent) labelFor).putClientProperty(LABEL_PROPERTY, this); } firePropertyChange("labelFor", oldLabelFor, labelFor); } }
| 10,621
|
public void setLabelFor(Component c) { if (c != labelFor) { // We put the label into the client properties for the labeled // component so that it can be read by the AccessibleJComponent. // The other option would be to reserve a default visible field // in JComponent, but since this is relativly seldomly used, it // would be unnecessary waste of memory to do so. Component oldLabelFor = labelFor; if (oldLabelFor instanceof JComponent) { ((JComponent) oldLabelFor).putClientProperty(LABEL_PROPERTY, null); } labelFor = c; if (labelFor instanceof JComponent) { ((JComponent) labelFor).putClientProperty(LABEL_PROPERTY, this); } firePropertyChange("labelFor", oldLabelFor, labelFor); } }
|
public void setLabelFor(Component c) { if (c != labelFor) { // We put the label into the client properties for the labeled // component so that it can be read by the AccessibleJComponent. // The other option would be to reserve a default visible field // in JComponent, but since this is relativly seldomly used, it // would be unnecessary waste of memory to do so. Component oldLabelFor = labelFor; if (oldLabelFor instanceof JComponent) { ((JComponent) oldLabelFor).putClientProperty(LABEL_PROPERTY, null); } labelFor = c; if (labelFor instanceof JComponent) { ((JComponent) labelFor).putClientProperty(LABEL_PROPERTY, this); } } }
| 10,622
|
protected AbstractDirectory(FatFileSystem fs, FatFile myFile) { this(fs, (int)myFile.getLength() / 32, myFile); }
|
protected AbstractDirectory(FatFileSystem fs, FatFile myFile) { this(fs, (int)myFile.getLength() / 32, myFile); }
| 10,623
|
TemplateNode clone(Stylesheet stylesheet) { int len = sortKeys.size(); List sortKeys2 = new ArrayList(len); for (int i = 0; i < len; i++) sortKeys2.add(((Key) sortKeys.get(i)).clone(stylesheet)); len = withParams.size(); List withParams2 = new ArrayList(len); for (int i = 0; i < len; i++) withParams2.add(((WithParam) withParams.get(i)).clone(stylesheet)); TemplateNode ret = new ApplyTemplatesNode(select.clone(stylesheet), mode, sortKeys2, withParams2, isDefault); if (children != null) ret.children = children.clone(stylesheet); if (next != null) ret.next = next.clone(stylesheet); return ret; }
|
TemplateNode clone(Stylesheet stylesheet) { int len = sortKeys != null ? sortKeys.size() : 0; List sortKeys2 = new ArrayList(len); for (int i = 0; i < len; i++) sortKeys2.add(((Key) sortKeys.get(i)).clone(stylesheet)); len = withParams.size(); List withParams2 = new ArrayList(len); for (int i = 0; i < len; i++) withParams2.add(((WithParam) withParams.get(i)).clone(stylesheet)); TemplateNode ret = new ApplyTemplatesNode(select.clone(stylesheet), mode, sortKeys2, withParams2, isDefault); if (children != null) ret.children = children.clone(stylesheet); if (next != null) ret.next = next.clone(stylesheet); return ret; }
| 10,624
|
public String expand(String[] params){ //if(paramCount != params.length) return null; String exp = body; for(int i = 0; i < localLabels.length; i++){ exp = exp.replaceAll(localLabels[i], "__jnasm_macro_local_label_" + localLabelCount ++); } for(int i = 0; i < params.length; i++){ exp = exp.replaceAll("%"+(i + 1), params[i]); } if(maxParamCount > params.length){ if(defaultValues == null){ for(int i = params.length; i < maxParamCount; i++){ exp = exp.replaceAll("%"+(i + 1), ""); } }else{ for(int i = params.length; i < maxParamCount; i++){ if(defaultValues.length > i - params.length){ exp = exp.replaceAll("%"+(i + 1), defaultValues[i - params.length]); }else{ exp = exp.replaceAll("%"+(i + 1), ""); } } } } return exp; }
|
public String expand(String[] params){ //if(paramCount != params.length) return null; String exp = body; for(int i = 0; i < localLabels.length; i++){ exp = exp.replaceAll(localLabels[i], "__jnasm_macro_local_label_" + localLabelCount ++); } for(int i = 0; i < params.length; i++){ String par = params[i]; par = (par == null) ? "" : par.trim(); exp = exp.replaceAll("%"+(i + 1), par); } if(maxParamCount > params.length){ if(defaultValues == null){ for(int i = params.length; i < maxParamCount; i++){ exp = exp.replaceAll("%"+(i + 1), ""); } }else{ for(int i = params.length; i < maxParamCount; i++){ if(defaultValues.length > i - params.length){ exp = exp.replaceAll("%"+(i + 1), defaultValues[i - params.length]); }else{ exp = exp.replaceAll("%"+(i + 1), ""); } } } } return exp; }
| 10,625
|
public String expand(String[] params){ //if(paramCount != params.length) return null; String exp = body; for(int i = 0; i < localLabels.length; i++){ exp = exp.replaceAll(localLabels[i], "__jnasm_macro_local_label_" + localLabelCount ++); } for(int i = 0; i < params.length; i++){ exp = exp.replaceAll("%"+(i + 1), params[i]); } if(maxParamCount > params.length){ if(defaultValues == null){ for(int i = params.length; i < maxParamCount; i++){ exp = exp.replaceAll("%"+(i + 1), ""); } }else{ for(int i = params.length; i < maxParamCount; i++){ if(defaultValues.length > i - params.length){ exp = exp.replaceAll("%"+(i + 1), defaultValues[i - params.length]); }else{ exp = exp.replaceAll("%"+(i + 1), ""); } } } } return exp; }
|
public String expand(String[] params){ //if(paramCount != params.length) return null; String exp = body; for(int i = 0; i < localLabels.length; i++){ exp = exp.replaceAll(localLabels[i], "__jnasm_macro_local_label_" + localLabelCount ++); } for(int i = 0; i < params.length; i++){ exp = exp.replaceAll("%"+(i + 1), params[i]); } if(maxParamCount > params.length){ if(defaultValues == null){ for(int i = params.length; i < maxParamCount; i++){ exp = exp.replaceAll("%"+(i + 1), ""); } }else{ for(int i = params.length; i < maxParamCount; i++){ if(defaultValues.length > i - params.length){ String def = defaultValues[i - params.length]; def = (def == null) ? "" : def.trim(); exp = exp.replaceAll("%"+(i + 1), def); }else{ exp = exp.replaceAll("%"+(i + 1), ""); } } } } return exp; }
| 10,626
|
public FileView() { // TODO } // FileView()
|
public FileView() { // TODO } // FileView()
| 10,627
|
public Boolean isTraversable(File value0) { return null; // TODO } // isTraversable()
|
public Boolean isTraversable(File value0) { return null; // TODO } // isTraversable()
| 10,628
|
public void addAccessibleSelection(int index) { /* Subclasses with children should implement this */ }
|
public void addAccessibleSelection(int index) { }
| 10,629
|
public void addFocusListener(FocusListener listener) { /* * Chain the new focus listener to the existing chain * of focus listeners. Each new focus listener is * coupled via multicasting to the existing chain. */ focusListener = AWTEventMulticaster.add(focusListener, listener); }
|
public void addFocusListener(FocusListener listener) { /* * Chain the new focus listener to the existing chain * of focus listeners. Each new focus listener is * coupled via multicasting to the existing chain. */ focusListener = AWTEventMulticaster.add(focusListener, listener); }
| 10,630
|
public boolean contains(Point point) { /* We can simply return the result of a test for containment in the bounding rectangle */ return getBounds().contains(point); }
|
public boolean contains(Point point) { /* We can simply return the result of a test for containment in the bounding rectangle */ return getBounds().contains(point); }
| 10,632
|
public Point getLocation() { /* Simply return the location of the bounding rectangle */ return getBounds().getLocation(); }
|
public Point getLocation() { return getBounds().getLocation(); }
| 10,633
|
public Dimension getSize() { /* Simply return the size of the bounding rectangle */ return getBounds().getSize(); }
|
public Dimension getSize() { return getBounds().getSize(); }
| 10,634
|
public void removeAccessibleSelection(int index) { /* Subclasses with children should implement this */ }
|
public void removeAccessibleSelection(int index) { }
| 10,635
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.