rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
System.out.println(date.toLocaleString());
System.out.println(DateFormat.getInstance().format(date));
public static Date getDateForNTFSTimes(long _100ns) { long timeoffset = Math.abs((369 * 365 + 89) * 24 * 3600 * 10000000); long time = (Math.abs(_100ns) - timeoffset); System.out.println("hours" + ((Math.abs(time) / 1000) / 60) / 60); Date date = new Date(time); System.out.println...
dirtyComponents = new Hashtable(); invalidComponents = new Vector();
dirtyComponents = new HashMap(); workDirtyComponents = new HashMap(); repaintOrder = new ArrayList(); workRepaintOrder = new ArrayList(); invalidComponents = new ArrayList(); workInvalidComponents = new ArrayList();
public RepaintManager() { dirtyComponents = new Hashtable(); invalidComponents = new Vector(); repaintWorker = new RepaintWorker(); doubleBufferMaximumSize = new Dimension(2000,2000); doubleBufferingEnabled = true; }
if (w == 0 || h == 0)
if (w == 0 || h == 0 || !component.isShowing())
public synchronized void addDirtyRegion(JComponent component, int x, int y, int w, int h) { if (w == 0 || h == 0) return; Rectangle r = new Rectangle(x, y, w, h); if (dirtyComponents.containsKey(component)) r = r.union((Rectangle)dirtyComponents.get(compone...
else insertInRepaintOrder(component);
public synchronized void addDirtyRegion(JComponent component, int x, int y, int w, int h) { if (w == 0 || h == 0) return; Rectangle r = new Rectangle(x, y, w, h); if (dirtyComponents.containsKey(component)) r = r.union((Rectangle)dirtyComponents.get(compone...
return (Rectangle) dirtyComponents.get(component);
Rectangle dirty = (Rectangle) dirtyComponents.get(component); if (dirty == null) dirty = new Rectangle(); return dirty;
public Rectangle getDirtyRegion(JComponent component) { return (Rectangle) dirtyComponents.get(component); }
Rectangle dirty = (Rectangle) dirtyComponents.get(component); if (dirty == null)
if (! dirtyComponents.containsKey(component))
public boolean isCompletelyDirty(JComponent component) { Rectangle dirty = (Rectangle) dirtyComponents.get(component); if (dirty == null) return false; Rectangle r = component.getBounds(); if (r == null) return true; return dirty.contains(r); }
Rectangle r = component.getBounds(); if (r == null) return true; return dirty.contains(r);
return component.isCompletelyDirty;
public boolean isCompletelyDirty(JComponent component) { Rectangle dirty = (Rectangle) dirtyComponents.get(component); if (dirty == null) return false; Rectangle r = component.getBounds(); if (r == null) return true; return dirty.contains(r); }
component.isCompletelyDirty = false; }
public void markCompletelyClean(JComponent component) { dirtyComponents.remove(component); }
component.isCompletelyDirty = true;
public void markCompletelyDirty(JComponent component) { Rectangle r = component.getBounds(); addDirtyRegion(component, r.x, r.y, r.width, r.height); }
public void paintDirtyRegions() { HashMap roots = new HashMap(); for (Enumeration e = dirtyComponents.keys(); e.hasMoreElements(); )
public synchronized void paintDirtyRegions()
public void paintDirtyRegions() { // step 1: pull out roots and calculate spanning damage HashMap roots = new HashMap(); for (Enumeration e = dirtyComponents.keys(); e.hasMoreElements(); ) { JComponent comp = (JComponent) e.nextElement(); if (! (comp.isVisible() && comp.isShowing())) ...
JComponent comp = (JComponent) e.nextElement(); if (! (comp.isVisible() && comp.isShowing()))
synchronized(this) { ArrayList swap = workRepaintOrder; workRepaintOrder = repaintOrder; repaintOrder = swap; HashMap swap2 = workDirtyComponents; workDirtyComponents = dirtyComponents; dirtyComponents = swap2; } for (Iterator i = workRepaintOrder.iterator(); i.hasNext();) { JComponent comp = (JComponent) i.next(); R...
public void paintDirtyRegions() { // step 1: pull out roots and calculate spanning damage HashMap roots = new HashMap(); for (Enumeration e = dirtyComponents.keys(); e.hasMoreElements(); ) { JComponent comp = (JComponent) e.nextElement(); if (! (comp.isVisible() && comp.isShowing())) ...
Rectangle damaged = getDirtyRegion(comp); if (damaged.width == 0 || damaged.height == 0) continue; JRootPane root = comp.getRootPane(); if (root == null) continue; Rectangle rootDamage = SwingUtilities.convertRectangle(comp, damaged, root); if (! roots.containsKey(root)) { roots.put(root, rootDamage); } else { roots.p...
comp.paintImmediately(damaged);
public void paintDirtyRegions() { // step 1: pull out roots and calculate spanning damage HashMap roots = new HashMap(); for (Enumeration e = dirtyComponents.keys(); e.hasMoreElements(); ) { JComponent comp = (JComponent) e.nextElement(); if (! (comp.isVisible() && comp.isShowing())) ...
dirtyComponents.clear(); Iterator i = roots.entrySet().iterator(); while(i.hasNext()) { Map.Entry ent = (Map.Entry) i.next(); JRootPane root = (JRootPane) ent.getKey(); Rectangle rect = (Rectangle) ent.getValue(); root.paintImmediately(rect); }
workRepaintOrder.clear(); workDirtyComponents.clear();
public void paintDirtyRegions() { // step 1: pull out roots and calculate spanning damage HashMap roots = new HashMap(); for (Enumeration e = dirtyComponents.keys(); e.hasMoreElements(); ) { JComponent comp = (JComponent) e.nextElement(); if (! (comp.isVisible() && comp.isShowing())) ...
invalidComponents.removeElement(component);
invalidComponents.remove(component);
public synchronized void removeInvalidComponent(JComponent component) { invalidComponents.removeElement(component); }
for (Enumeration e = invalidComponents.elements(); e.hasMoreElements(); )
synchronized(this) { ArrayList swap = invalidComponents; invalidComponents = workInvalidComponents; workInvalidComponents = swap; } for (Iterator i = workInvalidComponents.iterator(); i.hasNext(); )
public void validateInvalidComponents() { for (Enumeration e = invalidComponents.elements(); e.hasMoreElements(); ) { JComponent comp = (JComponent) e.nextElement(); if (! (comp.isVisible() && comp.isShowing())) continue; comp.validate(); } invalidComponents.clear(); }
JComponent comp = (JComponent) e.nextElement();
JComponent comp = (JComponent) i.next();
public void validateInvalidComponents() { for (Enumeration e = invalidComponents.elements(); e.hasMoreElements(); ) { JComponent comp = (JComponent) e.nextElement(); if (! (comp.isVisible() && comp.isShowing())) continue; comp.validate(); } invalidComponents.clear(); }
invalidComponents.clear();
workInvalidComponents.clear();
public void validateInvalidComponents() { for (Enumeration e = invalidComponents.elements(); e.hasMoreElements(); ) { JComponent comp = (JComponent) e.nextElement(); if (! (comp.isVisible() && comp.isShowing())) continue; comp.validate(); } invalidComponents.clear(); }
} else if (name.equals(XMLNS_URIs)) { return uris;
public boolean getFeature (String name) throws SAXNotRecognizedException, SAXNotSupportedException { if (name.equals(NAMESPACES)) { return namespaces; } else if (name.equals(NAMESPACE_PREFIXES)) { return prefixes; } else { throw new SAXNotRecognizedException("Feature: " + name); } }
} else if (name.equals(XMLNS_URIs)) { checkNotParsing("feature", name); uris = value;
public void setFeature (String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException { if (name.equals(NAMESPACES)) { checkNotParsing("feature", name); namespaces = value; if (!namespaces && !prefixes) { prefixes = true; } } else if (name.equals(NAMESPACE_PREFIXES)) { ...
if (uris) nsSupport.setNamespaceDeclUris (true);
private void setupParser () { nsSupport.reset(); if (entityResolver != null) { parser.setEntityResolver(entityResolver); } if (dtdHandler != null) { parser.setDTDHandler(dtdHandler); } if (errorHandler != null) { parser.setErrorHandler(errorHandler); } parser.setDocumentHandler(this); locator = null;...
prefix = attQName.substring(n+1);
prefix = attQName.substring(6);
public void startElement (String qName, AttributeList qAtts) throws SAXException { // These are exceptions from the // first pass; they should be // ignored if there's a second pass, // but reported otherwise. Vector exceptions = null; // If we're not doing Namespace // processing, dispatch thi...
if (prefixes) atts.addAttribute("", "", attQName.intern(), type, value);
if (prefixes) { if (uris) atts.addAttribute (nsSupport.XMLNS, prefix, attQName.intern(), type, value); else atts.addAttribute ("", "", attQName.intern(), type, value); }
public void startElement (String qName, AttributeList qAtts) throws SAXException { // These are exceptions from the // first pass; they should be // ignored if there's a second pass, // but reported otherwise. Vector exceptions = null; // If we're not doing Namespace // processing, dispatch thi...
final Class cls = cl.loadClass(className);
final Class<?> cls = cl.loadClass(className);
final void startApp(final String name, final String className) { try { final Runnable runner = new Runnable() { public void run() { try { final ClassLoader cl = Thread.currentThread().getContextClassLoader(); final Class cls = cl.loadClass(className); final Method main = cls.getMethod("main", ...
final Class cls = cl.loadClass(className);
final Class<?> cls = cl.loadClass(className);
public void run() { try { final ClassLoader cl = Thread.currentThread().getContextClassLoader(); final Class cls = cl.loadClass(className); final Method main = cls.getMethod("main", mainTypes); final Object[] args = { new String[0] }; main.invoke(null, args); } catch (SecurityE...
catch(NumberFormatException e) { ; }
catch(NumberFormatException e) { }
public static Font decode (String fontspec){ String name = null; int style = PLAIN; int size = 12; StringTokenizer st = new StringTokenizer(fontspec, "-"); while (st.hasMoreTokens()) { String token = st.nextToken(); if (name == null) { name = token; continue; } if (token.toUpperCase...
public UnmarshalException(String s, Exception e)
public UnmarshalException(String s)
public UnmarshalException(String s, Exception e) { super(s, e); }
super(s, e);
super(s);
public UnmarshalException(String s, Exception e) { super(s, e); }
File f = new File (url.getFile());
String fn = url.getFile(); fn = gnu.java.net.protocol.file.Connection.unquote(fn); File f = new File (fn);
public static synchronized JarFile get (URL url, boolean useCaches) throws IOException { JarFile jf; if (useCaches) { jf = (JarFile) cache.get (url); if (jf != null) return jf; } if ("file".equals (url.getProtocol())) { Fil...
public INodeTable(Ext2FileSystem fs, int firstBlock) {
public INodeTable(Ext2FileSystem fs, int firstBlock) throws IOException {
public INodeTable(Ext2FileSystem fs, int firstBlock) { this.fs = fs; this.firstBlock = firstBlock; blockSize=fs.getSuperblock().getBlockSize(); blockCount = (int)Math.ceil( (double)(fs.getSuperblock().getINodesCount()*INode.INODE_LENGTH) / (double) blockSize); }
blockSize=fs.getSuperblock().getBlockSize();
blockSize=(int)fs.getBlockSize();
public INodeTable(Ext2FileSystem fs, int firstBlock) { this.fs = fs; this.firstBlock = firstBlock; blockSize=fs.getSuperblock().getBlockSize(); blockCount = (int)Math.ceil( (double)(fs.getSuperblock().getINodesCount()*INode.INODE_LENGTH) / (double) blockSize); }
(double)(fs.getSuperblock().getINodesCount()*INode.INODE_LENGTH) /
(double)(fs.getSuperblock().getINodesPerGroup()*INode.INODE_LENGTH) /
public INodeTable(Ext2FileSystem fs, int firstBlock) { this.fs = fs; this.firstBlock = firstBlock; blockSize=fs.getSuperblock().getBlockSize(); blockCount = (int)Math.ceil( (double)(fs.getSuperblock().getINodesCount()*INode.INODE_LENGTH) / (double) blockSize); }
addCompileHighOptLevel("org.jnode.naming");
protected void setupCompileHighOptLevelPackages() { addCompileHighOptLevel("java.io"); addCompileHighOptLevel("java.lang"); addCompileHighOptLevel("java.lang.ref"); addCompileHighOptLevel("java.lang.reflect"); addCompileHighOptLevel("java.net"); addCompileHighOptLevel("java...
boolean hasParent = (currentDirectory.getParentFile() != null);
boolean hasParent = currentDirectory.getParentFile() != null;
public void propertyChange(PropertyChangeEvent e) { JFileChooser filechooser = getFileChooser(); String n = e.getPropertyName(); if (n.equals(JFileChooser.MULTI_SELECTION_ENABLED_CHANGED_PROPERTY)) { int mode = -1; if (filechooser.isMultiSelectionEnabled()) ...
protected int checkHorizontalKey(int key, String exception) { return 0; }
protected int checkHorizontalKey(int key, String exception) { switch (key) { case SwingConstants.RIGHT: case SwingConstants.LEFT: case SwingConstants.CENTER: case SwingConstants.LEADING: case SwingConstants.TRAILING: break; default: throw new IllegalArgumentException(exception); } return key; }
protected int checkHorizontalKey(int key, String exception) { // Verify that key is a legal value for the horizontalAlignment properties. return 0; }
protected int checkVerticalKey(int key, String exception) { return 0; }
protected int checkVerticalKey(int key, String exception) { switch (key) { case SwingConstants.TOP: case SwingConstants.BOTTOM: case SwingConstants.CENTER: break; default: throw new IllegalArgumentException(exception); } return key; }
protected int checkVerticalKey(int key, String exception) { // Ensures that the key is a valid. return 0; }
protected ActionListener createActionListener() { return new ActionListener() { public void actionPerformed(ActionEvent e) { } }; }
protected ActionListener createActionListener() { return new ActionListener() { public void actionPerformed(ActionEvent e) { e.setSource(AbstractButton.this); AbstractButton.this.fireActionPerformed(e); } }; }
protected ActionListener createActionListener() { return new ActionListener() { public void actionPerformed(ActionEvent e) { } }; }
public void actionPerformed(ActionEvent e) { }
public void actionPerformed(ActionEvent e) { e.setSource(AbstractButton.this); AbstractButton.this.fireActionPerformed(e); }
public void actionPerformed(ActionEvent e) { }
protected ChangeListener createChangeListener() { return new ChangeListener() { public void stateChanged(ChangeEvent e) { } }; }
protected ChangeListener createChangeListener() { return new ChangeListener() { public void stateChanged(ChangeEvent e) { AbstractButton.this.fireStateChanged(e); AbstractButton.this.revalidate(); AbstractButton.this.repaint(); } }; }
protected ChangeListener createChangeListener() { // Subclasses that want to handle ChangeEvents differently can override this to return another ChangeListener implementation. return new ChangeListener() { public void stateChanged(ChangeEvent e) { } }; }
protected ItemListener createItemListener() { return new ItemListener() { public void itemStateChanged(ItemEvent e) { } }; }
protected ItemListener createItemListener() { return new ItemListener() { public void itemStateChanged(ItemEvent e) { AbstractButton.this.fireItemStateChanged(e); } }; }
protected ItemListener createItemListener() { return new ItemListener() { public void itemStateChanged(ItemEvent e) { } }; }
protected void fireActionPerformed(ActionEvent event) { getModel().fireActionPerformed(event); }
public void fireActionPerformed(ActionEvent e) { EventListener[] ll = listenerList.getListeners(ActionListener.class); for (int i = 0; i < ll.length; i++) ((ActionListener)ll[i]).actionPerformed(e); }
protected void fireActionPerformed(ActionEvent event) { getModel().fireActionPerformed(event); }
protected void fireItemStateChanged(ItemEvent event) { getModel().fireItemStateChanged(event); }
public void fireItemStateChanged(ItemEvent e) { EventListener[] ll = listenerList.getListeners(ItemListener.class); for (int i = 0; i < ll.length; i++) ((ItemListener)ll[i]).itemStateChanged(e); }
protected void fireItemStateChanged(ItemEvent event) { getModel().fireItemStateChanged(event); }
protected void fireStateChanged(ChangeEvent event) { getModel().fireStateChanged(event); }
public void fireStateChanged(ChangeEvent e) { EventListener[] ll = listenerList.getListeners(ChangeListener.class); for (int i = 0; i < ll.length; i++) ((ChangeListener)ll[i]).stateChanged(e); }
protected void fireStateChanged(ChangeEvent event) { getModel().fireStateChanged(event); }
public Action getAction() { return action_taken; }
public Action getAction() { return action; }
public Action getAction() { return action_taken; }
public void removeActionListener(ActionListener l) { getModel().removeActionListener(l); }
public void removeActionListener(ActionListener l) { listenerList.remove(ActionListener.class, l); }
public void removeActionListener(ActionListener l) { getModel().removeActionListener(l); }
public void removeItemListener(ItemListener l) { getModel().removeItemListener(l); }
public void removeItemListener(ItemListener l) { listenerList.remove(ItemListener.class, l); }
public void removeItemListener(ItemListener l) { getModel().removeItemListener(l); }
firePropertyChange(FOCUS_PAINTED_CHANGED_PROPERTY, old, b); if (hasFocus()) { revalidate(); repaint(); } }
if (old != b) { firePropertyChange(FOCUS_PAINTED_CHANGED_PROPERTY, old, b); revalidate(); repaint(); } }
public void setFocusPainted(boolean b) { boolean old = paint_focus; paint_focus = b; firePropertyChange(FOCUS_PAINTED_CHANGED_PROPERTY, old, b); if (hasFocus()) { revalidate(); repaint(); } }
public void setPressedIcon(Icon pressedIcon) { pressed_button = pressedIcon; revalidate(); repaint(); }
public void setPressedIcon(Icon pressedIcon) { Icon old = pressed_icon; pressed_icon = pressedIcon; if (pressed_icon != old) { firePropertyChange(PRESSED_ICON_CHANGED_PROPERTY, old, pressed_icon); revalidate(); repaint(); } }
public void setPressedIcon(Icon pressedIcon) { pressed_button = pressedIcon; revalidate(); repaint(); }
public void setRolloverIcon(Icon rolloverIcon) { }
public void setRolloverIcon(Icon rolloverIcon) { Icon old = rollover_icon; rollover_icon = rolloverIcon; if (old != rolloverIcon) { firePropertyChange(ROLLOVER_ICON_CHANGED_PROPERTY, old, rolloverIcon); revalidate(); repaint(); } }
public void setRolloverIcon(Icon rolloverIcon) { // Sets the rollover icon for the button. }
public void setRolloverSelectedIcon(Icon rolloverSelectedIcon) { }
public void setRolloverSelectedIcon(Icon rolloverSelectedIcon) { Icon old = rollover_selected_icon; rollover_selected_icon = rolloverSelectedIcon; if (old != rolloverSelectedIcon) { firePropertyChange(ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, old, rolloverSelectedIcon); revalidate(); repaint(); } }
public void setRolloverSelectedIcon(Icon rolloverSelectedIcon) { // Sets the rollover selected icon for the button. }
public void setVerticalAlignment(int alignment) { vert_align = alignment; }
public void setVerticalAlignment(int a) { int old = vert_align; vert_align = a; if (old != a) { firePropertyChange(VERTICAL_ALIGNMENT_CHANGED_PROPERTY, old, a); revalidate(); repaint(); } }
public void setVerticalAlignment(int alignment) { vert_align = alignment; }
public void setVerticalTextPosition(int textPosition) { vert_text_pos = textPosition; }
public void setVerticalTextPosition(int t) { int old = vert_text_pos; vert_text_pos = t; if (old != t) { firePropertyChange(VERTICAL_TEXT_POSITION_CHANGED_PROPERTY, old, t); revalidate(); repaint(); } }
public void setVerticalTextPosition(int textPosition) { vert_text_pos = textPosition; }
setOpaque(true); text = "";
public AbstractButton() { actionListener = createActionListener(); changeListener = createChangeListener(); itemListener = createItemListener(); horizontalAlignment = CENTER; horizontalTextPosition = TRAILING; verticalAlignment = CENTER; verticalTextPosition = CENTER; borderPainted = true; ...
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); defaults.getBorder("CheckBox.border").paintBorder(m, g, cr.x, cr.y, cr.width, cr.height);
protected void paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Rectangle tr = new Rectangle(); // text rectangle Rectangle ir = new R...
protected JComponent createContentPane()
protected Container createContentPane()
protected JComponent createContentPane() { JPanel p = new JPanel(); p.setName(this.getName() + ".contentPane"); p.setLayout(new BorderLayout()); return p; }
return super.isArmed();
return super.isSelected();
public boolean isSelected() { return super.isArmed(); }
public void insert(Component component, int index) {
public void insert(Action action, int index) {
public void insert(Component component, int index) { // TODO } // insert()
c.setBackground(UIManager.getColor("Viewport.background"));
LookAndFeel.installColorsAndFont(c, "Viewport.background", "Viewport.foreground", "Viewport.font");
protected void installDefaults(JComponent c) { c.setOpaque(true); c.setBackground(UIManager.getColor("Viewport.background")); }
throws java.io.IOException;
throws IOException;
public abstract void parse(Reader reader, ParserCallback callback, boolean ignoreCharSet ) throws java.io.IOException;
super.addAttribute(key.toString().toLowerCase(), value);
if (key instanceof String) super.addAttribute(((String) key).toLowerCase(), value); else super.addAttribute(key, value);
public void addAttribute(Object key, Object value) { super.addAttribute(key.toString().toLowerCase(), value); }
Object v = super.getAttribute(key);
v = super.getAttribute(key);
public Object getAttribute(Object _key) { Object key = _key.toString().toLowerCase(); Object v = super.getAttribute(key); if (v != null) return v; else if (parent != null) return parent.getAttribute(key); else return null; }
else if (parent != null)
key = HTML.getAttributeKey((String) key); v = super.getAttribute(key); if (v != null) return v; if (parent != null)
public Object getAttribute(Object _key) { Object key = _key.toString().toLowerCase(); Object v = super.getAttribute(key); if (v != null) return v; else if (parent != null) return parent.getAttribute(key); else return null; }
else
}
public Enumeration getAttributeNames() { // Replace the string keys by HTML.attribute, where applicable final Enumeration enumeration = super.getAttributeNames(); return new Enumeration() { public boolean hasMoreElements() { return enumeration.hasMoreElements(); } p...
else
}
public Object nextElement() { Object key = enumeration.nextElement(); HTML.Attribute hKey = HTML.getAttributeKey((String) key); if (hKey != null) return hKey; else return key; }
Obj(org.omg.CORBA.Object _object, byte[] _key, Servant _servant, POA _poa)
Obj(org.omg.CORBA.Object _object, byte[] _key, Servant _servant, gnuPOA _poa)
Obj(org.omg.CORBA.Object _object, byte[] _key, Servant _servant, POA _poa) { object = _object; key = _key; servant = _servant; poa = _poa; }
public Obj add(org.omg.CORBA.Object object, Servant servant, POA poa)
public Obj add(org.omg.CORBA.Object object, Servant servant, gnuPOA poa)
public Obj add(org.omg.CORBA.Object object, Servant servant, POA poa) { return add(generateObjectKey(object), object, servant, poa); }
BasicListUI.this.list.setSelectedIndex(lead+1);
BasicListUI.this.list.setSelectedIndex(Math.min(lead+1,max));
public void keyPressed( KeyEvent evt ) { if (evt.getKeyCode() == KeyEvent.VK_DOWN) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); if (!evt.isShiftDown()) { BasicListUI.this.list.clearSelection(); BasicListUI.this.list.setSelectedInd...
BasicListUI.this.list.getSelectionModel().setLeadSelectionIndex(lead+1);
BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(Math.min(lead+1,max));
public void keyPressed( KeyEvent evt ) { if (evt.getKeyCode() == KeyEvent.VK_DOWN) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); if (!evt.isShiftDown()) { BasicListUI.this.list.clearSelection(); BasicListUI.this.list.setSelectedInd...
boolean controlPressed = event.isControlDown(); if (controlPressed)
if (event.isControlDown())
public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; boolean controlPressed = event.isControlDown(); if (controlPressed) { if (BasicListUI.this.list.getSelec...
else if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_INTERVAL_SELECTION) BasicListUI.this.list.setSelectionInterval (BasicLis...
public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; boolean controlPressed = event.isControlDown(); if (controlPressed) { if (BasicListUI.this.list.getSelec...
if (list != null) list.revalidate();
void damageLayout() { updateLayoutStateNeeded = 1; if (list != null) list.revalidate(); }
data[i+offset] = (float) val;
data[i+offset] = val;
public void setElem(int i, int val) { data[i+offset] = (float) val; }
targetClass = target.getClass();
public EventHandler(Object target, String action, String eventPropertyName, String listenerMethodName) { this.target = target; this.action = action; // Turn this into a method or do we wait till // runtime property = eventPropertyName; listenerMethod = listenerMethodName; }
throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
private Object[] getProperty(Object o, String prop) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { // Use the event object when the property name to extract is null. if (prop == null) return new Object[] {o, o.getClass()}; // Isolate the first property name from a....
if (prop == null) return new Object[] {o, o.getClass()};
private Object[] getProperty(Object o, String prop) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { // Use the event object when the property name to extract is null. if (prop == null) return new Object[] {o, o.getClass()}; // Isolate the first property name from a....
catch (NoSuchMethodException e)
catch (NoSuchMethodException nsme1)
private Object[] getProperty(Object o, String prop) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { // Use the event object when the property name to extract is null. if (prop == null) return new Object[] {o, o.getClass()}; // Isolate the first property name from a....
} catch(InvocationTargetException ite) { throw new RuntimeException("Method not called: Property or method '" + prop + "' has thrown an exception.", ite); } catch(IllegalAccessException iae) { throw (InternalError) new InternalError("Non-public method was invoked.").initCause(iae); }
private Object[] getProperty(Object o, String prop) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { // Use the event object when the property name to extract is null. if (prop == null) return new Object[] {o, o.getClass()}; // Isolate the first property name from a....
throws Exception
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
if (method == null) throw new RuntimeException("Invoking null method");
try { Method actionMethod = null;
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
if (arguments == null || arguments.length == 0) return null; Object event = arguments[0];
if(property != null) { Object event = arguments[0];
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
Object val = v[0]; Class propertyType = (Class) v[1];
Object[] args = new Object[] { v[0] };
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
Method actionMethod;
Class[] argTypes = new Class[] { initClass((Class) v[1]) }; while(argTypes[0] != null) {
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
actionMethod = target.getClass().getMethod("set" + capitalize(action), new Class[] {propertyType});
actionMethod = targetClass.getMethod("set" + capitalize(action), argTypes); return actionMethod.invoke(target, args);
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
} argTypes[0] = nextClass(argTypes[0]); } argTypes = new Class[] { initClass((Class) v[1]) }; while(argTypes[0] != null) {
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
actionMethod = target.getClass().getMethod(action, new Class[] {propertyType});
actionMethod = targetClass.getMethod(action, argTypes); return actionMethod.invoke(target, args);
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
catch (NoSuchMethodException e1)
catch (NoSuchMethodException e)
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
if (property == null)
} argTypes[0] = nextClass(argTypes[0]); } throw new RuntimeException("Method not called: Could not find a public method named '" + action + "' in target " + targetClass + " which takes a '" + v[1] + "' argument or a property of this type."); } try
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
actionMethod = target.getClass().getMethod(action, null); return actionMethod.invoke(target, null);
actionMethod = targetClass.getMethod(action, null);
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
else throw e1;
catch(NoSuchMethodException nsme) { if(arguments != null && arguments.length >= 1) { Class[] targetArgTypes = new Class[] { initClass(arguments[0].getClass()) }; while(targetArgTypes[0] != null) { try { actionMethod = targetClass.getMethod(action, targetArgTypes); return actionMethod.invoke(target, new Object[...
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
return actionMethod.invoke(target, new Object[] {val});
return actionMethod.invoke(target, null); } catch(InvocationTargetException ite) { throw new RuntimeException(ite.getCause()); } catch(IllegalAccessException iae) { throw (InternalError) new InternalError("Non-public method was invoked.").initCause(iae); }
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
name = NAMES[type];
public Cursor(int type) { if (type < 0 || type >= PREDEFINED_COUNT) throw new IllegalArgumentException ("invalid cursor " + type); this.type = type; // FIXME: lookup and set name? }
if (approveButtonText == null) return getUI().getApproveButtonText(this); else
public String getApproveButtonText() { return approveButtonText; }
return getInternalFileView().getDescription(f);
return getFileView().getDescription(f);
public String getDescription(File f) { return getInternalFileView().getDescription(f); }
if (dialogTitle == null) return getUI().getDialogTitle(this); else
public String getDialogTitle() { return dialogTitle; }
if (fv == null) return getUI().getFileView(this); else
public FileView getFileView() { return fv; }
return getInternalFileView().getIcon(f);
return getFileView().getIcon(f);
public Icon getIcon(File f) { return getInternalFileView().getIcon(f); }
return getInternalFileView().getName(f);
return getFileView().getName(f);
public String getName(File f) { return getInternalFileView().getName(f); }
return getInternalFileView().getTypeDescription(f);
return getFileView().getTypeDescription(f);
public String getTypeDescription(File f) { return getInternalFileView().getTypeDescription(f); }
protected PropertyEditorSupport() { this.eventSource = this; this.pSupport = new PropertyChangeSupport(this);
public PropertyEditorSupport() { eventSource = this; pSupport = new PropertyChangeSupport(this);
protected PropertyEditorSupport() { this.eventSource = this; this.pSupport = new PropertyChangeSupport(this); }
public void firePropertyChange() { pSupport.firePropertyChange(null,null,val); }
public void firePropertyChange() { pSupport.firePropertyChange(null, null, null); }
public void firePropertyChange() { pSupport.firePropertyChange(null,null,val); }
public String getAsText() { return val != null ? val.toString() : "null"; }
public String getAsText() { return value != null ? value.toString() : "null"; }
public String getAsText() { return val != null ? val.toString() : "null"; }