rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
throw new DomEx(DomEx.WRONG_DOCUMENT_ERR,
throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR,
public Node removeChild(Node refChild) { try { DomNode ref = (DomNode) refChild; if (ref == null || ref.parent != this) { throw new DomEx(DomEx.NOT_FOUND_ERR, null, ref, 0); } if (readonly && !owner.building) { throw new DomEx(DomEx.NO_MOD...
throw new DomEx(DomEx.NOT_FOUND_ERR, null, ref, 0);
throw new DomDOMException(DOMException.NOT_FOUND_ERR, null, ref, 0);
public Node replaceChild(Node newChild, Node refChild) { try { DomNode child = (DomNode) newChild; DomNode ref = (DomNode) refChild; DomEvent.DomMutationEvent event = getMutationEvent(); boolean doFree = (event != null); if (child.nodeType == DOCUMENT_FR...
throw new DomEx(DomEx.WRONG_DOCUMENT_ERR,
throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR,
public Node replaceChild(Node newChild, Node refChild) { try { DomNode child = (DomNode) newChild; DomNode ref = (DomNode) refChild; DomEvent.DomMutationEvent event = getMutationEvent(); boolean doFree = (event != null); if (child.nodeType == DOCUMENT_FR...
ElementNode(TemplateNode children, TemplateNode next, TemplateNode name,
ElementNode(TemplateNode name,
ElementNode(TemplateNode children, TemplateNode next, TemplateNode name, TemplateNode namespace, String uas, Node source) { super(children, next); this.name = name; this.namespace = namespace; this.uas = uas; this.source = source; NamedNodeMap attrs = source.getAttributes(); Node at...
super(children, next);
ElementNode(TemplateNode children, TemplateNode next, TemplateNode name, TemplateNode namespace, String uas, Node source) { super(children, next); this.name = name; this.namespace = namespace; this.uas = uas; this.source = source; NamedNodeMap attrs = source.getAttributes(); Node at...
return new ElementNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), name.clone(stylesheet),
TemplateNode ret = new ElementNode(name.clone(stylesheet),
TemplateNode clone(Stylesheet stylesheet) { return new ElementNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), name.clone(stylesheet), ...
if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret;
TemplateNode clone(Stylesheet stylesheet) { return new ElementNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), name.clone(stylesheet), ...
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); scrollbar.setForeground(defaults.getColor("ScrollBar.foreground")); scrollbar.setBackground(defaults.getColor("ScrollBar.background")); scrollbar.setBorder(defaults.getBorder("ScrollBar.border"));
LookAndFeel.installColors(scrollbar, "ScrollBar.background", "ScrollBar.foreground"); LookAndFeel.installBorder(scrollbar, "ScrollBar.border");
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); scrollbar.setForeground(defaults.getColor("ScrollBar.foreground")); scrollbar.setBackground(defaults.getColor("ScrollBar.background")); scrollbar.setBorder(defaults.getBorder("ScrollBar.border")); scrollbar.se...
thumbColor = defaults.getColor("ScrollBar.thumb"); thumbDarkShadowColor = defaults.getColor("ScrollBar.thumbDarkShadow"); thumbHighlightColor = defaults.getColor("ScrollBar.thumbHighlight"); thumbLightShadowColor = defaults.getColor("ScrollBar.thumbShadow");
thumbColor = UIManager.getColor("ScrollBar.thumb"); thumbDarkShadowColor = UIManager.getColor("ScrollBar.thumbDarkShadow"); thumbHighlightColor = UIManager.getColor("ScrollBar.thumbHighlight"); thumbLightShadowColor = UIManager.getColor("ScrollBar.thumbShadow");
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); scrollbar.setForeground(defaults.getColor("ScrollBar.foreground")); scrollbar.setBackground(defaults.getColor("ScrollBar.background")); scrollbar.setBorder(defaults.getBorder("ScrollBar.border")); scrollbar.se...
maximumThumbSize = defaults.getDimension("ScrollBar.maximumThumbSize"); minimumThumbSize = defaults.getDimension("ScrollBar.minimumThumbSize");
maximumThumbSize = UIManager.getDimension("ScrollBar.maximumThumbSize"); minimumThumbSize = UIManager.getDimension("ScrollBar.minimumThumbSize");
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); scrollbar.setForeground(defaults.getColor("ScrollBar.foreground")); scrollbar.setBackground(defaults.getColor("ScrollBar.background")); scrollbar.setBorder(defaults.getBorder("ScrollBar.border")); scrollbar.se...
public void addSubjectName(Principal subjectName) throws IOException
public void addSubjectName(byte[] subjectName) throws IOException
public void addSubjectName(Principal subjectName) throws IOException { if (subjectName instanceof X500DistinguishedName) subjectNames.add(subjectName); else if (subjectName instanceof X500Principal) subjectNames.add(new X500DistinguishedName(((X500Principal) subjectName).getEncoded())); else ...
if (subjectName instanceof X500DistinguishedName) subjectNames.add(subjectName); else if (subjectName instanceof X500Principal) subjectNames.add(new X500DistinguishedName(((X500Principal) subjectName).getEncoded())); else subjectNames.add(new X500DistinguishedName(subjectName.getName()));
subjectNames.add(new X500DistinguishedName(subjectName));
public void addSubjectName(Principal subjectName) throws IOException { if (subjectName instanceof X500DistinguishedName) subjectNames.add(subjectName); else if (subjectName instanceof X500Principal) subjectNames.add(new X500DistinguishedName(((X500Principal) subjectName).getEncoded())); else ...
public InvalidAlgorithmParameterException(String msg)
public InvalidAlgorithmParameterException()
public InvalidAlgorithmParameterException(String msg) { super(msg); }
super(msg);
super();
public InvalidAlgorithmParameterException(String msg) { super(msg); }
public void select(int start_pos, int endPos)
public void select(int startPos, int endPos)
public void select(int start_pos, int endPos) { // TODO: Must be implemented. }
public AlreadyBoundHolder(AlreadyBound initialValue)
public AlreadyBoundHolder()
public AlreadyBoundHolder(AlreadyBound initialValue) { value = initialValue; }
value = initialValue;
public AlreadyBoundHolder(AlreadyBound initialValue) { value = initialValue; }
super(dataType, w, h, 1, w, new int[numBands]);
this(dataType, w, h, w, createBankArray(numBands), new int[numBands]);
public BandedSampleModel(int dataType, int w, int h, int numBands) { super(dataType, w, h, 1, w, new int[numBands]); }
if (bands.length > bankIndices.length) throw new RasterFormatException("BandedSampleModel createSubsetSampleModel too" +" many bands");
public SampleModel createSubsetSampleModel(int[] bands) { int[] newoff = new int[bands.length]; int[] newbanks = new int[bands.length]; for (int i=0; i < bands.length; i++) { int b = bands[i]; newoff[i] = bandOffsets[b]; newbanks[i] = bankIndices[b]; } if (bands.length > bankIndices.length) ...
iArray[i] = getSample(x, y, 0, data);
iArray[i] = getSample(x, y, i, data);
public int[] getPixel(int x, int y, int[] iArray, DataBuffer data) { if (iArray == null) iArray = new int[numBands]; for (int i=0; i < numBands; i++) iArray[i] = getSample(x, y, 0, data); return iArray; }
for (y=0; y<h; y++)
int maxX = x + w; int maxY = y + h; for (int yy = x; yy < maxY; yy++)
public int[] getPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) { if (iArray == null) iArray = new int[w*h*numBands]; int outOffset = 0; for (y=0; y<h; y++) { for (x=0; x<w;) { for (int b=0; b < numBands; b++) { int offset = bandOffsets[b] + y * scanlineStride + x; iA...
for (x=0; x<w;)
for (int xx = x; xx < maxX; xx++)
public int[] getPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) { if (iArray == null) iArray = new int[w*h*numBands]; int outOffset = 0; for (y=0; y<h; y++) { for (x=0; x<w;) { for (int b=0; b < numBands; b++) { int offset = bandOffsets[b] + y * scanlineStride + x; iA...
int offset = bandOffsets[b] + y * scanlineStride + x;
int offset = bandOffsets[b] + yy * scanlineStride + xx;
public int[] getPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) { if (iArray == null) iArray = new int[w*h*numBands]; int outOffset = 0; for (y=0; y<h; y++) { for (x=0; x<w;) { for (int b=0; b < numBands; b++) { int offset = bandOffsets[b] + y * scanlineStride + x; iA...
for (y=0; y<h; y++)
int maxX = x + w; int maxY = y + h; for (int yy = y; yy < maxY; yy++)
public int[] getSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) { if (iArray == null) iArray = new int[w*h]; int outOffset = 0; for (y=0; y<h; y++) { for (x=0; x<w;) { int offset = bandOffsets[b] + y * scanlineStride + x; iArray[outOffset++] = data.getElem(...
for (x=0; x<w;)
for (int xx = x; xx < maxX; xx++)
public int[] getSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) { if (iArray == null) iArray = new int[w*h]; int outOffset = 0; for (y=0; y<h; y++) { for (x=0; x<w;) { int offset = bandOffsets[b] + y * scanlineStride + x; iArray[outOffset++] = data.getElem(...
int offset = bandOffsets[b] + y * scanlineStride + x;
int offset = bandOffsets[b] + yy * scanlineStride + xx;
public int[] getSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) { if (iArray == null) iArray = new int[w*h]; int outOffset = 0; for (y=0; y<h; y++) { for (x=0; x<w;) { int offset = bandOffsets[b] + y * scanlineStride + x; iArray[outOffset++] = data.getElem(...
out.getData(bankIndices[i])[offset + bandOffsets[i]] = in[0];
out.getData(bankIndices[i])[offset + bandOffsets[i]] = in[i];
public void setDataElements(int x, int y, Object obj, DataBuffer data) { int transferType = getTransferType(); if (getTransferType() != data.getDataType()) { throw new IllegalArgumentException("transfer type ("+ getTransferType()+"), "+ "does not match data "+ "buffer type (" + ...
public String getMessage() { return super.getMessage(); }
public String getMessage() { String message = super.getMessage(); if (message == null && exception != null) { message = exception.getMessage(); } return message; }
public String getMessage() { return super.getMessage(); } // getMessage()
= ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", locale);
= ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", locale, ClassLoader.getSystemClassLoader());
public DateFormatSymbols (Locale locale) throws MissingResourceException { ResourceBundle res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", locale); ampms = res.getStringArray ("ampms"); eras = res.getStringArray ("eras"); localPatternChars = res.getString ("localPatternChars"); ...
public String group (int group) throws IllegalStateException
public String group ()
public String group (int group) throws IllegalStateException { assertMatchOp(); return match.toString(group); }
return match.toString(group);
return match.toString();
public String group (int group) throws IllegalStateException { assertMatchOp(); return match.toString(group); }
public boolean equals (Object obj)
private static boolean equals (Object x, Object y)
public boolean equals (Object obj) { if (! (obj instanceof DateFormatSymbols)) return false; DateFormatSymbols other = (DateFormatSymbols) obj; return (equals(ampms, other.ampms) && equals(eras, other.eras) && equals(localPatternChars, other.localPatternChars) && equals(months, other.months...
if (! (obj instanceof DateFormatSymbols))
if (x == y) return true; if (x == null || y == null)
public boolean equals (Object obj) { if (! (obj instanceof DateFormatSymbols)) return false; DateFormatSymbols other = (DateFormatSymbols) obj; return (equals(ampms, other.ampms) && equals(eras, other.eras) && equals(localPatternChars, other.localPatternChars) && equals(months, other.months...
DateFormatSymbols other = (DateFormatSymbols) obj; return (equals(ampms, other.ampms) && equals(eras, other.eras) && equals(localPatternChars, other.localPatternChars) && equals(months, other.months) && equals(shortMonths, other.shortMonths) && equals(shortWeekdays, other.shortWeekdays) && equals(weekdays, other.weekda...
if (! (x instanceof Object[]) || ! (y instanceof Object[])) return x.equals(y); Object[] xa = (Object[]) x; Object[] ya = (Object[]) y; if (xa.length != ya.length) return false; for (int i = xa.length; --i >= 0; ) { if (! equals(xa[i], ya[i])) return false; } return true;
public boolean equals (Object obj) { if (! (obj instanceof DateFormatSymbols)) return false; DateFormatSymbols other = (DateFormatSymbols) obj; return (equals(ampms, other.ampms) && equals(eras, other.eras) && equals(localPatternChars, other.localPatternChars) && equals(months, other.months...
public int hashCode ()
private static int hashCode (Object x)
public int hashCode () { return (hashCode(ampms) ^ hashCode(eras) ^ hashCode(localPatternChars) ^ hashCode(months) ^ hashCode(shortMonths) ^ hashCode(shortWeekdays) ^ hashCode(weekdays) ^ hashCode(zoneStrings)); }
return (hashCode(ampms) ^ hashCode(eras) ^ hashCode(localPatternChars) ^ hashCode(months) ^ hashCode(shortMonths) ^ hashCode(shortWeekdays) ^ hashCode(weekdays) ^ hashCode(zoneStrings));
if (x == null) return 0; if (! (x instanceof Object[])) return x.hashCode(); Object[] xa = (Object[]) x; int hash = 0; for (int i = 0; i < xa.length; i++) hash = 37 * hashCode(xa[i]); return hash;
public int hashCode () { return (hashCode(ampms) ^ hashCode(eras) ^ hashCode(localPatternChars) ^ hashCode(months) ^ hashCode(shortMonths) ^ hashCode(shortWeekdays) ^ hashCode(weekdays) ^ hashCode(zoneStrings)); }
return ((selection == null) || (selection.length == 0));
return (selection == null) || (selection.length == 0);
public boolean isSelectionEmpty() { return ((selection == null) || (selection.length == 0)); }
if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalSplitPaneUI instance; if (o == null) { instance = new MetalSplitPaneUI(); instances.put(component, instance); } else instance = (MetalSplitPaneUI) o; return instance;
return new MetalSplitPaneUI();
public static ComponentUI createUI(JComponent component) { if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalSplitPaneUI instance; if (o == null) { instance = new MetalSplitPaneUI(); instances.put(component, instance); } else instance ...
return displayName;
return (displayName == null) ? name : displayName;
public String getDisplayName() { return displayName; }
return shortDescription;
return (shortDescription == null) ? getDisplayName() : shortDescription;
public String getShortDescription() { return shortDescription; }
else if (!obj._is_a(id())) throw new BAD_PARAM("Not a Policy");
public static Policy narrow(org.omg.CORBA.Object obj) { if (obj == null) return null; else if (obj instanceof Policy) return (Policy) obj; else if (!obj._is_a(id())) throw new BAD_PARAM("Not a Policy"); else { Delegate delegate = ((ObjectImpl) obj)._get_delegate(); retur...
public PolicyHolder(Policy initialValue)
public PolicyHolder()
public PolicyHolder(Policy initialValue) { value = initialValue; }
value = initialValue;
public PolicyHolder(Policy initialValue) { value = initialValue; }
}
if (c instanceof JPanel) { JPanel p = (JPanel) c; installDefaults(p); } }
public void installUI(JComponent c) { super.installUI(c); }
final ParsedArguments cmdLine = HELP_INFO.parse(args); final URL url = openURL(ARG_FILE.getValue(cmdLine)); final InputStream is = url.openStream(); if (is == null) { System.err.println("Not found " + ARG_FILE.getValue(cmdLine)); } else { int len; final byte[] buf = new byte[ 1024]; while ((len = is.read(buf)) > 0) { S...
new CatCommand().execute(new CommandLine(args), System.in, System.out, System.err);
public static void main(String[] args) throws Exception { final ParsedArguments cmdLine = HELP_INFO.parse(args); final URL url = openURL(ARG_FILE.getValue(cmdLine)); final InputStream is = url.openStream(); if (is == null) { System.err.println("Not found " + ARG_FILE.getValue(...
private static URL openURL(String fname) throws MalformedURLException {
private URL openURL(String fname) throws MalformedURLException {
private static URL openURL(String fname) throws MalformedURLException { try { return new URL(fname); } catch (MalformedURLException ex) { return new File(fname).toURL(); } }
return null;
return systemPreferences;
public Preferences systemRoot() { return null; }
return null;
return userPreferences;
public Preferences userRoot() { return null; }
private Component findTarget(Component c)
private Component findTarget(Container c, Point loc)
private Component findTarget(Component c) { Component target = c; while (target != null && target.getMouseListeners().length == 0) { target = target.getParent(); } return target; }
Component target = c; while (target != null && target.getMouseListeners().length == 0)
Component[] children = c.getComponents(); Component target = null; if (c != null)
private Component findTarget(Component c) { Component target = c; while (target != null && target.getMouseListeners().length == 0) { target = target.getParent(); } return target; }
target = target.getParent();
for (int i = 0; i < children.length; i++) { Component child = children[i]; if (child.isShowing()) { if (child.contains(loc.x - child.getX(), loc.y - child.getY()) && (child.getMouseListeners().length > 0 || child.getMouseMotionListeners().length > 0)) { target = child; break; } } }
private Component findTarget(Component c) { Component target = c; while (target != null && target.getMouseListeners().length == 0) { target = target.getParent(); } return target; }
Component target = window.findComponentAt(ev.getX(), ev.getY()); target = findTarget(target);
Component deepest = window.findComponentAt(ev.getX(), ev.getY()); if (deepest == null) return false; Container parent = deepest.getParent(); Point loc = ev.getPoint(); loc = convertPointToChild(window, loc, parent); Component target = null; if (parent != null) { target = findTarget(parent, loc); while (target == null &...
private boolean handleMouseEvent(MouseEvent ev) { Window window = (Window) ev.getSource(); Component target = window.findComponentAt(ev.getX(), ev.getY()); target = findTarget(target); if (target == null || target.isLightweight()) { // Dispatch additional MOUSE_EXITED and MOUSE_ENTERED if eve...
Point p1 = AWTUtilities.convertPoint(window, ev.getX(), ev.getY(), lastTarget);
Point p1 = convertPointToChild(window, ev.getPoint(), lastTarget);
private boolean handleMouseEvent(MouseEvent ev) { Window window = (Window) ev.getSource(); Component target = window.findComponentAt(ev.getX(), ev.getY()); target = findTarget(target); if (target == null || target.isLightweight()) { // Dispatch additional MOUSE_EXITED and MOUSE_ENTERED if eve...
if (target != null)
if (target != null && (dragTarget == null || dragTarget == target))
private boolean handleMouseEvent(MouseEvent ev) { Window window = (Window) ev.getSource(); Component target = window.findComponentAt(ev.getX(), ev.getY()); target = findTarget(target); if (target == null || target.isLightweight()) { // Dispatch additional MOUSE_EXITED and MOUSE_ENTERED if eve...
Point p = AWTUtilities.convertPoint(window, ev.getX(), ev.getY(), target);
Point p = convertPointToChild(window, ev.getPoint(), target);
private boolean handleMouseEvent(MouseEvent ev) { Window window = (Window) ev.getSource(); Component target = window.findComponentAt(ev.getX(), ev.getY()); target = findTarget(target); if (target == null || target.isLightweight()) { // Dispatch additional MOUSE_EXITED and MOUSE_ENTERED if eve...
dragTarget = target;
if (dragTarget == null) { lastTarget = dragTarget = target; dragButton = ev.getButton(); } else return false;
private boolean handleMouseEvent(MouseEvent ev) { Window window = (Window) ev.getSource(); Component target = window.findComponentAt(ev.getX(), ev.getY()); target = findTarget(target); if (target == null || target.isLightweight()) { // Dispatch additional MOUSE_EXITED and MOUSE_ENTERED if eve...
if (dragTarget != null)
if (dragTarget != null && dragButton == ev.getButton()) {
private boolean handleMouseEvent(MouseEvent ev) { Window window = (Window) ev.getSource(); Component target = window.findComponentAt(ev.getX(), ev.getY()); target = findTarget(target); if (target == null || target.isLightweight()) { // Dispatch additional MOUSE_EXITED and MOUSE_ENTERED if eve...
lastTarget = target;
private boolean handleMouseEvent(MouseEvent ev) { Window window = (Window) ev.getSource(); Component target = window.findComponentAt(ev.getX(), ev.getY()); target = findTarget(target); if (target == null || target.isLightweight()) { // Dispatch additional MOUSE_EXITED and MOUSE_ENTERED if eve...
lastTarget = target;
private boolean handleMouseEvent(MouseEvent ev) { Window window = (Window) ev.getSource(); Component target = window.findComponentAt(ev.getX(), ev.getY()); target = findTarget(target); if (target == null || target.isLightweight()) { // Dispatch additional MOUSE_EXITED and MOUSE_ENTERED if eve...
Point targetCoordinates = AWTUtilities.convertPoint(window, ev.getX(), ev.getY(), target);
Point targetCoordinates = convertPointToChild(window, ev.getPoint(), target);
private boolean handleMouseEvent(MouseEvent ev) { Window window = (Window) ev.getSource(); Component target = window.findComponentAt(ev.getX(), ev.getY()); target = findTarget(target); if (target == null || target.isLightweight()) { // Dispatch additional MOUSE_EXITED and MOUSE_ENTERED if eve...
void set_value(byte[] a_value);
void set_value(byte[] a_value) throws InvalidValue;
void set_value(byte[] a_value);
Object getOption(int option_id) throws SocketException;
Object getOption(int optionId) throws SocketException;
Object getOption(int option_id) throws SocketException;
void setOption(int option_id, Object val) throws SocketException;
void setOption(int optionId, Object val) throws SocketException;
void setOption(int option_id, Object val) throws SocketException;
public TreePath getPathForRow(int value0) { return null;
public TreePath getPathForRow(int row) { return null;
public TreePath getPathForRow(int value0) { return null; // TODO } // getPathForRow()
public InstantiationException(String s) { super(s);
public InstantiationException() {
public InstantiationException(String s) { super(s); }
this.modifiers = EventModifier.extend(modifiers);
this.modifiers = modifiers & EventModifier.OLD_MASK; this.modifiersEx = modifiers & EventModifier.NEW_MASK;
InputEvent(Component source, int id, long when, int modifiers) { super(source, id); this.when = when; this.modifiers = EventModifier.extend(modifiers); }
return EventModifier.revert(modifiers);
return modifiers;
public int getModifiers() { return EventModifier.revert(modifiers); }
return modifiers;
return modifiersEx;
public int getModifiersEx() { return modifiers; }
return (modifiers & ALT_DOWN_MASK) != 0;
return ((modifiers & ALT_MASK) != 0) || ((modifiersEx & ALT_DOWN_MASK) != 0);
public boolean isAltDown() { return (modifiers & ALT_DOWN_MASK) != 0; }
return (modifiers & ALT_GRAPH_DOWN_MASK) != 0;
return ((modifiers & ALT_GRAPH_MASK) != 0) || ((modifiersEx & ALT_GRAPH_DOWN_MASK) != 0);
public boolean isAltGraphDown() { return (modifiers & ALT_GRAPH_DOWN_MASK) != 0; }
return (modifiers & CTRL_DOWN_MASK) != 0;
return ((modifiers & CTRL_MASK) != 0) || ((modifiersEx & CTRL_DOWN_MASK) != 0);
public boolean isControlDown() { return (modifiers & CTRL_DOWN_MASK) != 0; }
return (modifiers & META_DOWN_MASK) != 0;
return ((modifiers & META_MASK) != 0) || ((modifiersEx & META_DOWN_MASK) != 0);
public boolean isMetaDown() { return (modifiers & META_DOWN_MASK) != 0; }
return (modifiers & SHIFT_DOWN_MASK) != 0;
return ((modifiers & SHIFT_MASK) != 0) || ((modifiersEx & SHIFT_DOWN_MASK) != 0);
public boolean isShiftDown() { return (modifiers & SHIFT_DOWN_MASK) != 0; }
((ClasspathToolkit)Toolkit.getDefaultToolkit()).registerImageIOSpis(this);
private IIORegistry() { super(defaultCategories.iterator()); // XXX: Register built-in Spis here. registerApplicationClasspathSpis(); }
public synchronized void registerServiceProvider(Object provider)
private synchronized boolean registerServiceProvider(Object provider, int cat)
public synchronized void registerServiceProvider(Object provider) { boolean ok = false; if (provider == null) throw new IllegalArgumentException(); for (int i = 0; i < categories.length; i++) if (categories[i].isInstance(provider)) { ok = true; registerServiceProvider(prov...
boolean ok = false;
LinkedList provs; boolean result; Class category;
public synchronized void registerServiceProvider(Object provider) { boolean ok = false; if (provider == null) throw new IllegalArgumentException(); for (int i = 0; i < categories.length; i++) if (categories[i].isInstance(provider)) { ok = true; registerServiceProvider(prov...
for (int i = 0; i < categories.length; i++) if (categories[i].isInstance(provider)) { ok = true; registerServiceProvider(provider, i); }
category = categories[cat]; if (!category.isInstance(provider)) throw new ClassCastException(category.getName());
public synchronized void registerServiceProvider(Object provider) { boolean ok = false; if (provider == null) throw new IllegalArgumentException(); for (int i = 0; i < categories.length; i++) if (categories[i].isInstance(provider)) { ok = true; registerServiceProvider(prov...
if (!ok) throw new IllegalArgumentException();
provs = providers[cat]; if (provs == null) { result = true; provs = providers[cat] = new LinkedList(); } else result = false; provs.add(provider); if (provider instanceof RegisterableService) ((RegisterableService) provider).onRegistration(this, category); return result;
public synchronized void registerServiceProvider(Object provider) { boolean ok = false; if (provider == null) throw new IllegalArgumentException(); for (int i = 0; i < categories.length; i++) if (categories[i].isInstance(provider)) { ok = true; registerServiceProvider(prov...
public String getUIClassID() { return "JCheckBox"; }
public String getUIClassID() { return "CheckBoxUI"; }
public String getUIClassID() { //Returns a string that specifies the name of the L&F class that renders this component. return "JCheckBox"; }
public int getLayoutFlags () throws NotImplementedException
public int getLayoutFlags()
public int getLayoutFlags () throws NotImplementedException { throw new Error ("not implemented"); }
throw new Error ("not implemented");
return 0;
public int getLayoutFlags () throws NotImplementedException { throw new Error ("not implemented"); }
public BindingHolder(Binding initialValue)
public BindingHolder()
public BindingHolder(Binding initialValue) { value = initialValue; }
value = initialValue;
public BindingHolder(Binding initialValue) { value = initialValue; }
paintComponent(g); paintBorder(g); paintChildren(g);
RepaintManager rm = RepaintManager.currentManager(this); if (!isPaintingDoubleBuffered && isDoubleBuffered() && rm.isDoubleBufferingEnabled()) paintDoubleBuffered(g); else { if (g.getClip() == null) g.setClip(0, 0, getWidth(), getHeight()); paintComponent(g); paintBorder(g); paintChildren(g); }
public void paint(Graphics g) { paintComponent(g); paintBorder(g); paintChildren(g); }
void paintDoubleBuffered(Rectangle r)
void paintDoubleBuffered(Graphics g)
void paintDoubleBuffered(Rectangle r) { RepaintManager rm = RepaintManager.currentManager(this); // Paint on the offscreen buffer. Image buffer = rm.getOffscreenBuffer(this, getWidth(), getHeight()); Graphics g = buffer.getGraphics(); Graphics g2 = getComponentGraphics(g); g2.setClip(r.x, r.y, r.wi...
Image buffer = rm.getOffscreenBuffer(this, getWidth(), getHeight()); Graphics g = buffer.getGraphics(); Graphics g2 = getComponentGraphics(g); g2.setClip(r.x, r.y, r.width, r.height); paint(g2); g2.dispose(); g.dispose();
synchronized (paintLock) { Image buffer = rm.getOffscreenBuffer(this, getWidth(), getHeight()); Graphics g2 = buffer.getGraphics(); g2 = getComponentGraphics(g2); g2.setClip(r.x, r.y, r.width, r.height); isPaintingDoubleBuffered = true; paint(g2); isPaintingDoubleBuffered = false; g2.dispose();
void paintDoubleBuffered(Rectangle r) { RepaintManager rm = RepaintManager.currentManager(this); // Paint on the offscreen buffer. Image buffer = rm.getOffscreenBuffer(this, getWidth(), getHeight()); Graphics g = buffer.getGraphics(); Graphics g2 = getComponentGraphics(g); g2.setClip(r.x, r.y, r.wi...
Graphics g3 = getGraphics(); g3.setClip(r.x, r.y, r.width, r.height); g3.drawImage(buffer, 0, 0, this); g3.dispose();
g.drawImage(buffer, 0, 0, this); }
void paintDoubleBuffered(Rectangle r) { RepaintManager rm = RepaintManager.currentManager(this); // Paint on the offscreen buffer. Image buffer = rm.getOffscreenBuffer(this, getWidth(), getHeight()); Graphics g = buffer.getGraphics(); Graphics g2 = getComponentGraphics(g); g2.setClip(r.x, r.y, r.wi...
paintDoubleBuffered(r);
paintDoubleBuffered(g);
void paintImmediately2(Rectangle r) { RepaintManager rm = RepaintManager.currentManager(this); if (rm.isDoubleBufferingEnabled() && isDoubleBuffered()) paintDoubleBuffered(r); else paintSimple(r); }
paintSimple(r);
paintSimple(g); g.dispose();
void paintImmediately2(Rectangle r) { RepaintManager rm = RepaintManager.currentManager(this); if (rm.isDoubleBufferingEnabled() && isDoubleBuffered()) paintDoubleBuffered(r); else paintSimple(r); }
void paintSimple(Rectangle r)
void paintSimple(Graphics g)
void paintSimple(Rectangle r) { Graphics g = getGraphics(); Graphics g2 = getComponentGraphics(g); paint(g2); g2.dispose(); g2.dispose(); }
Graphics g = getGraphics();
void paintSimple(Rectangle r) { Graphics g = getGraphics(); Graphics g2 = getComponentGraphics(g); paint(g2); g2.dispose(); g2.dispose(); }
g2.dispose(); g2.dispose();
void paintSimple(Rectangle r) { Graphics g = getGraphics(); Graphics g2 = getComponentGraphics(g); paint(g2); g2.dispose(); g2.dispose(); }
int getDefaultCloseOperation()
public int getDefaultCloseOperation()
int getDefaultCloseOperation() { return close_action; }
System.exit(1);
System.exit(0);
protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); switch (e.getID()) { case WindowEvent.WINDOW_CLOSING: { switch(close_action) { case EXIT_ON_CLOSE: { System.exit(1); break; } case DISPOSE_ON_CLOSE: { dispose(); break; } ca...
{ close_action = operation; }
{ SecurityManager sm = System.getSecurityManager(); if (sm != null && operation == EXIT_ON_CLOSE) sm.checkExit(0); if (operation != EXIT_ON_CLOSE && operation != DISPOSE_ON_CLOSE && operation != HIDE_ON_CLOSE && operation != DO_NOTHING_ON_CLOSE) throw new IllegalArgumentException("operation = " + operation); close_ac...
public void setDefaultCloseOperation(int operation) { close_action = operation; }
protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); switch (e.getID()) { case WindowEvent.WINDOW_CLOSING : { switch (close_action) { case DISPOSE_ON_CLOSE : { System.out.println("user requested dispose on close"); dispose(); break; } case HIDE_ON_CLOSE : { setVisible(false); break; } case ...
protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); switch (e.getID()) { case WindowEvent.WINDOW_CLOSING: { switch(close_action) { case DISPOSE_ON_CLOSE: { System.out.println("user requested dispose on close"); dispose();
protected void processWindowEvent(WindowEvent e) { // System.out.println("PROCESS_WIN_EV-1: " + e); super.processWindowEvent(e); // System.out.println("PROCESS_WIN_EV-2: " + e); switch (e.getID()) { case WindowEvent.WINDOW_CLOSING : { switch (close_action) { case DISPOSE_ON_CLOSE : { Sys...
}
case WindowEvent.WINDOW_CLOSED: case WindowEvent.WINDOW_OPENED: case WindowEvent.WINDOW_ICONIFIED: case WindowEvent.WINDOW_DEICONIFIED: case WindowEvent.WINDOW_ACTIVATED: case WindowEvent.WINDOW_DEACTIVATED: break; } }
protected void processWindowEvent(WindowEvent e) { // System.out.println("PROCESS_WIN_EV-1: " + e); super.processWindowEvent(e); // System.out.println("PROCESS_WIN_EV-2: " + e); switch (e.getID()) { case WindowEvent.WINDOW_CLOSING : { switch (close_action) { case DISPOSE_ON_CLOSE : { Sys...
public abstract BufferedImage createCompatibleImage(int w, int h, int transparency);
public abstract BufferedImage createCompatibleImage(int w, int h);
public abstract BufferedImage createCompatibleImage(int w, int h, int transparency);
public JRadioButton(String text) { this(text, null); }
public JRadioButton() { this(null, null); }
public JRadioButton(String text) { this(text, null); }
public String getUIClassID() { return "JRadioButton"; }
public String getUIClassID() { return "RadioButtonUI"; }
public String getUIClassID() { //Returns a string that specifies the name of the L&F class that renders this component. return "JRadioButton"; }