rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
return stackTrace[index];
return index < stackTrace.length ? stackTrace[index] : null;
private StackTraceElement getCallerStackFrame() { Throwable t = new Throwable(); StackTraceElement[] stackTrace = t.getStackTrace(); int index = 0; // skip to stackentries until this class while(!stackTrace[index].getClassName().equals(getClass().getName())){index++;} // skip the stackentries of th...
public void initialize(int keysize, SecureRandom random)
public void initialize(int keysize)
public void initialize(int keysize, SecureRandom random) { initialize(keysize, random); }
initialize(keysize, random);
initialize(keysize, new SecureRandom());
public void initialize(int keysize, SecureRandom random) { initialize(keysize, random); }
return getBorderInsets(c, null);
return borderInsets;
public Insets getBorderInsets(Component c) { return getBorderInsets(c, null); }
boolean mouseIsOver = false; if (c instanceof AbstractButton) { ButtonModel bmodel = ((AbstractButton) c).getModel(); mouseIsOver = bmodel.isRollover(); } if (mouseIsOver)
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { boolean mouseIsOver = false; if (c instanceof AbstractButton) { ButtonModel bmodel = ((AbstractButton) c).getModel(); mouseIsOver = bmodel.isRollover(); } if (mouseIsOver) ...
toolbarButtonBorder = new BorderUIResource.CompoundBorderUIResource (outer, inner);
toolbarButtonBorder = new CompoundBorder(outer, inner);
static Border getToolbarButtonBorder() { if (toolbarButtonBorder == null) { Border outer = new ButtonBorder(); Border inner = new RolloverMarginBorder(); toolbarButtonBorder = new BorderUIResource.CompoundBorderUIResource (outer, inner); } return toolbarButtonBorder; }
includes.add(inc);
private void parseInclude(XMLElement e, File curDir, File defaultDir, String targetArch, List<URL> descrList, List<URL> pluginList) throws MalformedURLException, PluginException { File file = new File(e.getStringAttribute("file")); if (!file.isAbsolute()) { file = new ...
AbstractButton.this.fireStateChanged(e);
AbstractButton.this.fireStateChanged();
protected ChangeListener createChangeListener() { return new ChangeListener() { public void stateChanged(ChangeEvent e) { AbstractButton.this.fireStateChanged(e); AbstractButton.this.repaint(); } }; }
AbstractButton.this.fireStateChanged(e);
AbstractButton.this.fireStateChanged();
public void stateChanged(ChangeEvent e) { AbstractButton.this.fireStateChanged(e); AbstractButton.this.repaint(); }
EventListener[] ll = listenerList.getListeners(ActionListener.class); for (int i = 0; i < ll.length; i++) ((ActionListener)ll[i]).actionPerformed(e);
ActionListener[] listeners = getActionListeners(); for (int i = 0; i < listeners.length; i++) listeners[i].actionPerformed(e);
public void fireActionPerformed(ActionEvent e) { e.setSource(this); EventListener[] ll = listenerList.getListeners(ActionListener.class); for (int i = 0; i < ll.length; i++) ((ActionListener)ll[i]).actionPerformed(e); }
EventListener[] ll = listenerList.getListeners(ItemListener.class); for (int i = 0; i < ll.length; i++) ((ItemListener)ll[i]).itemStateChanged(e);
ItemListener[] listeners = getItemListeners(); for (int i = 0; i < listeners.length; i++) listeners[i].itemStateChanged(e);
public void fireItemStateChanged(ItemEvent e) { e.setSource(this); EventListener[] ll = listenerList.getListeners(ItemListener.class); for (int i = 0; i < ll.length; i++) ((ItemListener)ll[i]).itemStateChanged(e); }
public void fireStateChanged(ChangeEvent e)
public void fireStateChanged()
public void fireStateChanged(ChangeEvent e) { EventListener[] ll = listenerList.getListeners(ChangeListener.class); for (int i = 0; i < ll.length; i++) ((ChangeListener)ll[i]).stateChanged(changeEvent); }
EventListener[] ll = listenerList.getListeners(ChangeListener.class); for (int i = 0; i < ll.length; i++) ((ChangeListener)ll[i]).stateChanged(changeEvent);
ChangeListener[] listeners = getChangeListeners(); for (int i = 0; i < listeners.length; i++) listeners[i].stateChanged(changeEvent);
public void fireStateChanged(ChangeEvent e) { EventListener[] ll = listenerList.getListeners(ChangeListener.class); for (int i = 0; i < ll.length; i++) ((ChangeListener)ll[i]).stateChanged(changeEvent); }
iconTextGap = 4;
focusPainted = true; setFocusable(true);
protected void init(String text, Icon icon) { this.text = text; default_icon = icon; model = new DefaultButtonModel(); actionListener = createActionListener(); changeListener = createChangeListener(); itemListener = createItemListener(); model.addActionListener(actionListener); model.addChange...
addFocusListener(new ButtonFocusListener());
protected void init(String text, Icon icon) { this.text = text; default_icon = icon; model = new DefaultButtonModel(); actionListener = createActionListener(); changeListener = createChangeListener(); itemListener = createItemListener(); model.addActionListener(actionListener); model.addChange...
if (b != old) {
public void setBorderPainted(boolean b) { boolean old = borderPainted; borderPainted = b; if (b != old) { firePropertyChange(BORDER_PAINTED_CHANGED_PROPERTY, old, b); revalidate(); repaint(); } }
}
public void setBorderPainted(boolean b) { boolean old = borderPainted; borderPainted = b; if (b != old) { firePropertyChange(BORDER_PAINTED_CHANGED_PROPERTY, old, b); revalidate(); repaint(); } }
if (b != old) {
public void setContentAreaFilled(boolean b) { boolean old = contentAreaFilled; contentAreaFilled = b; if (b != old) { firePropertyChange(CONTENT_AREA_FILLED_CHANGED_PROPERTY, old, b); revalidate(); repaint(); } }
}
public void setContentAreaFilled(boolean b) { boolean old = contentAreaFilled; contentAreaFilled = b; if (b != old) { firePropertyChange(CONTENT_AREA_FILLED_CHANGED_PROPERTY, old, b); revalidate(); repaint(); } }
public void setDisabledSelectedIcon(Icon disabledSelectedIcon)
public void setDisabledSelectedIcon(Icon icon)
public void setDisabledSelectedIcon(Icon disabledSelectedIcon) { Icon old = disabledSelectedIcon; disabledSelectedIcon = disabledSelectedIcon; if (old != disabledSelectedIcon) { firePropertyChange(DISABLED_SELECTED_ICON_CHANGED_PROPERTY, old, disabledSelectedIcon); ...
disabledSelectedIcon = disabledSelectedIcon; if (old != disabledSelectedIcon) { firePropertyChange(DISABLED_SELECTED_ICON_CHANGED_PROPERTY, old, disabledSelectedIcon);
disabledSelectedIcon = icon; firePropertyChange(DISABLED_SELECTED_ICON_CHANGED_PROPERTY, old, icon);
public void setDisabledSelectedIcon(Icon disabledSelectedIcon) { Icon old = disabledSelectedIcon; disabledSelectedIcon = disabledSelectedIcon; if (old != disabledSelectedIcon) { firePropertyChange(DISABLED_SELECTED_ICON_CHANGED_PROPERTY, old, disabledSelectedIcon); ...
}
public void setDisabledSelectedIcon(Icon disabledSelectedIcon) { Icon old = disabledSelectedIcon; disabledSelectedIcon = disabledSelectedIcon; if (old != disabledSelectedIcon) { firePropertyChange(DISABLED_SELECTED_ICON_CHANGED_PROPERTY, old, disabledSelectedIcon); ...
else
public void setDisplayedMnemonicIndex(int index) { if (index < -1 || (text != null && index >= text.length())) throw new IllegalArgumentException(); else mnemonicIndex = index; }
if (old != focusPainted) {
public void setFocusPainted(boolean p) { boolean old = focusPainted; focusPainted = p; if (old != focusPainted) { firePropertyChange(FOCUS_PAINTED_CHANGED_PROPERTY, old, p); revalidate(); repaint(); } }
}
public void setFocusPainted(boolean p) { boolean old = focusPainted; focusPainted = p; if (old != focusPainted) { firePropertyChange(FOCUS_PAINTED_CHANGED_PROPERTY, old, p); revalidate(); repaint(); } }
if (old != a) {
public void setHorizontalAlignment(int a) { int old = horizontalAlignment; horizontalAlignment = a; if (old != a) { firePropertyChange(HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, old, a); revalidate(); repaint(); } }
}
public void setHorizontalAlignment(int a) { int old = horizontalAlignment; horizontalAlignment = a; if (old != a) { firePropertyChange(HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, old, a); revalidate(); repaint(); } }
if (old != t) {
public void setHorizontalTextPosition(int t) { int old = horizontalTextPosition; horizontalTextPosition = t; if (old != t) { firePropertyChange(HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, old, t); revalidate(); repaint(); } }
}
public void setHorizontalTextPosition(int t) { int old = horizontalTextPosition; horizontalTextPosition = t; if (old != t) { firePropertyChange(HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, old, t); revalidate(); repaint(); } }
if (default_icon != i) {
if (default_icon == i) return;
public void setIcon(Icon i) { if (default_icon != i) { Icon old = default_icon; default_icon = i; firePropertyChange(ICON_CHANGED_PROPERTY, old, i); revalidate(); repaint(); } }
}
public void setIcon(Icon i) { if (default_icon != i) { Icon old = default_icon; default_icon = i; firePropertyChange(ICON_CHANGED_PROPERTY, old, i); revalidate(); repaint(); } }
if (old != i) { fireStateChanged(new ChangeEvent(this));
fireStateChanged();
public void setIconTextGap(int i) { int old = iconTextGap; iconTextGap = i; if (old != i) { fireStateChanged(new ChangeEvent(this)); revalidate(); repaint(); } }
}
public void setIconTextGap(int i) { int old = iconTextGap; iconTextGap = i; if (old != i) { fireStateChanged(new ChangeEvent(this)); revalidate(); repaint(); } }
if (m != old) {
public void setMargin(Insets m) { Insets old = margin; margin = m; if (m != old) { firePropertyChange(MARGIN_CHANGED_PROPERTY, old, m); revalidate(); repaint(); } }
}
public void setMargin(Insets m) { Insets old = margin; margin = m; if (m != old) { firePropertyChange(MARGIN_CHANGED_PROPERTY, old, m); revalidate(); repaint(); } }
if (pressed_icon != old) {
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) { Icon old = pressed_icon; pressed_icon = pressedIcon; if (pressed_icon != old) { firePropertyChange(PRESSED_ICON_CHANGED_PROPERTY, old, pressed_icon); revalidate(); repaint(); } }
if (old != rolloverIcon) { firePropertyChange(ROLLOVER_ICON_CHANGED_PROPERTY, old, rolloverIcon);
firePropertyChange(ROLLOVER_ICON_CHANGED_PROPERTY, old, rolloverIcon);
public void setRolloverIcon(Icon r) { Icon old = rolloverIcon; rolloverIcon = r; if (old != rolloverIcon) { firePropertyChange(ROLLOVER_ICON_CHANGED_PROPERTY, old, rolloverIcon); revalidate(); repaint(); } }
}
public void setRolloverIcon(Icon r) { Icon old = rolloverIcon; rolloverIcon = r; if (old != rolloverIcon) { firePropertyChange(ROLLOVER_ICON_CHANGED_PROPERTY, old, rolloverIcon); revalidate(); repaint(); } }
if (old != rolloverSelectedIcon) { firePropertyChange(ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, old, rolloverSelectedIcon);
firePropertyChange(ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, old, r);
public void setRolloverSelectedIcon(Icon r) { Icon old = rolloverSelectedIcon; rolloverSelectedIcon = r; if (old != rolloverSelectedIcon) { firePropertyChange(ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, old, rolloverSelectedIcon); revalidate(); repaint(); } }
}
public void setRolloverSelectedIcon(Icon r) { Icon old = rolloverSelectedIcon; rolloverSelectedIcon = r; if (old != rolloverSelectedIcon) { firePropertyChange(ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, old, rolloverSelectedIcon); revalidate(); repaint(); } }
if (old != selectedIcon) { firePropertyChange(SELECTED_ICON_CHANGED_PROPERTY, old, selectedIcon);
firePropertyChange(SELECTED_ICON_CHANGED_PROPERTY, old, s);
public void setSelectedIcon(Icon s) { Icon old = selectedIcon; selectedIcon = s; if (old != selectedIcon) { firePropertyChange(SELECTED_ICON_CHANGED_PROPERTY, old, selectedIcon); revalidate(); repaint(); } }
}
public void setSelectedIcon(Icon s) { Icon old = selectedIcon; selectedIcon = s; if (old != selectedIcon) { firePropertyChange(SELECTED_ICON_CHANGED_PROPERTY, old, selectedIcon); revalidate(); repaint(); } }
if (t != old) {
public void setText(String t) { String old = text; text = t; if (t != old) { firePropertyChange(TEXT_CHANGED_PROPERTY, old, t); revalidate(); repaint(); } }
}
public void setText(String t) { String old = text; text = t; if (t != old) { firePropertyChange(TEXT_CHANGED_PROPERTY, old, t); revalidate(); repaint(); } }
if (old != a) {
public void setVerticalAlignment(int a) { int old = verticalAlignment; verticalAlignment = a; if (old != a) { firePropertyChange(VERTICAL_ALIGNMENT_CHANGED_PROPERTY, old, a); revalidate(); repaint(); } }
}
public void setVerticalAlignment(int a) { int old = verticalAlignment; verticalAlignment = a; if (old != a) { firePropertyChange(VERTICAL_ALIGNMENT_CHANGED_PROPERTY, old, a); revalidate(); repaint(); } }
if (old != t) {
public void setVerticalTextPosition(int t) { int old = verticalTextPosition; verticalTextPosition = t; if (old != t) { firePropertyChange(VERTICAL_TEXT_POSITION_CHANGED_PROPERTY, old, t); revalidate(); repaint(); } }
}
public void setVerticalTextPosition(int t) { int old = verticalTextPosition; verticalTextPosition = t; if (old != t) { firePropertyChange(VERTICAL_TEXT_POSITION_CHANGED_PROPERTY, old, t); revalidate(); repaint(); } }
if (input instanceof noHeaderInput)
if (input instanceof HeadlessInput)
public Serializable read_value(InputStream input) { if (input instanceof noHeaderInput) { ((noHeaderInput) input).subsequentCalls = true; } component = arrayClass.getComponentType(); if (component.equals(byte.class)) return OctetSeqHelper.read(input); else if (component.equals(Strin...
((noHeaderInput) input).subsequentCalls = true;
((HeadlessInput) input).subsequentCalls = true;
public Serializable read_value(InputStream input) { if (input instanceof noHeaderInput) { ((noHeaderInput) input).subsequentCalls = true; } component = arrayClass.getComponentType(); if (component.equals(byte.class)) return OctetSeqHelper.read(input); else if (component.equals(Strin...
if (input instanceof noHeaderInput) ((noHeaderInput) input).subsequentCalls = true;
if (input instanceof HeadlessInput) ((HeadlessInput) input).subsequentCalls = true;
public Serializable read_value(InputStream input) { if (input instanceof noHeaderInput) { ((noHeaderInput) input).subsequentCalls = true; } component = arrayClass.getComponentType(); if (component.equals(byte.class)) return OctetSeqHelper.read(input); else if (component.equals(Strin...
InputStream in = CSSScanner.class.getResourceAsStream(name);
in = CSSScanner.class.getResourceAsStream(name); }
public static void main(String[] args) { try { String name = "/javax/swing/text/html/default.css"; InputStream in = CSSScanner.class.getResourceAsStream(name); BufferedInputStream bin = new BufferedInputStream(in); InputStreamReader r = new InputStreamReader(bin); CSSParser...
public void startStatement(String selector)
public void startStatement(Selector[] selector)
public static void main(String[] args) { try { String name = "/javax/swing/text/html/default.css"; InputStream in = CSSScanner.class.getResourceAsStream(name); BufferedInputStream bin = new BufferedInputStream(in); InputStreamReader r = new InputStreamReader(bin); CSSParser...
System.out.println("startStatement: " + selector);
System.out.print("startStatement: "); for (int i = 0; i < selector.length; i++) { System.out.print(selector[i]); if (i < selector.length - 1) System.out.print(','); else System.out.println(); }
public static void main(String[] args) { try { String name = "/javax/swing/text/html/default.css"; InputStream in = CSSScanner.class.getResourceAsStream(name); BufferedInputStream bin = new BufferedInputStream(in); InputStreamReader r = new InputStreamReader(bin); CSSParser...
public void startStatement(String selector)
public void startStatement(Selector[] selector)
public void startStatement(String selector) { System.out.println("startStatement: " + selector); }
System.out.println("startStatement: " + selector);
System.out.print("startStatement: "); for (int i = 0; i < selector.length; i++) { System.out.print(selector[i]); if (i < selector.length - 1) System.out.print(','); else System.out.println(); }
public void startStatement(String selector) { System.out.println("startStatement: " + selector); }
callback.declaration(property, value.toString());
callback.declaration(property, value.toString().trim());
private boolean parseDeclaration() throws IOException { // Maybe fetch one DELIM. int token = readToken(); if (token == CSSScanner.DELIM) token = readToken(); boolean ret = true; // Parse property String property = null; if (token == CSSScanner.IDENT) { property = new String(s...
callback.startStatement(selector.toString());
StringTokenizer selSplitter = new StringTokenizer(selector.toString(), ","); Selector[] sels = new Selector[selSplitter.countTokens()]; for (int i = 0; selSplitter.hasMoreTokens(); i++) { String sel = selSplitter.nextToken().trim(); sels[i] = new Selector(sel); } callback.startStatement(sels);
private boolean parseRuleset() throws IOException { StringBuilder selector = new StringBuilder(); parseSelector(selector); callback.startStatement(selector.toString()); // Read any number of whitespace. int token; do { token = readToken(); } while (token == CSSScanner.S); boo...
return parseAny(s);
boolean success = parseAny(s); while (parseAny(s)); return success;
private boolean parseValue(StringBuilder s) throws IOException { // FIXME: Handle block and ATKEYWORD. return parseAny(s); }
void startStatement(String selector);
void startStatement(Selector[] selector);
void startStatement(String selector);
private final char safeGetChar (ResourceBundle bundle,
private char safeGetChar(ResourceBundle bundle,
private final char safeGetChar (ResourceBundle bundle, String name, char def) { String r = null; if (bundle != null) { try { r = bundle.getString(name); } catch (MissingResourceException x) { } } if (r == null || r.length() < 1) return def; return r.charAt(0); }
private final String safeGetString (ResourceBundle bundle,
private String safeGetString(ResourceBundle bundle,
private final String safeGetString (ResourceBundle bundle, String name, String def) { if (bundle != null) { try { return bundle.getString(name); } catch (MissingResourceException x) { } } return def; }
private final int extractAndNormalizeSample(int pixel, int component)
private int extractAndNormalizeSample(int pixel, int component)
private final int extractAndNormalizeSample(int pixel, int component) { int value = extractAndScaleSample(pixel, component); if (hasAlpha() && isAlphaPremultiplied()) value = value*255/getAlpha(pixel); return value; }
private final int extractAndScaleSample(int pixel, int component)
private int extractAndScaleSample(int pixel, int component)
private final int extractAndScaleSample(int pixel, int component) { int field = pixel & getMask(component); int to8BitShift = 8 - shifts[component] - getComponentSize(component); return (to8BitShift>0) ? (field << to8BitShift) : (field >>> (-to8BitShift)); }
private final int value16ToField(int val, int component)
private int value16ToField(int val, int component)
private final int value16ToField(int val, int component) { int toFieldShift = getComponentSize(component) + shifts[component] - 16; return (toFieldShift>0) ? (val << toFieldShift) : (val >>> (-toFieldShift)); }
private final int valueToField(int val, int component, int highBit)
private int valueToField(int val, int component, int highBit)
private final int valueToField(int val, int component, int highBit) { int toFieldShift = getComponentSize(component) + shifts[component] - highBit; int ret = (toFieldShift>0) ? (val << toFieldShift) : (val >>> (-toFieldShift)); return ret & getMask(component); }
ORB orb = Restricted_ORB.Singleton;
ORB orb = OrbRestricted.Singleton;
public static TypeCode type() { ORB orb = Restricted_ORB.Singleton; return orb.create_alias_tc(id(), "VersionSpec", orb.create_string_tc(0)); }
ORB orb = Restricted_ORB.Singleton;
ORB orb = OrbRestricted.Singleton;
public static TypeCode type() { if (typecode == null) { ORB orb = Restricted_ORB.Singleton; typecode = orb.create_value_box_tc(id(), "StringValue", tString); } return typecode; }
if (filledSlider)
if (MetalLookAndFeel.getCurrentTheme() instanceof OceanTheme) { if (slider.isEnabled()) { int xPos = xPositionForValue(slider.getValue()); int x = (slider.getInverted() ? xPos : trackRect.x); int w = (slider.getInverted() ? trackX + trackW - xPos : xPos - trackRect.x); g.setColor(MetalLookAndFeel.getWhite()); g.drawLin...
public void paintTrack(Graphics g) { Color shadowColor = MetalLookAndFeel.getControlShadow(); if (slider.getOrientation() == JSlider.HORIZONTAL) { int trackX = trackRect.x; int trackY = trackRect.y + (trackRect.height - getTrackWidth()) / 2; int trackW = trackRect.width - 1; int ...
if (filledSlider)
if (MetalLookAndFeel.getCurrentTheme() instanceof OceanTheme) { if (slider.isEnabled()) { int yPos = yPositionForValue(slider.getValue()); int y = (slider.getInverted() ? trackY : yPos); int h = (slider.getInverted() ? yPos - trackY : trackY + trackH - yPos); g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(trackX ...
public void paintTrack(Graphics g) { Color shadowColor = MetalLookAndFeel.getControlShadow(); if (slider.getOrientation() == JSlider.HORIZONTAL) { int trackX = trackRect.x; int trackY = trackRect.y + (trackRect.height - getTrackWidth()) / 2; int trackW = trackRect.width - 1; int ...
public Object clone() throws CloneNotSupportedException
protected Object clone() throws CloneNotSupportedException
public Object clone() throws CloneNotSupportedException { if (this instanceof Cloneable) return super.clone(); else throw new CloneNotSupportedException(); }
if (Configuration.DEBUG)
String hashByteArray(byte[] ba) throws IOException { sha.update(ba); byte[] hash = sha.digest(); log.finest("Hashed " + ba.length + " byte(s)"); String result = Base64.encode(hash); return result; }
fields[WEEK_OF_MONTH] = (fields[DAY_OF_MONTH] - relativeWeekday + 6) / 7;
fields[WEEK_OF_MONTH] = (fields[DAY_OF_MONTH] - relativeWeekday + 12) / 7;
protected synchronized void computeFields() { boolean gregorian = (time >= gregorianCutover); TimeZone zone = getTimeZone(); fields[ZONE_OFFSET] = zone.getRawOffset(); long localTime = time + fields[ZONE_OFFSET]; int day = (int) (localTime / (24 * 60 * 60 * 1000L)); int millisInDay = (int) (localTime % (24 * 60 ...
int month = (dayOfYear * 5 + 3) / (31 + 30 + 31 + 30 + 31); int day = (6 + (dayOfYear * 5 + 3) % (31 + 30 + 31 + 30 + 31)) / 5;
int month = isSet[MONTH] ? fields[MONTH] : (dayOfYear * 5 + 3) / (31 + 30 + 31 + 30 + 31); int day = isSet[DAY_OF_MONTH] ? fields[DAY_OF_MONTH] : (6 + (dayOfYear * 5 + 3) % (31 + 30 + 31 + 30 + 31)) / 5;
protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (era == BC) year = 1 - year; int[] daysOfYear = getDayOfYear(year); int hour = 0; if (isSet[HOUR_OF_DAY]) hour = fields[HOUR_OF_DAY]; else if (isSet[HOUR]) { hour = fields[...
if (isLeapYear(year, true) && dayOfYear < 31 + 29)
if (isLeapYear (year, true))
private long getLinearTime(int year, int dayOfYear, int millis) { // The 13 is the number of days, that were omitted in the Gregorian // Calender until the epoch. // We shift right by 2 instead of dividing by 4, to get correct // results for negative years (and this is even more efficient). int julianDay = ((year...
recordTypeCode r = new recordTypeCode(TCKind.tk_alias);
RecordTypeCode r = new RecordTypeCode(TCKind.tk_alias);
public static TypeCode type() { recordTypeCode r = new recordTypeCode(TCKind.tk_alias); r.setName("PolicyErrorCode"); r.setId(id()); r.setContentType(new primitiveTypeCode(TCKind.tk_short)); return r; }
r.setContentType(new primitiveTypeCode(TCKind.tk_short));
r.setContentType(new PrimitiveTypeCode(TCKind.tk_short));
public static TypeCode type() { recordTypeCode r = new recordTypeCode(TCKind.tk_alias); r.setName("PolicyErrorCode"); r.setId(id()); r.setContentType(new primitiveTypeCode(TCKind.tk_short)); return r; }
public MenuItem() { }
MenuItem() { }
public MenuItem() { }
public synchronized void addActionListener(ActionListener listener) {
addActionListener(ActionListener listener) {
public synchronized void addActionListener(ActionListener listener) { action_listeners = AWTEventMulticaster.add(action_listeners, listener); enableEvents(AWTEvent.ACTION_EVENT_MASK); }
public void addNotify() { if (peer != null) peer = getToolkit().createMenuItem(this); }
addNotify() { if (peer == null) peer = getToolkit ().createMenuItem (this); }
public void addNotify() { if (peer != null) peer = getToolkit().createMenuItem(this); }
public void deleteShortcut() {
deleteShortcut() {
public void deleteShortcut() { shortcut = null; }
public void disable() { setEnabled(false); }
disable() { if (!enabled) return; this.enabled = false; if (peer != null) ((MenuItemPeer) peer).setEnabled (false); }
public void disable() { setEnabled(false); }
protected final void disableEvents(long events) {
disableEvents(long events) {
protected final void disableEvents(long events) { eventMask &= ~events; }
void dispatchEventImpl(AWTEvent e) { if (e.id <= ActionEvent.ACTION_LAST && e.id >= ActionEvent.ACTION_FIRST && (action_listeners != null || (eventMask & AWTEvent.ACTION_EVENT_MASK) != 0))
dispatchEventImpl(AWTEvent e) { if (e.id <= ActionEvent.ACTION_LAST && e.id >= ActionEvent.ACTION_FIRST && (action_listeners != null || (eventMask & AWTEvent.ACTION_EVENT_MASK) != 0))
void dispatchEventImpl(AWTEvent e) { if (e.id <= ActionEvent.ACTION_LAST && e.id >= ActionEvent.ACTION_FIRST && (action_listeners != null || (eventMask & AWTEvent.ACTION_EVENT_MASK) != 0)) processEvent(e); }
}
if (!e.isConsumed ()) ((Menu) getParent ()).processEvent (e); }
void dispatchEventImpl(AWTEvent e) { if (e.id <= ActionEvent.ACTION_LAST && e.id >= ActionEvent.ACTION_FIRST && (action_listeners != null || (eventMask & AWTEvent.ACTION_EVENT_MASK) != 0)) processEvent(e); }
public void enable(boolean enabled) { setEnabled(enabled); }
enable(boolean enabled) { if (enabled) enable (); else disable (); }
public void enable(boolean enabled) { setEnabled(enabled); }
protected final void enableEvents(long events) {
enableEvents(long events) {
protected final void enableEvents(long events) { eventMask |= events; // TODO: see comment in Component.enableEvents(). }
public String getActionCommand() { return (actionCommand); }
getActionCommand() { if (actionCommand == null) return label; else return actionCommand; }
public String getActionCommand() { return (actionCommand); }
public MenuShortcut getShortcut() { return (shortcut); }
getShortcut() { return(shortcut); }
public MenuShortcut getShortcut() { return (shortcut); }
public boolean isEnabled() { return (enabled); }
isEnabled() { return(enabled); }
public boolean isEnabled() { return (enabled); }
public String paramString() { return ("label=" + label + ",enabled=" + enabled + ",actionCommand=" + actionCommand + "," + super.paramString()); }
paramString() { return ("label=" + label + ",enabled=" + enabled + ",actionCommand=" + actionCommand + "," + super.paramString()); }
public String paramString() { return ("label=" + label + ",enabled=" + enabled + ",actionCommand=" + actionCommand + "," + super.paramString()); }
protected void processEvent(AWTEvent event) {
processEvent(AWTEvent event) {
protected void processEvent(AWTEvent event) { if (event instanceof ActionEvent) processActionEvent((ActionEvent) event); }
public synchronized void removeActionListener(ActionListener l) {
removeActionListener(ActionListener l) {
public synchronized void removeActionListener(ActionListener l) { action_listeners = AWTEventMulticaster.remove(action_listeners, l); }
public void setActionCommand(String actionCommand) {
setActionCommand(String actionCommand) {
public void setActionCommand(String actionCommand) { this.actionCommand = actionCommand; }
public synchronized void setEnabled(boolean enabled) { if (enabled == this.enabled) return; this.enabled = enabled; if (peer != null) { MenuItemPeer mp = (MenuItemPeer) peer; mp.setEnabled(enabled); } }
setEnabled(boolean enabled) { enable (enabled); }
public synchronized void setEnabled(boolean enabled) { if (enabled == this.enabled) return; this.enabled = enabled; if (peer != null) { MenuItemPeer mp = (MenuItemPeer) peer; mp.setEnabled(enabled); } }
public synchronized void setLabel(String label) {
setLabel(String label) {
public synchronized void setLabel(String label) { this.label = label; if (peer != null) { MenuItemPeer mp = (MenuItemPeer) peer; mp.setLabel(label); } }
mp.setLabel(label); }
mp.setLabel (label);
public synchronized void setLabel(String label) { this.label = label; if (peer != null) { MenuItemPeer mp = (MenuItemPeer) peer; mp.setLabel(label); } }
}
public synchronized void setLabel(String label) { this.label = label; if (peer != null) { MenuItemPeer mp = (MenuItemPeer) peer; mp.setLabel(label); } }
public void setShortcut(MenuShortcut shortcut) {
setShortcut(MenuShortcut shortcut) {
public void setShortcut(MenuShortcut shortcut) { this.shortcut = shortcut; }