rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
GraphicsConfiguration config = getGraphicsConfiguration(); return config == null ? null : config.createCompatibleVolatileImage(width, height);
public VolatileImage createVolatileImage(int width, int height) { if (GraphicsEnvironment.isHeadless()) return null; GraphicsConfiguration config = getGraphicsConfiguration(); return config == null ? null : config.createCompatibleVolatileImage(width, height); }
if (isLightweight() && !e.isConsumed())
if (isLightweight() && isEnabled() && !e.isConsumed())
void dispatchEventImpl(AWTEvent e) { // This boolean tells us not to process focus events when the focus // opposite component is the same as the focus component. boolean ignoreFocus = (e instanceof FocusEvent && ((FocusEvent)e).getComponent() == ((FocusEvent)e).getOppositeComponent()); if (...
if (e instanceof InputEvent)
if (e instanceof WindowEvent) { WindowEvent we = (WindowEvent) e; int id = we.id; int newId = 0; switch (id) { case WindowEvent.WINDOW_DEICONIFIED: newId = Event.WINDOW_DEICONIFY; break; case WindowEvent.WINDOW_CLOSED: case WindowEvent.WINDOW_CLOSING: newId = Event.WINDOW_DESTROY; break; case WindowEvent.WINDOW_ICONIF...
static Event translateEvent (AWTEvent e) { Object target = e.getSource (); Event translated = null; if (e instanceof InputEvent) { InputEvent ie = (InputEvent) e; long when = ie.getWhen (); int oldID = 0; int id = e.getID (); int oldMods = 0; int mods = ie.getM...
new ApplyTemplatesNode(null, null, new Selector(Selector.CHILD, tests),
new ApplyTemplatesNode(new Selector(Selector.CHILD, tests),
Stylesheet(TransformerFactoryImpl factory, Stylesheet parent, Document doc, String systemId, int precedence) throws TransformerConfigurationException { this.factory = factory; this.systemId = systemId; this.precedence = precedence; this.parent = parent; ...
new ValueOfNode(null, null, new Selector(Selector.SELF, tests),
new ValueOfNode(new Selector(Selector.SELF, tests),
Stylesheet(TransformerFactoryImpl factory, Stylesheet parent, Document doc, String systemId, int precedence) throws TransformerConfigurationException { this.factory = factory; this.systemId = systemId; this.precedence = precedence; this.parent = parent; ...
if (debug) { System.err.println("getTemplate: mode="+mode+" context="+context); }
TemplateNode getTemplate(QName mode, Node context, boolean applyImports) throws TransformerException { //System.err.println("getTemplate: mode="+mode+" context="+context); Set candidates = new TreeSet(); for (Iterator j = templates.iterator(); j.hasNext(); ) { Template t = (Template) j.next()...
if (debug) { System.err.println("\tbuiltInTemplate context="+context); }
TemplateNode getTemplate(QName mode, Node context, boolean applyImports) throws TransformerException { //System.err.println("getTemplate: mode="+mode+" context="+context); Set candidates = new TreeSet(); for (Iterator j = templates.iterator(); j.hasNext(); ) { Template t = (Template) j.next()...
if (debug) { System.err.println("\ttemplate="+t+" context="+context); }
TemplateNode getTemplate(QName mode, Node context, boolean applyImports) throws TransformerException { //System.err.println("getTemplate: mode="+mode+" context="+context); Set candidates = new TreeSet(); for (Iterator j = templates.iterator(); j.hasNext(); ) { Template t = (Template) j.next()...
if (node == null)
while (node != null)
void parse(Node node, boolean root) throws TransformerConfigurationException { if (node == null) { return; } current = node; try { String namespaceUri = node.getNamespaceURI(); if (XSL_NS.equals(namespaceUri) && node.getNodeType() == Node.ELEMENT_NODE) ...
return; }
void parse(Node node, boolean root) throws TransformerConfigurationException { if (node == null) { return; } current = node; try { String namespaceUri = node.getNamespaceURI(); if (XSL_NS.equals(namespaceUri) && node.getNodeType() == Node.ELEMENT_NODE) ...
try { String namespaceUri = node.getNamespaceURI(); if (XSL_NS.equals(namespaceUri) && node.getNodeType() == Node.ELEMENT_NODE) { String name = node.getLocalName(); NamedNodeMap attrs = node.getAttributes(); if ("stylesheet".equals(name)) { version = getAttribute(attrs, "version"); String eep = getAttribute(attrs, "ext...
doParse(node, root); node = node.getNextSibling();
void parse(Node node, boolean root) throws TransformerConfigurationException { if (node == null) { return; } current = node; try { String namespaceUri = node.getNamespaceURI(); if (XSL_NS.equals(namespaceUri) && node.getNodeType() == Node.ELEMENT_NODE) ...
final TemplateNode parseApplyTemplates(Node node, Node children, Node next)
final TemplateNode parseApplyTemplates(Node node)
final TemplateNode parseApplyTemplates(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String m = getAttribute(attrs, "mode"); QName mode = (m == null) ? null : getQName(m); String s = getAttribute(att...
return new ApplyTemplatesNode(null, parse(next), select, mode,
return new ApplyTemplatesNode(select, mode,
final TemplateNode parseApplyTemplates(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String m = getAttribute(attrs, "mode"); QName mode = (m == null) ? null : getQName(m); String s = getAttribute(att...
final TemplateNode parseAttribute(Node node, Node children, Node next)
final TemplateNode parseAttribute(Node node)
final TemplateNode parseAttribute(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String name = getRequiredAttribute(attrs, "name", node); String namespace = getAttribute(attrs, "namespace"); TemplateN...
return new AttributeNode(parse(children), parse(next), n, ns, node);
Node children = node.getFirstChild(); AttributeNode ret = new AttributeNode(n, ns, node); ret.children = parse(children); return ret;
final TemplateNode parseAttribute(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String name = getRequiredAttribute(attrs, "name", node); String namespace = getAttribute(attrs, "namespace"); TemplateN...
ret = new ValueOfNode(null, ret, select, false);
TemplateNode ret2 = new ValueOfNode(select, false); ret2.next = ret; ret = ret2;
final TemplateNode parseAttributeValueTemplate(String value, Node source) throws TransformerConfigurationException, XPathExpressionException { current = source; // Tokenize int len = value.length(); int off = 0; List tokens = new ArrayList(); // text tokens List types = new ArrayList(); // liter...
ret = new LiteralNode(null, ret, doc.createTextNode(token));
TemplateNode ret2 = new LiteralNode(doc.createTextNode(token)); ret2.next = ret; ret = ret2;
final TemplateNode parseAttributeValueTemplate(String value, Node source) throws TransformerConfigurationException, XPathExpressionException { current = source; // Tokenize int len = value.length(); int off = 0; List tokens = new ArrayList(); // text tokens List types = new ArrayList(); // liter...
final TemplateNode parseCallTemplate(Node node, Node children, Node next)
final TemplateNode parseCallTemplate(Node node)
final TemplateNode parseCallTemplate(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String n = getRequiredAttribute(attrs, "name", node); QName name = getQName(n); List withParams = parseWithParams(ch...
return new CallTemplateNode(null, parse(next), name, withParams);
return new CallTemplateNode(name, withParams);
final TemplateNode parseCallTemplate(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String n = getRequiredAttribute(attrs, "name", node); QName name = getQName(n); List withParams = parseWithParams(ch...
final TemplateNode parseCopy(Node node, Node children, Node next)
final TemplateNode parseCopy(Node node)
final TemplateNode parseCopy(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String uas = getAttribute(attrs, "use-attribute-sets"); return new CopyNode(parse(children), parse(next), uas); }
return new CopyNode(parse(children), parse(next), uas);
Node children = node.getFirstChild(); CopyNode ret = new CopyNode(uas); ret.children = parse(children); return ret;
final TemplateNode parseCopy(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String uas = getAttribute(attrs, "use-attribute-sets"); return new CopyNode(parse(children), parse(next), uas); }
final TemplateNode parseCopyOf(Node node, Node children, Node next)
final TemplateNode parseCopyOf(Node node)
final TemplateNode parseCopyOf(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String s = getRequiredAttribute(attrs, "select", node); Expr select = (Expr) xpath.compile(s); return new CopyOfNode(parse...
return new CopyOfNode(parse(children), parse(next), select);
Node children = node.getFirstChild(); CopyOfNode ret = new CopyOfNode(select); ret.children = parse(children); return ret;
final TemplateNode parseCopyOf(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String s = getRequiredAttribute(attrs, "select", node); Expr select = (Expr) xpath.compile(s); return new CopyOfNode(parse...
final TemplateNode parseElement(Node node, Node children, Node next)
final TemplateNode parseElement(Node node)
final TemplateNode parseElement(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String name = getRequiredAttribute(attrs, "name", node); String namespace = getAttribute(attrs, "namespace"); String uas ...
return new ElementNode(parse(children), parse(next), n, ns, uas, node);
Node children = node.getFirstChild(); ElementNode ret = new ElementNode(n, ns, uas, node); ret.children = parse(children); return ret;
final TemplateNode parseElement(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String name = getRequiredAttribute(attrs, "name", node); String namespace = getAttribute(attrs, "namespace"); String uas ...
final TemplateNode parseForEach(Node node, Node children, Node next)
final TemplateNode parseForEach(Node node)
final TemplateNode parseForEach(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String s = getRequiredAttribute(attrs, "select", node); List sortKeys = parseSortKeys(children); Expr select = (Expr) xpa...
return new ForEachNode(parse(children), parse(next), select, sortKeys);
ForEachNode ret = new ForEachNode(select, sortKeys); ret.children = parse(children); return ret;
final TemplateNode parseForEach(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String s = getRequiredAttribute(attrs, "select", node); List sortKeys = parseSortKeys(children); Expr select = (Expr) xpa...
final TemplateNode parseIf(Node node, Node children, Node next)
final TemplateNode parseIf(Node node)
final TemplateNode parseIf(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String t = getRequiredAttribute(attrs, "test", node); Expr test = (Expr) xpath.compile(t); return new IfNode(parse(children), ...
return new IfNode(parse(children), parse(next), test);
Node children = node.getFirstChild(); IfNode ret = new IfNode(test); ret.children = parse(children); return ret;
final TemplateNode parseIf(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String t = getRequiredAttribute(attrs, "test", node); Expr test = (Expr) xpath.compile(t); return new IfNode(parse(children), ...
final TemplateNode parseMessage(Node node, Node children, Node next)
final TemplateNode parseMessage(Node node)
final TemplateNode parseMessage(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String t = getAttribute(attrs, "terminate"); boolean terminate = "yes".equals(t); return new MessageNode(parse(children),...
return new MessageNode(parse(children), parse(next), terminate);
Node children = node.getFirstChild(); MessageNode ret = new MessageNode(terminate); ret.children = parse(children); return ret;
final TemplateNode parseMessage(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String t = getAttribute(attrs, "terminate"); boolean terminate = "yes".equals(t); return new MessageNode(parse(children),...
final TemplateNode parseNumber(Node node, Node children, Node next)
final TemplateNode parseNumber(Node node)
final TemplateNode parseNumber(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String v = getAttribute(attrs, "value"); String ff = getAttribute(attrs, "format"); if (ff == null) { ff = "1"...
return new NumberNode(parse(children), parse(next), value, format, lang,
ret = new NumberNode(value, format, lang,
final TemplateNode parseNumber(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String v = getAttribute(attrs, "value"); String ff = getAttribute(attrs, "format"); if (ff == null) { ff = "1"...
return new NodeNumberNode(parse(children), parse(next), level, count, from,
ret = new NodeNumberNode(level, count, from,
final TemplateNode parseNumber(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String v = getAttribute(attrs, "value"); String ff = getAttribute(attrs, "format"); if (ff == null) { ff = "1"...
ret.children = parse(children); return ret;
final TemplateNode parseNumber(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String v = getAttribute(attrs, "value"); String ff = getAttribute(attrs, "format"); if (ff == null) { ff = "1"...
output = node;
final void parseOutput(Node node, NamedNodeMap attrs) throws TransformerConfigurationException { String method = getAttribute(attrs, "method"); if ("xml".equals(method) || method == null) { outputMethod = OUTPUT_XML; } else if ("html".equals(method)) { outputMethod = OUTPUT_H...
final TemplateNode parseProcessingInstruction(Node node, Node children, Node next)
final TemplateNode parseProcessingInstruction(Node node)
final TemplateNode parseProcessingInstruction(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String name = getRequiredAttribute(attrs, "name", node); return...
return new ProcessingInstructionNode(parse(children), parse(next), name);
Node children = node.getFirstChild(); ProcessingInstructionNode ret = new ProcessingInstructionNode(name); ret.children = parse(children); return ret;
final TemplateNode parseProcessingInstruction(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String name = getRequiredAttribute(attrs, "name", node); return...
return new Template(this, name, match, parse(node.getFirstChild()),
Node children = node.getFirstChild(); return new Template(this, name, match, parse(children),
final Template parseTemplate(Node node, NamedNodeMap attrs) throws TransformerConfigurationException, XPathExpressionException { String n = getAttribute(attrs, "name"); QName name = (n == null) ? null : getQName(n); String m = getAttribute(attrs, "match"); Pattern match = null; if (m != null) ...
final TemplateNode parseText(Node node, Node children, Node next)
final TemplateNode parseText(Node node)
final TemplateNode parseText(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String doe = getAttribute(attrs, "disable-output-escaping"); boolean d = "yes".equals(doe); return new TextNode(parse(childr...
return new TextNode(parse(children), parse(next), d);
Node children = node.getFirstChild(); TextNode ret = new TextNode(d); ret.children = parse(children); return ret;
final TemplateNode parseText(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String doe = getAttribute(attrs, "disable-output-escaping"); boolean d = "yes".equals(doe); return new TextNode(parse(childr...
final TemplateNode parseValueOf(Node node, Node children, Node next)
final TemplateNode parseValueOf(Node node)
final TemplateNode parseValueOf(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String s = getRequiredAttribute(attrs, "select", node); String doe = getAttribute(attrs, "disable-output-escaping"); bool...
return new ValueOfNode(null, parse(next), select, d);
return new ValueOfNode(select, d);
final TemplateNode parseValueOf(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String s = getRequiredAttribute(attrs, "select", node); String doe = getAttribute(attrs, "disable-output-escaping"); bool...
final TemplateNode parseWhen(Node node, Node children, Node next)
final TemplateNode parseWhen(Node node)
final TemplateNode parseWhen(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String t = getRequiredAttribute(attrs, "test", node); Expr test = (Expr) xpath.compile(t); return new WhenNode(parse(childre...
return new WhenNode(parse(children), parse(next), test);
Node children = node.getFirstChild(); WhenNode ret = new WhenNode(test); ret.children = parse(children); return ret;
final TemplateNode parseWhen(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String t = getRequiredAttribute(attrs, "test", node); Expr test = (Expr) xpath.compile(t); return new WhenNode(parse(childre...
currentTip.revalidate();
void showTip() { if (!enabled || currentComponent == null || !currentComponent.isEnabled() || (currentTip != null && currentTip.isVisible())) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JCompon...
BasicOptionPaneUI() { }
public BasicOptionPaneUI() { }
BasicOptionPaneUI() { }
throw new Error ("Not implemented");
return hasCustomComponents;
public boolean containsCustomComponents(JOptionPane op) { throw new Error ("Not implemented"); }
Dimension getMinimumOptionPaneSize() { return new Dimension(300,100); }
public Dimension getMinimumOptionPaneSize() { return minimumSize; }
Dimension getMinimumOptionPaneSize() { return new Dimension(300,100); }
{ if (c == null) return getMinimumOptionPaneSize(); if (c != pane) return null; LayoutManager l = c.getLayout(); if (l == null) return getMinimumOptionPaneSize(); Dimension d1 = l.preferredLayoutSize(c);
{ Dimension d = optionPane.getLayout().preferredLayoutSize(optionPane);
public Dimension getPreferredSize(JComponent c) { if (c == null) return getMinimumOptionPaneSize(); if (c != pane) return null; LayoutManager l = c.getLayout(); if (l == null) return getMinimumOptionPaneSize(); Dimension d1 = l.preferredLayoutSize(c); Dimension d2 = getMinimumOptionPaneSize(); d1.w...
d1.width = Math.max(d1.width, d2.width); d1.height = Math.max(d1.height, d2.height); return d2; }
int w = Math.max(d.width, d2.width); int h = Math.max(d.height, d2.height); return new Dimension(w, h); }
public Dimension getPreferredSize(JComponent c) { if (c == null) return getMinimumOptionPaneSize(); if (c != pane) return null; LayoutManager l = c.getLayout(); if (l == null) return getMinimumOptionPaneSize(); Dimension d1 = l.preferredLayoutSize(c); Dimension d2 = getMinimumOptionPaneSize(); d1.w...
{ super.installUI(c); pane = (JOptionPane)c;
{ if (c instanceof JOptionPane) { optionPane = (JOptionPane) c;
public void installUI(JComponent c) { super.installUI(c); pane = (JOptionPane)c; System.out.println(" -------------: " + pane); JLabel message = null; JButton ok_button = new JButton("Ok"); ok_button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent a) { System.o...
System.out.println(" -------------: " + pane); JLabel message = null; JButton ok_button = new JButton("Ok"); ok_button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent a) { System.out.println("ACTION ---> " + a); if (pane.dialog.isModal()) { System.out.println("modal dialog !!...
installDefaults(); installComponents(); installListeners(); installKeyboardActions(); } }
public void installUI(JComponent c) { super.installUI(c); pane = (JOptionPane)c; System.out.println(" -------------: " + pane); JLabel message = null; JButton ok_button = new JButton("Ok"); ok_button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent a) { System.o...
throw new Error ("Not implemented");
if (inputComponent != null) { inputComponent.requestFocus(); return; } if (initialFocusComponent != null) initialFocusComponent.requestFocus();
public void selectInitialValue(JOptionPane op) { throw new Error ("Not implemented"); }
newChild.setParent(parent);
public void insertNodeInto(MutableTreeNode newChild, MutableTreeNode parent, int index) { parent.insert(newChild, index); int[] childIndices = new int[1]; childIndices[0] = index; nodesWereInserted(parent, childIndices); }
Point screenLoc = getLocationOnScreen(); Dimension size = getSize(); JPopupMenu popup = getPopupMenu(); Dimension popupSize = popup.getSize(); if (popupSize.width == 0 || popupSize.height == 0) popupSize = popup.getPreferredSize(); Toolkit tk = Toolkit.getDefaultToolkit(); Rectangle screenBounds = new Rectangle(tk....
protected Point getPopupMenuOrigin() { // if menu in the menu bar if (isTopLevelMenu()) return new Point(0, this.getHeight()); // if submenu return new Point(this.getWidth(), 0); }
return new Point(0, this.getHeight());
{ int xOffset = UIManager.getInt("Menu.menuPopupOffsetX"); int yOffset = UIManager.getInt("Menu.menuPopupOffsetY"); if (getComponentOrientation().isLeftToRight()) { point.x = xOffset; if (screenLoc.x + point.x + popupSize.width > screenBounds.width + screenBounds.width && screenBounds.width - size.width < 2 * (scre...
protected Point getPopupMenuOrigin() { // if menu in the menu bar if (isTopLevelMenu()) return new Point(0, this.getHeight()); // if submenu return new Point(this.getWidth(), 0); }
return new Point(this.getWidth(), 0);
return point;
protected Point getPopupMenuOrigin() { // if menu in the menu bar if (isTopLevelMenu()) return new Point(0, this.getHeight()); // if submenu return new Point(this.getWidth(), 0); }
if (getModel().isEnabled()) popupMenu.setVisible(popup);
if (popup != isPopupMenuVisible() && (isEnabled() || ! popup)) { if (popup && isShowing()) { Point loc = menuLocation == null ? getPopupMenuOrigin() : menuLocation; getPopupMenu().show(this, loc.x, loc.y);
public void setPopupMenuVisible(boolean popup) { if (getModel().isEnabled()) popupMenu.setVisible(popup); }
else getPopupMenu().setVisible(false); } }
public void setPopupMenuVisible(boolean popup) { if (getModel().isEnabled()) popupMenu.setVisible(popup); }
popupMenu.setVisible(false);
try { if (popupMenu != null) { popupMenu.setVisible(false); } } catch (Exception e) { e.printStackTrace(); }
private void setSelectedHelper(boolean selected, boolean menuEnabled, boolean showMenu) { // If menu is selected and enabled, activates the menu and // displays associated popup. if (selected && menuEnabled) { super.setArmed(true); super.setSelected(true); // FIXME: The popup menu should be shown ...
throws IOException, NotImplementedException
throws IOException
public void write(byte[] data) throws IOException, NotImplementedException { write(data, 0, data.length); }
throws IOException
throws IOException, NotImplementedException
public void writeBits(long bits, int numBits) throws IOException { // FIXME: Implement me. throw new Error("not implemented"); }
write(data.getBytes());
int len = data.length(); for (int i = 0; i < len; ++i) writeByte(data.charAt(i));
public void writeBytes(String data) throws IOException { write(data.getBytes()); }
writeShort((short) value);
writeShort(value);
public void writeChar(int value) throws IOException { writeShort((short) value); }
writeLong((long) value);
writeLong(Double.doubleToLongBits(value));
public void writeDouble(double value) throws IOException { writeLong((long) value); }
writeInt((int) value);
writeInt(Float.floatToIntBits(value));
public void writeFloat(float value) throws IOException { writeInt((int) value); }
public void writeUTF(String data) throws IOException, NotImplementedException
public void writeUTF(String value) throws IOException
public void writeUTF(String data) throws IOException, NotImplementedException { throw new Error("not implemented"); }
throw new Error("not implemented");
int len = value.length(); int sum = 0; for (int i = 0; i < len && sum <= 65535; ++i) { char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') sum += 1; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) sum += 2; else sum += 3; } if (sum > 65535) throw new UTFDataFormatException (); int pos = 0; byte...
public void writeUTF(String data) throws IOException, NotImplementedException { throw new Error("not implemented"); }
return 0;
ListSelectionModel lsm = this.selectionModel; int lo = lsm.getMinSelectionIndex(); int hi = lsm.getMaxSelectionIndex(); int sum = 0; if (lo != -1 && hi != -1) { switch (lsm.getSelectionMode()) { case ListSelectionModel.SINGLE_SELECTION: sum = 1; break; case ListSelectionModel.SINGLE_INTERVAL_SELECTION: sum = hi - lo ...
public int getSelectedColumnCount() { return 0; // TODO }
return null;
ListSelectionModel lsm = this.selectionModel; int sz = getSelectedColumnCount(); int [] ret = new int[sz]; int lo = lsm.getMinSelectionIndex(); int hi = lsm.getMaxSelectionIndex(); int j = 0; java.util.ArrayList ls = new java.util.ArrayList(); if (lo != -1 && hi != -1) { switch (lsm.getSelectionMode()) { case ListSele...
public int[] getSelectedColumns() { return null; // TODO }
final Collection devs = api.getNetDevices(); final Vector intfs = new Vector(); for (Iterator i = devs.iterator(); i.hasNext(); ) { final VMNetDevice dev = (VMNetDevice)i.next(); final List addrs = api.getInetAddresses(dev);
final Collection<VMNetDevice> devs = api.getNetDevices(); final Vector<NetworkInterface> intfs = new Vector<NetworkInterface>(); for (VMNetDevice dev : devs) { final List<InetAddress> addrs = api.getInetAddresses(dev);
public static Vector getInterfaces() throws SocketException { final VMNetAPI api = VMNetUtils.getAPI(); final Collection devs = api.getNetDevices(); final Vector intfs = new Vector(); for (Iterator i = devs.iterator(); i.hasNext(); ) { final VMNetDevice dev = (VMNetDevice)i.ne...
if(getFileSystem().isReadOnly()) { throw new ReadOnlyFileSystemException("addDirectory in readonly filesystem"); }
public FSEntry addDirectory(String name) throws IOException { name = name.trim(); String shortName = generateShortNameFor(name); FatDirEntry realEntry = new FatDirEntry(this, splitName(shortName), splitExt(shortName)); final long parentCluster; if (file == null) { parentCluster = 0; } else { parentCluster = ...
if(getFileSystem().isReadOnly()) { throw new ReadOnlyFileSystemException("addFile in readonly filesystem"); }
public FSEntry addFile(String name) throws IOException { name = name.trim(); String shortName = generateShortNameFor(name); FatDirEntry realEntry = new FatDirEntry(this, splitName(shortName), splitExt(shortName)); LfnEntry entry = new LfnEntry(this, realEntry, name); shortNameIndex.put(shortName, entry); longFil...
if (name != null) this.name = name; else this.name = peer.getName(this);
public Font (String name, int style, int size) { HashMap attrs = new HashMap(); ClasspathFontPeer.copyStyleToAttrs (style, attrs); ClasspathFontPeer.copySizeToAttrs (size, attrs); this.peer = getPeerFromToolkit (name, attrs); this.size = size; this.pointSize = (float) size; }
sb.append(getType().getName()).append(' '); sb.append(getDeclaringClass().getName()).append('.');
final Class<?> type = getType(); final Class<?> declClass = getDeclaringClass(); sb.append(type.getName()).append(' '); sb.append(declClass.getName()).append('.');
public String toString() { // 64 is a reasonable buffer initial size for field StringBuffer sb = new StringBuffer(64); Modifier.toString(getModifiers(), sb).append(' '); sb.append(getType().getName()).append(' '); sb.append(getDeclaringClass().getName()).append('.'); sb.append(getName()); return sb.toString(); ...
return ((Double) object).doubleValue() != 0.0;
Double value = (Double) object; if (value.isNaN()) return false; return value.doubleValue() != 0.0;
public static boolean _boolean(Node context, Object object) { if (object instanceof Boolean) { return ((Boolean) object).booleanValue(); } if (object instanceof Double) { return ((Double) object).doubleValue() != 0.0; } if (object instanceof String) { return ((S...
Node node = (nodeSet == null || nodeSet.size() == 0) ? context : firstNode(nodeSet); return node.getLocalName();
if (nodeSet == null || nodeSet.isEmpty()) return ""; Node node = firstNode(nodeSet); String ret = node.getLocalName(); return (ret == null) ? "" : ret;
public static String _local_name(Node context, Collection nodeSet) { Node node = (nodeSet == null || nodeSet.size() == 0) ? context : firstNode(nodeSet); return node.getLocalName(); }
Node node = (nodeSet == null || nodeSet.size() == 0) ? context : firstNode(nodeSet);
if (nodeSet == null || nodeSet.isEmpty()) return ""; Node node = firstNode(nodeSet); String ret = null;
public static String _name(Node context, Collection nodeSet) { Node node = (nodeSet == null || nodeSet.size() == 0) ? context : firstNode(nodeSet); switch (node.getNodeType()) { case Node.ATTRIBUTE_NODE: case Node.ELEMENT_NODE: case Node.PROCESSING_INSTRUCTION_NODE: return node....
return node.getNodeName(); default: return "";
ret = node.getNodeName();
public static String _name(Node context, Collection nodeSet) { Node node = (nodeSet == null || nodeSet.size() == 0) ? context : firstNode(nodeSet); switch (node.getNodeType()) { case Node.ATTRIBUTE_NODE: case Node.ELEMENT_NODE: case Node.PROCESSING_INSTRUCTION_NODE: return node....
return (ret == null) ? "" : ret;
public static String _name(Node context, Collection nodeSet) { Node node = (nodeSet == null || nodeSet.size() == 0) ? context : firstNode(nodeSet); switch (node.getNodeType()) { case Node.ATTRIBUTE_NODE: case Node.ELEMENT_NODE: case Node.PROCESSING_INSTRUCTION_NODE: return node....
Node node = (nodeSet == null || nodeSet.size() == 0) ? context : firstNode(nodeSet); return node.getNamespaceURI();
if (nodeSet == null || nodeSet.isEmpty()) return ""; Node node = firstNode(nodeSet); String ret = node.getNamespaceURI(); return (ret == null) ? "" : ret;
public static String _namespace_uri(Node context, Collection nodeSet) { Node node = (nodeSet == null || nodeSet.size() == 0) ? context : firstNode(nodeSet); return node.getNamespaceURI(); }
super.refresh();
public void refresh(){ super.refresh(); try{ final PluginManager mgr = InitialNaming.lookup(PluginManager.NAME); PluginDescriptorModel pdm = (PluginDescriptorModel) mgr.getRegistry().getPluginDescriptor(pluginId); if(pdm != null){ isvalid = false; ...
buffer = pdm.getJarFile().getBuffer();
buffer = fdm.getJarFile().getBuffer();
public void refresh(){ super.refresh(); try{ final PluginManager mgr = InitialNaming.lookup(PluginManager.NAME); PluginDescriptorModel pdm = (PluginDescriptorModel) mgr.getRegistry().getPluginDescriptor(pluginId); if(pdm != null){ isvalid = false; ...
public JIFSFpluginJar(String id, FSDirectory parent) { super(id + ".jar", parent); this.id = id; refresh();
public JIFSFpluginJar() { return;
public JIFSFpluginJar(String id, FSDirectory parent) { super(id + ".jar", parent); this.id = id; refresh(); }
super.refresh();
public void refresh(){ super.refresh(); try{ final PluginManager mgr = InitialNaming.lookup(PluginManager.NAME); PluginDescriptorModel pdm = (PluginDescriptorModel) mgr.getRegistry().getPluginDescriptor(id); if(pdm != null){ buffer = pdm.getJarFile().get...
this(SwingConstants.HORIZONTAL, 0, 10, 0, 100);
this(SwingConstants.VERTICAL, 0, 10, 0, 100);
public JScrollBar() { this(SwingConstants.HORIZONTAL, 0, 10, 0, 100); }
adjustmentListenerList.add(AdjustmentListener.class, listener);
listenerList.add(AdjustmentListener.class, listener);
public void addAdjustmentListener(AdjustmentListener listener) { adjustmentListenerList.add(AdjustmentListener.class, listener); }
changeListenerList.add(ChangeListener.class, listener);
listenerList.add(ChangeListener.class, listener);
public void addChangeListener(ChangeListener listener) { changeListenerList.add(ChangeListener.class, listener); }
Object[] adjustmentListeners = adjustmentListenerList.getListenerList();
Object[] adjustmentListeners = listenerList.getListenerList();
protected void fireAdjustmentValueChanged(int id, int type, int value) { Object[] adjustmentListeners = adjustmentListenerList.getListenerList(); AdjustmentEvent adjustmentEvent = new AdjustmentEvent(this, AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED, AdjustmentE...
Object[] changeListeners = changeListenerList.getListenerList();
Object[] changeListeners = listenerList.getListenerList();
private void fireStateChanged() { Object[] changeListeners = changeListenerList.getListenerList(); if (changeEvent == null) changeEvent = new ChangeEvent(this); for (int i = changeListeners.length - 2; i >= 0; i -= 2) { if (changeListeners[i] == ChangeListener.class) ((ChangeListener) changeList...
return (AdjustmentListener[]) adjustmentListenerList.getListenerList();
return (AdjustmentListener[]) listenerList.getListeners(AdjustmentListener.class);
public AdjustmentListener[] getAdjustmentListeners() { return (AdjustmentListener[]) adjustmentListenerList.getListenerList(); }
return (ChangeListener[]) changeListenerList.getListenerList();
return (ChangeListener[]) listenerList.getListeners(ChangeListener.class);
public ChangeListener[] getChangeListeners() { return (ChangeListener[]) changeListenerList.getListenerList(); }
adjustmentListenerList.remove(AdjustmentListener.class, listener);
listenerList.remove(AdjustmentListener.class, listener);
public void removeAdjustmentListener(AdjustmentListener listener) { adjustmentListenerList.remove(AdjustmentListener.class, listener); }
changeListenerList.remove(ChangeListener.class, listener);
listenerList.remove(ChangeListener.class, listener);
public void removeChangeListener(ChangeListener listener) { changeListenerList.remove(ChangeListener.class, listener); }
public final void debugStackTrace(VmThread thread) throws UninterruptiblePragma { Address f = thread.getStackFrame();
public final void debugStackTrace() { Address f = Unsafe.getCurrentFrame();
public final void debugStackTrace(VmThread thread) throws UninterruptiblePragma { Address f = thread.getStackFrame(); Unsafe.debug("Debug stacktrace: "); boolean first = true; int max = 20; while (isValid(f) && (max > 0)) { if (first) { first = false; } else { Unsafe.debug(", "); } final VmMethod me...
public Object getAttribute(AttributedCharacterIterator.Attribute attrib)
private Object getAttribute(AttributedCharacterIterator.Attribute key, int pos)
public Object getAttribute(AttributedCharacterIterator.Attribute attrib) { if (attribs == null) return(null); for (int i = 0; i < attribs.length; i++) { Set key_set = attribs[i].attribs.keySet(); Iterator iter = key_set.iterator(); while (iter.hasNext()) { Object obj = iter.nex...
return(null); for (int i = 0; i < attribs.length; i++)
return null; for (int i = attribs.length - 1; i >= 0; i--)
public Object getAttribute(AttributedCharacterIterator.Attribute attrib) { if (attribs == null) return(null); for (int i = 0; i < attribs.length; i++) { Set key_set = attribs[i].attribs.keySet(); Iterator iter = key_set.iterator(); while (iter.hasNext()) { Object obj = iter.nex...
Set key_set = attribs[i].attribs.keySet(); Iterator iter = key_set.iterator(); while (iter.hasNext())
if (pos >= attribs[i].begin_index && pos < attribs[i].end_index)
public Object getAttribute(AttributedCharacterIterator.Attribute attrib) { if (attribs == null) return(null); for (int i = 0; i < attribs.length; i++) { Set key_set = attribs[i].attribs.keySet(); Iterator iter = key_set.iterator(); while (iter.hasNext()) { Object obj = iter.nex...
Object obj = iter.next(); if (obj.equals(attrib)) if ((ci.getIndex() >= attribs[i].begin_index) && (ci.getIndex() < attribs[i].end_index)) return(attribs[i].attribs.get(obj));
Set keys = attribs[i].attribs.keySet(); if (keys.contains(key)) { return attribs[i].attribs.get(key); }
public Object getAttribute(AttributedCharacterIterator.Attribute attrib) { if (attribs == null) return(null); for (int i = 0; i < attribs.length; i++) { Set key_set = attribs[i].attribs.keySet(); Iterator iter = key_set.iterator(); while (iter.hasNext()) { Object obj = iter.nex...