rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
maxWidth = Math.max(maxWidth, pixelX - x);
pixelX += metrics.charsWidth(buffer, end - count, count);
public static final int getTabbedTextWidth(Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x coordinate. int pixe...
return maxWidth;
return pixelX - x;
public static final int getTabbedTextWidth(Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x coordinate. int pixe...
if (ourcanonical == null) ourcanonical = ourhost; if (theircanonical == null) theircanonical = theirhost;
public boolean implies(Permission perm) { final SocketPermission that; //System.out.println("implies"); // First make sure we are the right object type if (perm instanceof SocketPermission) { that = (SocketPermission) perm; } else { return false; } ...
if (ourcanonical == null) ourcanonical = ourhost; if (theircanonical == null) theircanonical = theirhost;
public boolean implies(Permission perm) { final SocketPermission that; //System.out.println("implies"); // First make sure we are the right object type if (perm instanceof SocketPermission) { that = (SocketPermission) perm; } else { return false; } ...
boolean is_sel = list.isSelectedIndex(row); boolean has_focus = false;
boolean isSel = list.isSelectedIndex(row); boolean hasFocus = (list.getLeadSelectionIndex() == row) && BasicListUI.this.list.hasFocus();
protected void paintCell(Graphics g, int row, Rectangle bounds, ListCellRenderer rend, ListModel data, ListSelectionModel sel, int lead) { boolean is_sel = list.isSelectedIndex(row); boolean has_focus = false; Component comp = rend.getListCellRendererComponent(list, ...
0, is_sel, has_focus);
0, isSel, hasFocus);
protected void paintCell(Graphics g, int row, Rectangle bounds, ListCellRenderer rend, ListModel data, ListSelectionModel sel, int lead) { boolean is_sel = list.isSelectedIndex(row); boolean has_focus = false; Component comp = rend.getListCellRendererComponent(list, ...
stylesheet.bindings.push(false);
LinkedList values = new LinkedList();
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Object ret = select.evaluate(context, pos, len); if (ret != null && ret instanceof Collection) { if (withParams != null) ...
stylesheet.bindings.set(p.name, value, false);
Object[] pair = new Object[2]; pair[0] = p.name; pair[1] = value; values.add(pair); } stylesheet.bindings.push(Bindings.WITH_PARAM); for (Iterator i = values.iterator(); i.hasNext(); ) { Object[] pair = (Object[]) i.next(); QName name = (QName) pair[0]; Object value = pair[1]; stylesheet.bindings.set(name, value, Bin...
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Object ret = select.evaluate(context, pos, len); if (ret != null && ret instanceof Collection) { if (withParams != null) ...
stylesheet.bindings.pop(false);
stylesheet.bindings.pop(Bindings.WITH_PARAM);
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Object ret = select.evaluate(context, pos, len); if (ret != null && ret instanceof Collection) { if (withParams != null) ...
if (instance == null)
if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalTabbedPaneUI instance; if (o == null) {
public static ComponentUI createUI(JComponent component) { if (instance == null) instance = new MetalTabbedPaneUI(); return instance; }
instances.put(component, instance); } else instance = (MetalTabbedPaneUI) o;
public static ComponentUI createUI(JComponent component) { if (instance == null) instance = new MetalTabbedPaneUI(); return instance; }
mem.setShort(offset + 0x00, (short) mode);
mem.setShort(offset + 0x00, mode);
public InitializationBlock32Bit( MemoryResource mem, int offset, short mode, EthernetAddress physicalAddr, long logicalAddr, RxDescriptorRing rxRing, TxDescriptorRing txRing) { this.mem = mem; this.offset = offset; // Populate the initial data structure mem.setShort(offset + 0x00, (short) mode); mem.setByt...
mem.setInt(offset + 0x14, (int) rxRing.getAddressAs32()); mem.setInt(offset + 0x18, (int) txRing.getAddressAs32());
mem.setInt(offset + 0x14, rxRing.getAddressAs32()); mem.setInt(offset + 0x18, txRing.getAddressAs32());
public InitializationBlock32Bit( MemoryResource mem, int offset, short mode, EthernetAddress physicalAddr, long logicalAddr, RxDescriptorRing rxRing, TxDescriptorRing txRing) { this.mem = mem; this.offset = offset; // Populate the initial data structure mem.setShort(offset + 0x00, (short) mode); mem.setByt...
target.dispatchEvent (e);
redispatchEvent(target, e);
public boolean dispatchEvent (AWTEvent e) { if (e instanceof WindowEvent) { Window target = (Window) e.getSource (); if (e.id == WindowEvent.WINDOW_ACTIVATED) setGlobalActiveWindow (target); else if (e.id == WindowEvent.WINDOW_GAINED_FOCUS) setGlobalFocusedWindow (targe...
focusOwner.dispatchEvent (e);
redispatchEvent(focusOwner, e);
public boolean dispatchKeyEvent (KeyEvent e) { Component focusOwner = getGlobalPermanentFocusOwner (); if (focusOwner != null) focusOwner.dispatchEvent (e); // Loop through all registered KeyEventPostProcessors, giving // each a chance to process this event. Iterator i = getKeyEventPostProcessors()...
if (defaultComponent != null)
public void downFocusCycle (Container cont) { if (cont == null) return; if (cont.isFocusCycleRoot (cont)) { FocusTraversalPolicy policy = cont.getFocusTraversalPolicy (); Component defaultComponent = policy.getDefaultComponent (cont); defaultComponent.requestFocusInWindow (); ...
if (shortcut != null)
if (item.isEnabled() && shortcut != null)
public boolean postProcessKeyEvent (KeyEvent e) { // Check if this event represents a menu shortcut. // MenuShortcuts are activated by Ctrl- KeyEvents, only on KEY_PRESSED. int modifiers = e.getModifiersEx (); if (e.getID() == KeyEvent.KEY_PRESSED && (modifiers & KeyEvent.CTRL_DOWN_MASK) != 0) ...
if (defaultComponent != null)
public void upFocusCycle (Component comp) { Component focusComp = (comp == null) ? getGlobalFocusOwner () : comp; Container focusCycleRoot = focusComp.getFocusCycleRootAncestor (); if (focusCycleRoot instanceof Window) { FocusTraversalPolicy policy = focusCycleRoot.getFocusTraversalPolicy (); ...
return hashcode == key.hashcode && baseName.equals(key.baseName) && locale.equals(key.locale) && classLoader.equals(key.classLoader);
return hashcode == key.hashcode && defaultLocale.equals(key.defaultLocale) && baseName.equals(key.baseName) && locale.equals(key.locale) && classLoader.equals(key.classLoader);
public boolean equals(Object o) { if (! (o instanceof BundleKey)) return false; BundleKey key = (BundleKey) o; return hashcode == key.hashcode && baseName.equals(key.baseName) && locale.equals(key.locale) && classLoader.equals(key.classLoader); }
void set(String s, Locale l, ClassLoader cl)
void set(Locale dl, String s, Locale l, ClassLoader cl)
void set(String s, Locale l, ClassLoader cl) { baseName = s; locale = l; classLoader = cl; hashcode = baseName.hashCode() ^ locale.hashCode() ^ classLoader.hashCode(); }
hashcode = baseName.hashCode() ^ locale.hashCode() ^ classLoader.hashCode();
hashcode = defaultLocale.hashCode() ^ baseName.hashCode() ^ locale.hashCode() ^ classLoader.hashCode();
void set(String s, Locale l, ClassLoader cl) { baseName = s; locale = l; classLoader = cl; hashcode = baseName.hashCode() ^ locale.hashCode() ^ classLoader.hashCode(); }
protected AccessibleCellRendererPane(CellRendererPane component) { super(); }
protected AccessibleCellRendererPane() { }
protected AccessibleCellRendererPane(CellRendererPane component) { super(); // TODO } // AccessibleCellRendererPane()
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleCellRendererPane(this); } return accessibleContext; }
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleCellRendererPane(); return accessibleContext; }
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleCellRendererPane(this); } // if return accessibleContext; } // getAccessibleContext()
* @throws ConcurrentModificationException if the HashMap was modified
Iterator iterator(final int type) { return new Iterator() { /** The current Entry. */ LinkedHashEntry current = root; /** The previous Entry returned by next(). */ LinkedHashEntry last; /** The number of known modifications to the backing Map. */ int knownMod = modCount; /** ...
if (knownMod != modCount) throw new ConcurrentModificationException();
Iterator iterator(final int type) { return new Iterator() { /** The current Entry. */ LinkedHashEntry current = root; /** The previous Entry returned by next(). */ LinkedHashEntry last; /** The number of known modifications to the backing Map. */ int knownMod = modCount; /** ...
if (knownMod != modCount) throw new ConcurrentModificationException();
public boolean hasNext() { if (knownMod != modCount) throw new ConcurrentModificationException(); return current != null; }
super(TYPE_BYTE, size);
super(TYPE_BYTE, size, 1, 0); bankData = new byte[1][];
public DataBufferByte(int size) { super(TYPE_BYTE, size); data = new byte[size]; }
bankData[0] = data;
public DataBufferByte(int size) { super(TYPE_BYTE, size); data = new byte[size]; }
writeUnlock();
public void insertString(int offset, String text, AttributeSet attributes) throws BadLocationException { // Just return when no text to insert was given. if (text == null || text.length() == 0) return; DefaultDocumentEvent event = new DefaultDocumentEvent(offset, text.length(), Documen...
finally { writeUnlock(); } }
public void insertString(int offset, String text, AttributeSet attributes) throws BadLocationException { // Just return when no text to insert was given. if (text == null || text.length() == 0) return; DefaultDocumentEvent event = new DefaultDocumentEvent(offset, text.length(), Documen...
removeUpdate(event); boolean shouldFire = content.getString(offset, length).length() != 0;
try {
public void remove(int offset, int length) throws BadLocationException { DefaultDocumentEvent event = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.REMOVE); removeUpdate(event); boolean shouldFire = content.getString(offset, length).length() != 0; writeLock(); ...
writeUnlock();
removeUpdate(event);
public void remove(int offset, int length) throws BadLocationException { DefaultDocumentEvent event = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.REMOVE); removeUpdate(event); boolean shouldFire = content.getString(offset, length).length() != 0; writeLock(); ...
if (shouldFire)
public void remove(int offset, int length) throws BadLocationException { DefaultDocumentEvent event = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.REMOVE); removeUpdate(event); boolean shouldFire = content.getString(offset, length).length() != 0; writeLock(); ...
finally { writeUnlock(); } }
public void remove(int offset, int length) throws BadLocationException { DefaultDocumentEvent event = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.REMOVE); removeUpdate(event); boolean shouldFire = content.getString(offset, length).length() != 0; writeLock(); ...
Object[] params = new Object[] {new Integer(Registry.PKCS8_ENCODING_ID),
Object[] params = new Object[] {Integer.valueOf(Registry.PKCS8_ENCODING_ID),
private DHPrivateKey decodeDHPrivateKey(DHPrivateKeySpec spec) throws InvalidKeySpecException { BigInteger p = spec.getP(); BigInteger g = spec.getG(); BigInteger x = spec.getX(); Object[] params = new Object[] {new Integer(Registry.PKCS8_ENCODING_ID), null, p, g, ...
Object[] params = new Object[] {new Integer(Registry.X509_ENCODING_ID),
Object[] params = new Object[] {Integer.valueOf(Registry.X509_ENCODING_ID),
private DHPublicKey decodeDHPublicKey(DHPublicKeySpec spec) throws InvalidKeySpecException { BigInteger p = spec.getP(); BigInteger g = spec.getG(); BigInteger y = spec.getY(); Object[] params = new Object[] {new Integer(Registry.X509_ENCODING_ID), null, p, g, y}; ...
if (Configuration.DEBUG)
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { log.entering(this.getClass().getName(), "engineGeneratePrivate()", keySpec); PrivateKey result = null; if (keySpec instanceof DSAPrivateKeySpec) result = decodeDSSPrivateKey((DSAPrivateKeySpec) keySpec); ...
if (Configuration.DEBUG)
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException { log.entering(this.getClass().getName(), "engineGeneratePublic()", keySpec); PublicKey result = null; if (keySpec instanceof DSAPublicKeySpec) result = decodeDSSPublicKey((DSAPublicKeySpec) keySpec); else ...
InvalidKeySpecException y = new InvalidKeySpecException(); y.initCause(x); throw y;
throw new InvalidKeySpecException(x.getMessage(), x);
private static Class getConcreteClass(String className) throws InvalidKeySpecException { try { Class result = Class.forName(className); return result; } catch (ClassNotFoundException x) { InvalidKeySpecException y = new InvalidKeySpecException(); y.initCause(x); ...
InvalidKeySpecException y = new InvalidKeySpecException(); y.initCause(x); throw y;
throw new InvalidKeySpecException(x.getMessage(), x);
private static Constructor getConcreteCtor(Class clazz) throws InvalidKeySpecException { try { Constructor result = clazz.getConstructor(new Class[] {int.class, BigInteger.class, ...
InvalidKeySpecException y = new InvalidKeySpecException(); y.initCause(x); throw y;
throw new InvalidKeySpecException(x.getMessage(), x);
private static Method getValueOfMethod(Class clazz) throws InvalidKeySpecException { try { Method result = clazz.getMethod("valueOf", new Class[] {byte[].class}); return result; } catch (NoSuchMethodException x) { InvalidKeySpecException y = new InvalidKeySpecException(...
InvalidKeySpecException y = new InvalidKeySpecException(); y.initCause(x); throw y;
throw new InvalidKeySpecException(x.getMessage(), x);
private static Object invokeConstructor(String className, Object[] params) throws InvalidKeySpecException { Class clazz = getConcreteClass(className); try { Constructor ctor = getConcreteCtor(clazz); Object result = ctor.newInstance(params); return result; } catch (Instan...
InvalidKeySpecException y = new InvalidKeySpecException(); y.initCause(y); throw y;
throw new InvalidKeySpecException(x.getMessage(), x);
private static Object invokeConstructor(String className, Object[] params) throws InvalidKeySpecException { Class clazz = getConcreteClass(className); try { Constructor ctor = getConcreteCtor(clazz); Object result = ctor.newInstance(params); return result; } catch (Instan...
InvalidKeySpecException y = new InvalidKeySpecException(); y.initCause(x); throw y;
throw new InvalidKeySpecException(x.getMessage(), x);
private static Object invokeValueOf(String className, byte[] encoded) throws InvalidKeySpecException { Class clazz = getConcreteClass(className); try { Method valueOf = getValueOfMethod(clazz); Object result = valueOf.invoke(null, new Object[] { encoded }); return result; } ...
public void setElem(int i, int val) { data[i + offset] = val;
public void setElem(int i, int val) { data[i+offset] = (int) val;
public void setElem(int i, int val) { data[i + offset] = val; }
return null;
throw new UnsupportedOperationException();
public float[] fromCIEXYZ(float[] in) { return null; }
return null;
throw new UnsupportedOperationException();
public float[] fromRGB(float[] in) { return null; }
return null;
throw new UnsupportedOperationException();
public float[] toCIEXYZ(float[] in) { return null; }
return null;
throw new UnsupportedOperationException();
public float[] toRGB(float[] in) { return null; }
int dropAction, int srcActions)
int dropAction, int actions)
public DropTargetDropEvent (DropTargetContext dtc, Point location, int dropAction, int srcActions) { super (dtc); this.dropAction = dropAction; this.srcActions = srcActions; this.location = location; this.isLocal = false; }
super (dtc); this.dropAction = dropAction; this.srcActions = srcActions; this.location = location; this.isLocal = false;
this (dtc, location, dropAction, actions, false);
public DropTargetDropEvent (DropTargetContext dtc, Point location, int dropAction, int srcActions) { super (dtc); this.dropAction = dropAction; this.srcActions = srcActions; this.location = location; this.isLocal = false; }
context.acceptDrop (dropAction);
public void acceptDrop (int dropAction) { // FIXME: implement this }
return 0;
return dropAction;
public int getDropAction () { // FIXME: implement this return 0; }
return 0;
return actions;
public int getSourceActions () { // FIXME: implement this return 0; }
return null;
return context.getTransferable ();
public Transferable getTransferable () { // FIXME: implement this return null; }
return false;
return context.isDataFlavorSupported (flavor);
public boolean isDataFlavorSupported (DataFlavor flavor) { // FIXME: implement this return false; }
return isLocal;
return isLocalTx;
public boolean isLocalTransfer() { return isLocal; }
context.rejectDrop ();
public void rejectDrop () { // FIXME: implement this }
throws NotImplementedException
public float getLSB () { throw new Error ("not implemented"); }
throws NotImplementedException
public float getRSB () { throw new Error ("not implemented"); }
break; case 0x5C: stack[sp] = (stack[sp] != 0) ? 0 : 1;
private boolean executeInstruction(ByteBuffer inst) { if (TRACE_EXECUTION) dumpInstruction(inst); int i, count, e1, e2, e3, e4, x, y; int bcode = inst.get() & 0xff; switch (bcode) { case 0x00: // SVTCA[0], Set freedom and proj. Vectors To Coord. Axis [y] setFreedomVector((short) 0, ONE_21...
return caName.toRFC2253();
return caName.toString();
public final String getCAName() { if (caName != null) return caName.toRFC2253(); return null; }
+ caName.toRFC2253() + " ]";
+ caName.toString() + " ]";
public String toString() { if (trustedCert == null) return "[ Trusted CA Public Key=" + caKey + ", Trusted CA Issuer Name=" + caName.toRFC2253() + " ]"; return "[ Trusted CA Certificate=" + trustedCert + " ]"; }
setText("");
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRend...
if (header.getResizingColumn() == null)
public void propertyChange(PropertyChangeEvent ev) { if (ev.getPropertyName().equals("preferredWidth")) { JTableHeader header = getTableHeader(); if (header != null) { TableColumn col = (TableColumn) ev.getSource(); header.setResizingColumn(col); doLayout(); ...
setDefaultRenderer(ImageIcon.class, new IconCellRenderer());
protected void createDefaultRenderers() { setDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(...
cols[i].setWidth(cols[i].getWidth() + average);
cols[i].setWidth(cols[i].getPreferredWidth() + average);
private void distributeSpill(TableColumn[] cols, int spill) { int average = spill / cols.length; for (int i = 0; i < cols.length; i++) { if (cols[i] != null) cols[i].setWidth(cols[i].getWidth() + average); } }
int[] pref = new int[ncols];
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ...
int p = col.getWidth(); pref[i] = p;
int p = col.getPreferredWidth();
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ...
distributeSpill(cols, spill);
distributeSpillResizing(cols, spill, resizingColumn);
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ...
cols = new TableColumn[ncols]; for (int i = rCol; i < ncols; ++i) cols[i] = columnModel.getColumn(i); distributeSpill(cols, spill);
int w = 0; int wp = 0; TableColumn column; for (int i = 0; i < rCol; i++) { column = columnModel.getColumn(i); w += column.getWidth(); wp+= column.getPreferredWidth(); } int n = ncols-rCol-1; if (n>0) { spill = (getWidth()-w) - (prefSum-wp); int average = spill / n; for (int i = rCol+1; i < ncols; i++) { column = ...
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ...
if (tableHeader!=null) tableHeader.repaint();
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ...
editor = getDefaultEditor(dataModel.getColumnClass(column));
{ int mcolumn = convertColumnIndexToModel(column); editor = getDefaultEditor(dataModel.getColumnClass(mcolumn)); }
public TableCellEditor getCellEditor(int row, int column) { TableCellEditor editor = columnModel.getColumn(column).getCellEditor(); if (editor == null) editor = getDefaultEditor(dataModel.getColumnClass(column)); return editor; }
return new Rectangle(x, y, width, height);
rectCache.setBounds(x, y, width, height +y_gap);
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math....
return new Rectangle(x, y, width - x_gap, height - y_gap);
rectCache.setBounds(x, y, width - x_gap, height); return rectCache;
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math....
renderer = getDefaultRenderer(getColumnClass(column));
{ int mcolumn = convertColumnIndexToModel(column); renderer = getDefaultRenderer(dataModel.getColumnClass(mcolumn)); }
public TableCellRenderer getCellRenderer(int row, int column) { TableCellRenderer renderer = columnModel.getColumn(column).getCellRenderer(); if (renderer == null) renderer = getDefaultRenderer(getColumnClass(column)); return renderer; }
return getModel().getColumnClass(column);
return getModel().getColumnClass(convertColumnIndexToModel(column));
public Class getColumnClass(int column) { return getModel().getColumnClass(column); }
int m = getRowMargin(); r.translate(m,m); r.width-=m; component.setBounds(r);
int xOffset = 5; r.x+=xOffset; r.y++; r.width -=xOffset; r.height --; component.setBounds(new Rectangle(r));
private void moveToCellBeingEdited(Component component) { Rectangle r = getCellRect(editingRow, editingColumn, true); // Place the text field so that it would not touch the table // border. int m = getRowMargin(); r.translate(m,m); r.width-=m; component.setBounds(r); }
if (r < 0 || r > nrows)
if (r < 0 || r >= nrows)
public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int height = getRowHeight() + getRowMargin(); int y = point.y; int r = y / height; if (r < 0 || r > nrows) return -1; else return r; } else return -1; }
columnModel.getColumn(i).setHeaderValue(dataModel.getColumnName(i));
{ column = columnModel.getColumn(i); if (column.getHeaderValue()==null) column.setHeaderValue(dataModel.getColumnName(i)); }
public void setColumnModel(TableColumnModel c) { if (c == null) throw new IllegalArgumentException(); TableColumnModel tmp = columnModel; if (tmp != null) tmp.removeColumnModelListener(this); if (c != null) c.addColumnModelListener(this); columnModel = c; if (dataModel != null && col...
public void setEditingRow(int column)
public void setEditingRow(int row)
public void setEditingRow(int column) { editingRow = column; }
editingRow = column;
editingRow = row;
public void setEditingRow(int column) { editingRow = column; }
protected abstract CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target);
createCheckboxMenuItem(CheckboxMenuItem target);
protected abstract CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target);
protected LightweightPeer createComponent(Component target) { return null;
protected LightweightPeer createComponent(Component target) { return new gnu.java.awt.peer.GLightweightPeer (target);
protected LightweightPeer createComponent(Component target) { return null; }
public DragGestureRecognizer createDragGestureRecognizer(Class recognizer, DragSource ds, Component comp, int actions, DragGestureListener l) {
createDragGestureRecognizer(Class recognizer, DragSource ds, Component comp, int actions, DragGestureListener l) {
public DragGestureRecognizer createDragGestureRecognizer(Class recognizer, DragSource ds, Component comp, int actions, DragGestureListener l) { return null; }
public abstract DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent e);
createDragSourceContextPeer(DragGestureEvent e);
public abstract DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent e);
final String toolkit_name = "org.jnode.awt.peer.JNodeToolkit"; try { final ClassLoader cl = Thread.currentThread().getContextClassLoader(); final Class cls = cl.loadClass(toolkit_name);
String toolkit_name = System.getProperty("awt.toolkit", default_toolkit_name); try { Class cls = Class.forName(toolkit_name);
public static Toolkit getDefaultToolkit() { if (toolkit != null) return toolkit; //final String toolkit_name = (String)AccessController.doPrivileged(new GetPropertyAction("awt.toolkit", default_toolkit_name)); final String toolkit_name = "org.jnode.awt.peer.JNodeToolkit"; //final String toolkit_name ...
} catch (Exception e) { throw new AWTError("Cannot load AWT toolkit: " + e.getMessage());
} catch (Throwable t) { AWTError e = new AWTError("Cannot load AWT toolkit: " + toolkit_name); throw (AWTError) e.initCause(t);
public static Toolkit getDefaultToolkit() { if (toolkit != null) return toolkit; //final String toolkit_name = (String)AccessController.doPrivileged(new GetPropertyAction("awt.toolkit", default_toolkit_name)); final String toolkit_name = "org.jnode.awt.peer.JNodeToolkit"; //final String toolkit_name ...
public final EventQueue getSystemEventQueue() {
public final EventQueue getSystemEventQueue() { SecurityManager sm; sm = System.getSecurityManager(); if (sm != null) sm.checkAwtEventQueueAccess();
public final EventQueue getSystemEventQueue() { return getSystemEventQueueImpl(); }
protected void loadSystemColors(int systemColors[]) {
protected void loadSystemColors(int systemColors[]) { systemColors[SystemColor.DESKTOP] = 0xFF005C5C; systemColors[SystemColor.ACTIVE_CAPTION] = 0xFF000080; systemColors[SystemColor.ACTIVE_CAPTION_TEXT] = 0xFFFFFFFF; systemColors[SystemColor.ACTIVE_CAPTION_BORDER] = 0xFFC0C0C0; systemColo...
protected void loadSystemColors(int systemColors[]) { // XXX Implement. }
public Enumeration children();
Enumeration children();
public Enumeration children();
public abstract boolean getAllowsChildren();
boolean getAllowsChildren();
public abstract boolean getAllowsChildren();
public TreeNode getChildAt(int index);
TreeNode getChildAt(int index);
public TreeNode getChildAt(int index);
public int getChildCount();
int getChildCount();
public int getChildCount();
public int getIndex(TreeNode node);
int getIndex(TreeNode node);
public int getIndex(TreeNode node);
public TreeNode getParent();
TreeNode getParent();
public TreeNode getParent();
public boolean isLeaf();
boolean isLeaf();
public boolean isLeaf();
return -1;
Element root = doc.getDefaultRootElement(); int num = -1; Element next = root.getElement(root.getElementIndex(offset)); while (!next.isLeaf()) { num++; if (next.getAttributes(). getAttribute(StyleConstants.NameAttribute).equals(tag)) return num; next = next.getElement(next.getElementIndex(offset)); } return num;
protected int elementCountToTag(HTMLDocument doc, int offset, HTML.Tag tag) { // FIXME: Not implemented. return -1; }
return null;
Element element = doc.getDefaultRootElement(); Element tagElement = null; while (element != null) { Object otag = element.getAttributes().getAttribute( StyleConstants.NameAttribute); if (otag instanceof HTML.Tag && otag.equals(tag)) tagElement = element; element = element.getElement(element.getElementIndex(offset)); }...
protected Element findElementMatchingTag(HTMLDocument doc, int offset, HTML.Tag tag) { // FIXME: Not implemented. return null; }
Element[] roots = doc.getRootElements(); int size = 0; int rootSize = roots.length; for (int i = 0; i < rootSize; i++) size += roots[i].getElementCount() + 1; Element[] elements = new Element[size]; for (int j = 0; j < rootSize; j++) elements[j] = roots[j]; for (int k = 0; k < rootSize; k++) { Element current = ...
return getElementsAt(doc.getDefaultRootElement(), offset, 0);
protected Element[] getElementsAt(HTMLDocument doc, int offset) { // More efficent than using a Vector Element[] roots = doc.getRootElements(); int size = 0; int rootSize = roots.length; // Get total size for (int i = 0;...