rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if (!f.name.equals(name)) return (false); if (f.size != size) return (false); if (f.style != style) return (false); return (true); }
return (f.getName ().equals (this.getName ()) && f.getFamily ().equals (this.getFamily ()) && f.getFontName ().equals (this.getFontName ()) && f.getTransform ().equals (this.getTransform ()) && f.getSize() == this.getSize() && f.getStyle() == this.getStyle()); }
public boolean equals(Object obj) { if (obj == null) return (false); if (!(obj instanceof Font)) return (false); Font f = (Font) obj; if (!f.name.equals(name)) return (false); if (f.size != size) return (false); if (f.style != style) return (false); return (true); }
public String getFamily() { return (name); }
public String getFamily () { return peer.getFamily (this); }
public String getFamily() { // FIXME: How do I implement this? return (name); }
return (decode(propval)); return (defval); }
return decode (propval); return defval; }
public static Font getFont(String propname, Font defval) { String propval = System.getProperty(propname); if (propval != null) return (decode(propval)); return (defval); }
public LineMetrics getLineMetrics(String str, FontRenderContext frc) { throw new RuntimeException("Not implemented yet"); }
public LineMetrics getLineMetrics(String text, int begin, int limit, FontRenderContext rc) { return peer.getLineMetrics (this, new StringCharacterIterator (text), begin, limit, rc); }
public LineMetrics getLineMetrics(String str, FontRenderContext frc) { throw new RuntimeException("Not implemented yet"); }
public String getName() { return (name); }
public String getName () { return peer.getName (this); }
public String getName() { return (name); }
public FontPeer getPeer() { if (peer != null) return (peer); peer = Toolkit.getDefaultToolkit().getFontPeer(name, style); return (peer); }
public FontPeer getPeer () { return peer; }
public FontPeer getPeer() { if (peer != null) return (peer); peer = Toolkit.getDefaultToolkit().getFontPeer(name, style); return (peer); }
public int getSize() { return (size); }
public int getSize () { return (int) peer.getSize (this); }
public int getSize() { return (size); }
public float getSize2D() { return pointSize; }
public float getSize2D () { return peer.getSize (this); }
public float getSize2D() { return pointSize; }
public int getStyle() { return style; }
public int getStyle () { return peer.getStyle (this); }
public int getStyle() { return style; }
public int hashCode() { return ((new String(name + size + style)).hashCode()); }
public int hashCode() { return this.toString().hashCode(); }
public int hashCode() { return ((new String(name + size + style)).hashCode()); }
public boolean isBold() { if ((style == BOLD) || (style == (BOLD + ITALIC))) return (true); else return (false); }
public boolean isBold () { return peer.isBold (this); }
public boolean isBold() { if ((style == BOLD) || (style == (BOLD + ITALIC))) return (true); else return (false); }
public boolean isItalic() { if ((style == ITALIC) || (style == (BOLD + ITALIC))) return (true); else return (false); }
public boolean isItalic () { return peer.isItalic (this); }
public boolean isItalic() { if ((style == ITALIC) || (style == (BOLD + ITALIC))) return (true); else return (false); }
public boolean isPlain() { if (style == PLAIN) return (true); else return (false); }
public boolean isPlain () { return peer.isPlain (this); }
public boolean isPlain() { if (style == PLAIN) return (true); else return (false); }
public String toString() { return (getClass().getName() + "(name=" + name + ",style=" + style + ",size=" + size + ")"); }
toString() { String styleString = ""; switch (getStyle ()) { case 0: styleString = "plain"; break; case 1: styleString = "bold"; break; case 2: styleString = "italic"; break; default: styleString = "unknown"; } return getClass ().getName () + "[family=" + getFamily () + ",name=" + getFontName () + ",style=" + styleSt...
public String toString() { return (getClass().getName() + "(name=" + name + ",style=" + style + ",size=" + size + ")"); }
if (val > getMaximumValue())
if (val == Spring.UNSET)
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } }
value = getMaximumValue();
if (value != Spring.UNSET) { s1.setValue(Spring.UNSET); s2.setValue(Spring.UNSET);
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } }
else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val;
value = Spring.UNSET; return;
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } }
value = val; double fStrain = getStrain(); s1.setStrain(fStrain); int remainder = val - s1.getValue(); s2.setValue(remainder);
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } }
if (val > getMaximumValue())
value = val; int p1 = s1.getPreferredValue(); int p2 = s2.getPreferredValue(); if (p1 < p2)
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } }
value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue();
s1.setValue(Math.min(val, p1)); s2.setValue(val);
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } }
value = val;
s1.setValue(val); s2.setValue(Math.min(val, p2));
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } }
value = Spring.UNSET;
protected MinusSpring(Spring s) { super(); this.s = s; value = Spring.UNSET; }
if (value == Spring.UNSET) { value = -s.getValue(); } return value;
return -s.getValue();
public int getValue() { if (value == Spring.UNSET) { value = -s.getValue(); } return value; }
if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue();
if (val == Spring.UNSET) s.setValue(Spring.UNSET); else s.setValue(-val);
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } }
else { value = val; } }
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } }
value = Spring.UNSET;
value = newPref;
public SimpleSpring(int newMin, int newPref, int newMax) { min = newMin; pref = newPref; max = newMax; value = Spring.UNSET; }
{ value = pref; }
return pref;
public int getValue() { if (value == Spring.UNSET) { value = pref; } return value; }
if (val > max) { value = max; } else if (val < min) { value = min; } else {
public void setValue(int val) { if (val > max) { value = max; } else if (val < min) { value = min; } else { value = val; } }
}
public void setValue(int val) { if (val > max) { value = max; } else if (val < min) { value = min; } else { value = val; } }
if (portBounds.height >= viewMinimum.height) portBounds.y = 0; else { int overextension = portLowerRight.y - viewPref.height;
overextension = portLowerRight.y - viewPref.height;
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
}
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
if (portBounds.width >= viewMinimum.width) portBounds.x = 0; else { int overextension = portLowerRight.x - viewPref.width;
overextension = portLowerRight.x - viewPref.width;
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
port.setViewSize(viewPref);
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
return null;
AccessibleStateSet result = super.getAccessibleStateSet(); if (orientation == JProgressBar.HORIZONTAL) result.add(AccessibleState.HORIZONTAL); else if (orientation == JProgressBar.VERTICAL) result.add(AccessibleState.VERTICAL); return result;
public AccessibleStateSet getAccessibleStateSet() { return null; }
return pane.getLayer(this).intValue();
return pane.getLayer(this);
public int getLayer() { JDesktopPane pane = getDesktopPane(); if (pane != null) return pane.getLayer(this).intValue(); return -1; }
if (operation != DO_NOTHING_ON_CLOSE || operation != HIDE_ON_CLOSE || operation != DISPOSE_ON_CLOSE)
if (operation != DO_NOTHING_ON_CLOSE && operation != HIDE_ON_CLOSE && operation != DISPOSE_ON_CLOSE)
public void setDefaultCloseOperation(int operation) { if (operation != DO_NOTHING_ON_CLOSE || operation != HIDE_ON_CLOSE || operation != DISPOSE_ON_CLOSE) throw new Error("Close operation must be one of DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE"); defaultCloseOperation = operation; }
return dataModel.getColumnCount();
return columnModel.getColumnCount();
public int getColumnCount() { return dataModel.getColumnCount(); }
convertColumnIndexToView(column)),
convertColumnIndexToModel(column)),
public Component prepareRenderer(TableCellRenderer renderer, int row, int column) { boolean rsa = getRowSelectionAllowed(); boolean csa = getColumnSelectionAllowed(); boolean rs = rsa ? getSelectionModel().isSelectedIndex(row) : false; b...
if (rowHeight < 1) throw new IllegalArgumentException();
public void setRowHeight(int r) { rowHeight = r; revalidate(); repaint(); }
frame.getGlassPane().setVisible(false);
public void internalFrameActivated(InternalFrameEvent e) { // FIXME: Implement. }
frame.getGlassPane().setVisible(true);
public void internalFrameDeactivated(InternalFrameEvent e) { // FIXME: Implement. }
frame.putClientProperty("bufferedDragging", Boolean.TRUE);
public void mouseDragged(MouseEvent e) { // If the frame is maximized, there is nothing that // can be dragged around. if (frame.isMaximum()) return; DesktopManager dm = getDesktopManager(); Rectangle b = frame.getBounds(); Dimension min = frame.getMinimumSize(); if (min...
frame.putClientProperty("bufferedDragging", null); }
public void mouseReleased(MouseEvent e) { DesktopManager dm = getDesktopManager(); xOffset = 0; yOffset = 0; if (e.getSource() == frame && frame.isResizable()) dm.endResizingFrame(frame); else if (e.getSource() == titlePane) dm.endDraggingFrame(frame); }
frame.getRootPane().getGlassPane().setBounds(0, 0, dims.width, dims.height);
public void layoutContainer(Container c) { Dimension dims = frame.getSize(); Insets insets = frame.getInsets(); dims.width -= insets.left + insets.right; dims.height -= insets.top + insets.bottom; frame.getRootPane().getGlassPane().setBounds(0, 0, dims.width, ...
frame.setVisible(false);
protected void installDefaults() { internalFrameLayout = createLayoutManager(); frame.setLayout(internalFrameLayout); LookAndFeel.installBorder(frame, "InternalFrame.border"); frame.setFrameIcon(UIManager.getIcon("InternalFrame.icon")); // InternalFrames are invisible by default. fram...
((JComponent) frame.getRootPane().getGlassPane()).setOpaque(false); frame.getRootPane().getGlassPane().setVisible(true);
public void installUI(JComponent c) { if (c instanceof JInternalFrame) { frame = (JInternalFrame) c; ((JComponent) frame.getRootPane().getGlassPane()).setOpaque(false); frame.getRootPane().getGlassPane().setVisible(true); installDefaults(); installListeners(); instal...
frame.setOpaque(true); frame.invalidate();
if (! frame.isSelected()) frame.getGlassPane().setVisible(true);
public void installUI(JComponent c) { if (c instanceof JInternalFrame) { frame = (JInternalFrame) c; ((JComponent) frame.getRootPane().getGlassPane()).setOpaque(false); frame.getRootPane().getGlassPane().setVisible(true); installDefaults(); installListeners(); instal...
((JComponent) frame.getRootPane().getGlassPane()).setOpaque(true);
public void uninstallUI(JComponent c) { uninstallKeyboardActions(); uninstallComponents(); uninstallListeners(); uninstallDefaults(); ((JComponent) frame.getRootPane().getGlassPane()).setOpaque(true); frame.getRootPane().getGlassPane().setVisible(false); frame = null; }
for (int i = 0; i < stackSize; i += slotSize) { Address child = Unsafe.getAddress(stack, i); if (child != null) { if (heapManager.isObject(child)) { processChild(child);
if (stack != null) { for (int i = 0; i < stackSize; i += slotSize) { Address child = Unsafe.getAddress(stack, i); if (child != null) { if (heapManager.isObject(child)) { processChild(child); }
private void markThreadStack(VmThread thread) { // For now do it stupid, but safe, just scan the whole stack. final int stackSize = thread.getStackSize(); final Object stack = helper.getStack(thread); for (int i = 0; i < stackSize; i += slotSize) { Address child = Unsafe.getAd...
Container host = getContainer(); if (host != null) { preferenceChanged(null, true, true); host.repaint(); } } finally { if (doc instanceof AbstractDocument) ((AbstractDocument) doc).readUnlock(); }
public void setParent(final View p) { super.setParent(p); if (SwingUtilities.isEventDispatchThread()) setParentImpl(); else SwingUtilities.invokeLater (new Runnable() { public void run() { setParentImpl(); } }); }
Container host = getContainer(); if (host != null) { preferenceChanged(null, true, true); host.repaint(); } } finally { if (doc instanceof AbstractDocument) ((AbstractDocument) doc).readUnlock(); }
public void run() { setParentImpl(); }
os.writeFLD32(Register.EAX, Register.ESI, 4, 15); os.writeFLD64(Register.EAX, Register.ESI, 8, 15);
public static void main(String[] args) throws Exception { final X86Stream os = new X86Stream(X86CpuID.createID("pentium4"), 0); final Label label = new Label("label"); os.writeADD(Register.EDX, Register.EAX); os.setObjectRef(label); os.writeNOP(); os.writeLOOP(label); os.writeTEST_AL(0xff); os.writeTEST(R...
table.setFont(null); table.setGridColor(null); table.setForeground(null); table.setBackground(null); table.setSelectionForeground(null); table.setSelectionBackground(null);
protected void uninstallDefaults() { table.setFont(null); table.setGridColor(null); table.setForeground(null); table.setBackground(null); table.setSelectionForeground(null); table.setSelectionBackground(null); }
myAssert(r != null); myAssert(l != null);
void load(EmitterContext ec) { if (kind != REGISTER) { X86RegisterPool pool = ec.getPool(); final Register l = (Register)pool.request(INT, this); final Register r = (Register)pool.request(INT, this); loadTo(ec, l, r); } }
os.writeMOV(INTSIZE, lsb, FP, getOffsetToFP()); os.writeMOV(INTSIZE, msb, FP, getOffsetToFP()+4);
os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP+4);
void loadTo(EmitterContext ec, Register lsb, Register msb) { AbstractX86Stream os = ec.getStream(); X86RegisterPool pool = ec.getPool(); os.log("LongItem.log called "+Integer.toString(kind)); myAssert(lsb != msb); switch (kind) { case REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (ms...
os.writePUSH(msb);
void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case REGISTER: os.writePUSH(lsb); os.writePUSH(msb); break; case LOCAL: os.writePUSH(FP, offsetToFP+4); os.writePUSH(FP, offsetToFP); ...
os.writePUSH(msbv);
void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case REGISTER: os.writePUSH(lsb); os.writePUSH(msb); break; case LOCAL: os.writePUSH(FP, offsetToFP+4); os.writePUSH(FP, offsetToFP); ...
BootLog.debug("Configure finder: class=" + className);
private void configureFinder(List<DeviceFinder> finders, ConfigurationElement element) { final String className = element.getAttribute("class"); BootLog.debug("Configure finder: class=" + className); if (className != null) { try { final Class cls = Thread.currentThread...
BootLog.debug("Configure mapper: class=" + className);
private void configureMapper(List<DeviceToDriverMapper> mappers, ConfigurationElement element) { final String className = element.getAttribute("class"); BootLog.debug("Configure mapper: class=" + className); if (className != null) { try { final Class cls = Thread.curre...
if (!(k instanceof RSAPrivateKey)) {
if (! (k instanceof RSAPrivateKey))
protected void setupForSigning(final PrivateKey k) throws IllegalArgumentException { if (!(k instanceof RSAPrivateKey)) { throw new IllegalArgumentException(); } privateKey = k; }
}
protected void setupForSigning(final PrivateKey k) throws IllegalArgumentException { if (!(k instanceof RSAPrivateKey)) { throw new IllegalArgumentException(); } privateKey = k; }
if (!(k instanceof RSAPublicKey)) {
if (! (k instanceof RSAPublicKey))
protected void setupForVerification(final PublicKey k) throws IllegalArgumentException { if (!(k instanceof RSAPublicKey)) { throw new IllegalArgumentException(); } publicKey = k; }
}
protected void setupForVerification(final PublicKey k) throws IllegalArgumentException { if (!(k instanceof RSAPublicKey)) { throw new IllegalArgumentException(); } publicKey = k; }
{
protected boolean verifySignature(final Object sig) throws IllegalStateException { if (publicKey == null) { throw new IllegalStateException(); } final byte[] S = (byte[]) sig; // 1. Length checking: If the length of the signature S is not k octets, // output "invalid signature" a...
}
protected boolean verifySignature(final Object sig) throws IllegalStateException { if (publicKey == null) { throw new IllegalStateException(); } final byte[] S = (byte[]) sig; // 1. Length checking: If the length of the signature S is not k octets, // output "invalid signature" a...
sizeIndex = index;
private int mapAbsolute() { int index; if (value.equals("xx-small") || value.equals("x-small")) index = 0; else if (value.equals("small")) index = 1; else if (value.equals("medium")) index = 2; else if (value.equals("large")) index = 3; else if (value.equals("x-large")) ind...
int end = value.indexOf("pt");
int end = value.indexOf("px"); if (end == -1) end = value.length();
private int mapPixels() { int end = value.indexOf("pt"); String number = value.substring(0, end); int intVal = Integer.parseInt(number); return intVal; }
catch (NumberFormatException ex) { return DEFAULT_FONT_SIZE; } }
private int mapPixels() { int end = value.indexOf("pt"); String number = value.substring(0, end); int intVal = Integer.parseInt(number); return intVal; }
if ((event.getFirstRow() ==TableModelEvent.HEADER_ROW)
if ((event == null || (event.getFirstRow() == TableModelEvent.HEADER_ROW))
public void tableChanged (TableModelEvent event) { // update the column model from the table model if the structure has // changed and the flag autoCreateColumnsFromModel is set if ((event.getFirstRow() ==TableModelEvent.HEADER_ROW) && autoCreateColumnsFromModel) createDefaultColumnsFromModel(...
if (event.getType() == TableModelEvent.INSERT)
if (event == null || event.getType() == TableModelEvent.INSERT)
public void tableChanged (TableModelEvent event) { // update the column model from the table model if the structure has // changed and the flag autoCreateColumnsFromModel is set if ((event.getFirstRow() ==TableModelEvent.HEADER_ROW) && autoCreateColumnsFromModel) createDefaultColumnsFromModel(...
else if (event.getType() == TableModelEvent.DELETE)
if (event == null || event.getType() == TableModelEvent.DELETE)
public void tableChanged (TableModelEvent event) { // update the column model from the table model if the structure has // changed and the flag autoCreateColumnsFromModel is set if ((event.getFirstRow() ==TableModelEvent.HEADER_ROW) && autoCreateColumnsFromModel) createDefaultColumnsFromModel(...
0, x - p.x, y - p.y, 1, popupTrigger, button);
modifiers, ex, ey, 1, popupTrigger, button);
private Component postEvent(Component source, int id, int button) { if (source == null) { final JNodeToolkit tk = (JNodeToolkit) Toolkit.getDefaultToolkit(); source = tk.getTopComponentAt(x, y); } //log.debug("Source: " + source.getClass().getName()); //TODO full support for modifiers if (source.isVisible()) ...
if (id == MouseEvent.MOUSE_CLICKED) { log.info("MouseClicked to " + source + " at " + ex + "," + ey); } } else { log.info("NO MouseEvent, " + source + " not visible");
private Component postEvent(Component source, int id, int button) { if (source == null) { final JNodeToolkit tk = (JNodeToolkit) Toolkit.getDefaultToolkit(); source = tk.getTopComponentAt(x, y); } //log.debug("Source: " + source.getClass().getName()); //TODO full support for modifiers if (source.isVisible()) ...
filechooser.setLayout(new GridBagLayout()); c.anchor = GridBagConstraints.WEST; c.gridx = 0; c.gridy = 0; filechooser.add(topPanel, c); c.gridy = 1; filechooser.add(centrePanel, c); c.gridy = 2; c.fill = GridBagConstraints.HORIZONTAL; filechooser.add(bottomPanel, c);
filechooser.setLayout(new BorderLayout()); filechooser.add(topPanel, BorderLayout.NORTH); filechooser.add(centrePanel, BorderLayout.CENTER); filechooser.add(bottomPanel, BorderLayout.SOUTH);
public void installComponents(JFileChooser fc) { JLabel look = new JLabel("Look In:"); parents = new JComboBox(); parents.setRenderer(new CBLabelRenderer()); boxEntries(); look.setLabelFor(parents); JPanel parentsPanel = new JPanel(); parentsPanel.add(look); parentsPanel.add(parents); JPan...
protected AccessibleJPopupMenu(JPopupMenu component)
protected AccessibleJPopupMenu()
protected AccessibleJPopupMenu(JPopupMenu component) { super(component); }
super(component);
protected AccessibleJPopupMenu(JPopupMenu component) { super(component); }
this.hide();
super.hide();
public void hide() { this.hide(); }
this.add(c);
this.c = c;
public LightWeightPopup(Container c) { this.add(c); }
int index = layeredPane.getIndexOf(this);
int index = layeredPane.getIndexOf(c);
public void hide() { JLayeredPane layeredPane; layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane(); int index = layeredPane.getIndexOf(this); layeredPane.remove(index); }
this.setBounds(x, y, width, height); layeredPane.add(this, JLayeredPane.POPUP_LAYER, 0);
c.setBounds(x, y, width, height); layeredPane.add(c, JLayeredPane.POPUP_LAYER, 0);
public void show(int x, int y, int width, int height) { JLayeredPane layeredPane; layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane(); this.setBounds(x, y, width, height); layeredPane.add(this, JLayeredPane.POPUP_LAYER, 0); }
return null;
return "PopupMenuSeparatorUI";
public String getUIClassID() { return null; }
lightWeightPopupEnabled = defaultLWPopupEnabled;
lightWeightPopupEnabled = DefaultLightWeightPopupEnabled;
public JPopupMenu() { updateUI(); lightWeightPopupEnabled = defaultLWPopupEnabled; selectionModel = new DefaultSingleSelectionModel(); }
super.setVisible(false);
public JPopupMenu() { updateUI(); lightWeightPopupEnabled = defaultLWPopupEnabled; selectionModel = new DefaultSingleSelectionModel(); }
this.insert(new Separator(), -1);
public void addSeparator() { }
accessibleContext = new AccessibleJPopupMenu(this);
accessibleContext = new AccessibleJPopupMenu();
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJPopupMenu(this); return accessibleContext; }
return defaultLWPopupEnabled;
return DefaultLightWeightPopupEnabled;
public static boolean getDefaultLightWeightPopupEnabled() { return defaultLWPopupEnabled; }
super.setSize(null);
public void pack() { }
paintBorder = painted;
borderPainted = painted;
public void setBorderPainted(boolean painted) { paintBorder = painted; }
defaultLWPopupEnabled = enabled;
DefaultLightWeightPopupEnabled = enabled;
public static void setDefaultLightWeightPopupEnabled(boolean enabled) { defaultLWPopupEnabled = enabled; }
locationX = x; locationY = y;
if (popupLocation == null) popupLocation = new Point(); popupLocation.x = x; popupLocation.y = y;
public void setLocation(int x, int y) { locationX = x; locationY = y; }
firePopupMenuWillBecomeVisible();
if (old != isVisible()) { firePropertyChange(VISIBLE_CHANGED_PROPERTY, old, (boolean) isVisible());
public void setVisible(boolean visible) { super.setVisible(visible); firePopupMenuWillBecomeVisible(); if (visible) { Container rootContainer = (Container) SwingUtilities.getRoot(invoker); boolean fit = true; Dimension size; // Determine the size of the popup menu if (this.getSize().width == 0 && this....
if ((size.width > (rootContainer.getWidth() - locationX)) || (size.height > (rootContainer.getHeight() - locationY)))
if ((size.width > (rootContainer.getWidth() - popupLocation.x)) || (size.height > (rootContainer.getHeight() - popupLocation.y)))
public void setVisible(boolean visible) { super.setVisible(visible); firePopupMenuWillBecomeVisible(); if (visible) { Container rootContainer = (Container) SwingUtilities.getRoot(invoker); boolean fit = true; Dimension size; // Determine the size of the popup menu if (this.getSize().width == 0 && this....
layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane(); Point lp = layeredPane.getLocationOnScreen(); Point r = SwingUtilities.getRoot(invoker).getLocationOnScreen(); int px = locationX - (lp.x - r.x); int py = locationY - (lp.y - r.y); popup.show(px, py, size.width, size.height);
layeredPane = SwingUtilities.getRootPane(invoker) .getLayeredPane(); Point p = new Point(popupLocation.x, popupLocation.y); SwingUtilities.convertPointFromScreen(p, layeredPane); popup.show(p.x, p.y, size.width, size.height); } else { if (rootContainer.contains(popupLocation)) { Insets insets = rootContainer.getInset...
public void setVisible(boolean visible) { super.setVisible(visible); firePopupMenuWillBecomeVisible(); if (visible) { Container rootContainer = (Container) SwingUtilities.getRoot(invoker); boolean fit = true; Dimension size; // Determine the size of the popup menu if (this.getSize().width == 0 && this....
popup.show(locationX, locationY, size.width, size.height);
popup.show(popupLocation.x, popupLocation.y, size.width, size.height); }
public void setVisible(boolean visible) { super.setVisible(visible); firePopupMenuWillBecomeVisible(); if (visible) { Container rootContainer = (Container) SwingUtilities.getRoot(invoker); boolean fit = true; Dimension size; // Determine the size of the popup menu if (this.getSize().width == 0 && this....
}
public void setVisible(boolean visible) { super.setVisible(visible); firePopupMenuWillBecomeVisible(); if (visible) { Container rootContainer = (Container) SwingUtilities.getRoot(invoker); boolean fit = true; Dimension size; // Determine the size of the popup menu if (this.getSize().width == 0 && this....
Point rootOnScreen; rootOnScreen = SwingUtilities.getRoot(invoker).getLocationOnScreen(); Point invokerOnScreen = invoker.getLocationOnScreen(); int popupX = (invokerOnScreen.x - rootOnScreen.x) + x; int popupY = (invokerOnScreen.y - rootOnScreen.y) + y; setLocation(popupX , popupY);
Point p = new Point(x, y); SwingUtilities.convertPointToScreen(p, component); setLocation(p.x, p.y);
public void show(Component component, int x, int y) { setInvoker(component); Point rootOnScreen; rootOnScreen = SwingUtilities.getRoot(invoker).getLocationOnScreen(); Point invokerOnScreen = invoker.getLocationOnScreen(); int popupX = (invokerOnScreen.x - rootOnScreen.x) + x; int popupY = (invo...
createCheckboxMenuItem(CheckboxMenuItem target);
protected abstract CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target);
createCheckboxMenuItem(CheckboxMenuItem target);
createDragGestureRecognizer(Class recognizer, DragSource ds, Component comp, int actions, DragGestureListener l) { return null; }
public DragGestureRecognizer createDragGestureRecognizer(Class recognizer, DragSource ds, Component comp, int actions, DragGestureListener l) { return null; }
createDragGestureRecognizer(Class recognizer, DragSource ds, Component comp, int actions, DragGestureListener l) { return null; }
createDragSourceContextPeer(DragGestureEvent e);
public abstract DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent e);
createDragSourceContextPeer(DragGestureEvent e);
public static Toolkit getDefaultToolkit() { if (toolkit != null) return toolkit; String toolkit_name = System.getProperty("awt.toolkit", default_toolkit_name); try { Class cls = Class.forName(toolkit_name); Object obj = cls.newInstance(); if (!(obj instanceof Toolkit)) throw new AWTError(toolkit_name + " is not a subcl...
public static Toolkit getDefaultToolkit() { if (toolkit != null) return toolkit; String toolkit_name = System.getProperty("awt.toolkit", default_toolkit_name); try { final ClassLoader cl = Thread.currentThread().getContextClassLoader(); final Class cls = cl.loadClass(toolkit_name); Object obj = cls.newInstance(); if (!...
public static Toolkit getDefaultToolkit() { if (toolkit != null) return toolkit; String toolkit_name = System.getProperty("awt.toolkit", default_toolkit_name); try { Class cls = Class.forName(toolkit_name); Object obj = cls.newInstance(); ...