rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
for (int i = 0; i < selector.length; i++) { CSSStyle style = (CSSStyle) css.get(selector[i]); if (style == null) { style = new CSSStyle(); css.put(selector[i], style); }
public void declaration(String property, String value) { for (int i = 0; i < selector.length; i++) { CSSStyle style = (CSSStyle) css.get(selector[i]); if (style == null) { style = new CSSStyle(); css.put(selector[i], style); } ...
selector = null;
for (int i = 0; i < styles.length; i++) css.add(styles[i]); styles = null;
public void endStatement() { selector = null; }
public void startStatement(String sel)
public void startStatement(Selector[] sel)
public void startStatement(String sel) { StringTokenizer tokens = new StringTokenizer(sel); selector = new String[tokens.countTokens()]; for (int index = 0; tokens.hasMoreTokens(); index++) selector[index] = tokens.nextToken(); }
StringTokenizer tokens = new StringTokenizer(sel); selector = new String[tokens.countTokens()]; for (int index = 0; tokens.hasMoreTokens(); index++) selector[index] = tokens.nextToken();
styles = new CSSStyle[sel.length]; for (int i = 0; i < sel.length; i++) styles[i] = new CSSStyle(precedence, sel[i]);
public void startStatement(String sel) { StringTokenizer tokens = new StringTokenizer(sel); selector = new String[tokens.countTokens()]; for (int index = 0; tokens.hasMoreTokens(); index++) selector[index] = tokens.nextToken(); }
ListPainter(AttributeSet as)
ListPainter(AttributeSet as, StyleSheet ss)
ListPainter(AttributeSet as) { this.as = as; }
this.as = as;
attributes = as; styleSheet = ss; type = (String) as.getAttribute(CSS.Attribute.LIST_STYLE_TYPE);
ListPainter(AttributeSet as) { this.as = as; }
View itemView = v.getView(item); AttributeSet viewAtts = itemView.getAttributes(); Object tag = viewAtts.getAttribute(StyleConstants.NameAttribute); if (tag != null && tag == HTML.Tag.LI) { g.setColor(Color.BLACK); int centerX = (int) (x - 12); int centerY = -1; tmpRect.setBounds((int) x, (int) y, (int) w, (int) h)...
public void paint(Graphics g, float x, float y, float w, float h, View v, int item) { // FIXME: Not implemented. }
CSS.addInternal(attr, key, value);
public void addCSSAttribute(MutableAttributeSet attr, CSS.Attribute key, String value) { Object val = CSS.getValue(key, value); attr.addAttribute(key, val); }
throws NotImplementedException
public void addRule(String rule) throws NotImplementedException { // FIXME: Implement. }
CSSStyleSheetParserCallback cb = new CSSStyleSheetParserCallback(CSSStyle.PREC_AUTHOR_NORMAL); StringReader in = new StringReader(rule); CSSParser parser = new CSSParser(in, cb); try { parser.parse(); } catch (IOException ex) { } resolvedStyles.clear();
public void addRule(String rule) throws NotImplementedException { // FIXME: Implement. }
if (styleSheet == null) styleSheet = new StyleSheet[] {ss}; else System.arraycopy(new StyleSheet[] {ss}, 0, styleSheet, styleSheet.length, 1);
if (linked == null) linked = new ArrayList(); linked.add(ss);
public void addStyleSheet(StyleSheet ss) { if (styleSheet == null) styleSheet = new StyleSheet[] {ss}; else System.arraycopy(new StyleSheet[] {ss}, 0, styleSheet, styleSheet.length, 1); }
return new BoxPainter(a);
return new BoxPainter(a, this);
public BoxPainter getBoxPainter(AttributeSet a) { return new BoxPainter(a); }
FontSize size = (FontSize) a.getAttribute(CSS.Attribute.FONT_SIZE); int realSize = 12; if (size != null) realSize = size.getValue();
int realSize = getFontSize(a);
public Font getFont(AttributeSet a) { FontSize size = (FontSize) a.getAttribute(CSS.Attribute.FONT_SIZE); int realSize = 12; if (size != null) realSize = size.getValue(); // Decrement size for subscript and superscript. Object valign = a.getAttribute(CSS.Attribute.VERTICAL_ALIGN); if (valign !...
return new ListPainter(a);
return new ListPainter(a, this);
public ListPainter getListPainter(AttributeSet a) { return new ListPainter(a); }
else if (atts.isDefined(HTML.Attribute.CLASS))
if (atts.isDefined(HTML.Attribute.CLASS))
public Style getRule(HTML.Tag t, Element e) { // Create list of the element and all of its parents, starting // with the bottommost element. ArrayList path = new ArrayList(); Element el; AttributeSet atts; for (el = e; el != null; el = el.getParentElement()) path.add(el); // Create fully qu...
if (atts.isDefined(HTML.Attribute.DYNAMIC_CLASS)) { selector.append(':'); selector.append(atts.getAttribute(HTML.Attribute.DYNAMIC_CLASS)); } if (atts.isDefined(HTML.Attribute.PSEUDO_CLASS)) { selector.append(':'); selector.append(atts.getAttribute(HTML.Attribute.PSEUDO_CLASS)); }
public Style getRule(HTML.Tag t, Element e) { // Create list of the element and all of its parents, starting // with the bottommost element. ArrayList path = new ArrayList(); Element el; AttributeSet atts; for (el = e; el != null; el = el.getParentElement()) path.add(el); // Create fully qu...
return styleSheet;
StyleSheet[] linkedSS; if (linked != null) { linkedSS = new StyleSheet[linked.size()]; linkedSS = (StyleSheet[]) linked.toArray(linkedSS); } else { linkedSS = null; } return linkedSS;
public StyleSheet[] getStyleSheets() { return styleSheet; }
try { InputStream in = url.openStream(); Reader r = new BufferedReader(new InputStreamReader(in)); CSSStyleSheetParserCallback cb = new CSSStyleSheetParserCallback(CSSStyle.PREC_AUTHOR_NORMAL); CSSParser parser = new CSSParser(r, cb); parser.parse(); } catch (IOException ex) { }
public void importStyleSheet(URL url) { // FIXME: Not implemented }
CSSStyleSheetParserCallback cb = new CSSStyleSheetParserCallback();
CSSStyleSheetParserCallback cb = new CSSStyleSheetParserCallback(CSSStyle.PREC_UA);
public void loadRules(Reader in, URL ref) throws IOException { CSSStyleSheetParserCallback cb = new CSSStyleSheetParserCallback(); // FIXME: Handle ref. CSSParser parser = new CSSParser(in, cb); parser.parse(); }
if (styleSheet.length == 1 && styleSheet[0].equals(ss)) styleSheet = null; else
if (linked != null)
public void removeStyleSheet(StyleSheet ss) { if (styleSheet.length == 1 && styleSheet[0].equals(ss)) styleSheet = null; else { for (int i = 0; i < styleSheet.length; i++) { StyleSheet curr = styleSheet[i]; if (curr.equals(ss)) { Style...
for (int i = 0; i < styleSheet.length; i++) { StyleSheet curr = styleSheet[i]; if (curr.equals(ss)) { StyleSheet[] tmp = new StyleSheet[styleSheet.length - 1]; if (i != 0 && i != (styleSheet.length - 1)) { System.arraycopy(styleSheet, 0, tmp, 0, i); System.arraycopy(styleSheet, i + 1, tmp, i, styleSheet.length - i - 1)...
linked.remove(ss);
public void removeStyleSheet(StyleSheet ss) { if (styleSheet.length == 1 && styleSheet[0].equals(ss)) styleSheet = null; else { for (int i = 0; i < styleSheet.length; i++) { StyleSheet curr = styleSheet[i]; if (curr.equals(ss)) { Style...
String[] ids = new String[count]; String[] classes = new String[count];
Map[] attributes = new Map[count];
private Style resolveStyle(String selector, List path, HTML.Tag tag) { int count = path.size(); String[] tags = new String[count]; String[] ids = new String[count]; String[] classes = new String[count]; for (int i = 0; i < count; i++) { Element el = (Element) path.get(i); AttributeS...
if (atts.isDefined(HTML.Attribute.CLASS)) classes[i] = atts.getAttribute(HTML.Attribute.CLASS).toString(); else classes[i] = null; if (atts.isDefined(HTML.Attribute.ID)) ids[i] = atts.getAttribute(HTML.Attribute.ID).toString(); else ids[i] = null;
attributes[i] = attributeSetToMap(atts);
private Style resolveStyle(String selector, List path, HTML.Tag tag) { int count = path.size(); String[] tags = new String[count]; String[] ids = new String[count]; String[] classes = new String[count]; for (int i = 0; i < count; i++) { Element el = (Element) path.get(i); AttributeS...
classes[i] = null; ids[i] = null;
attributes[i] = null;
private Style resolveStyle(String selector, List path, HTML.Tag tag) { int count = path.size(); String[] tags = new String[count]; String[] ids = new String[count]; String[] classes = new String[count]; for (int i = 0; i < count; i++) { Element el = (Element) path.get(i); AttributeS...
return resolveStyle(selector, tags, ids, classes);
return resolveStyle(selector, tags, attributes);
private Style resolveStyle(String selector, List path, HTML.Tag tag) { int count = path.size(); String[] tags = new String[count]; String[] ids = new String[count]; String[] classes = new String[count]; for (int i = 0; i < count; i++) { Element el = (Element) path.get(i); AttributeS...
MutableAttributeSet cssStyle = addStyle(null, null); cssStyle.addAttributes(cssAttr); return cssStyle;
Object o = htmlAttrSet.getAttribute(HTML.Attribute.ALIGN); if (o != null) cssAttr = addAttribute(cssAttr, CSS.Attribute.TEXT_ALIGN, o); o = htmlAttrSet.getAttribute(HTML.Attribute.WIDTH); if (o != null) cssAttr = addAttribute(cssAttr, CSS.Attribute.WIDTH, new Length(o.toString())); o = htmlAttrSet.getAttribute(HTML...
public AttributeSet translateHTMLToCSS(AttributeSet htmlAttrSet) { // FIXME: Really convert HTML to CSS here. AttributeSet cssAttr = htmlAttrSet.copyAttributes(); MutableAttributeSet cssStyle = addStyle(null, null); cssStyle.addAttributes(cssAttr); return cssStyle; }
else if (att == Attribute.MARGIN || att == Attribute.MARGIN_BOTTOM || att == Attribute.MARGIN_LEFT || att == Attribute.MARGIN_RIGHT || att == Attribute.MARGIN_TOP) o = new Length(v);
static Object getValue(Attribute att, String v) { Object o; if (att == Attribute.FONT_SIZE) o = new FontSize(v); else if (att == Attribute.FONT_WEIGHT) o = new FontWeight(v); else if (att == Attribute.FONT_STYLE) o = new FontStyle(v); else if (att == Attribute.COLOR || att == Attribute....
public int getValue()
public int getValue(int p)
public int getValue() { int intVal; if (value.contains("pt")) intVal = mapPoints(); else if (value.contains("px")) intVal = mapPixels(); else intVal = mapAbsolute(); // FIXME: Allow relative font values, ('larger' and 'smaller'). This // requires knowledge about the parent element's ...
int intVal; if (value.contains("pt")) intVal = mapPoints(); else if (value.contains("px")) intVal = mapPixels(); else intVal = mapAbsolute(); return intVal;
if (isRelative) mapRelative(p); return size;
public int getValue() { int intVal; if (value.contains("pt")) intVal = mapPoints(); else if (value.contains("px")) intVal = mapPixels(); else intVal = mapAbsolute(); // FIXME: Allow relative font values, ('larger' and 'smaller'). This // requires knowledge about the parent element's ...
public final Class getCategory()
public Class getCategory()
public final Class getCategory() { return DateTimeAtProcessing.class; }
public final String getName()
public String getName()
public final String getName() { return "date-time-at-processing"; }
if (Configuration.DEBUG)
Parser getParser() { log.entering(this.getClass().getName(), "getParser"); //$NON-NLS-1$ Parser result = new ClasspathToolParser(Main.IDENTITYDB_CMD, true); result.setHeader(Messages.getString("IdentityDBCmd.7")); //$NON-NLS-1$ result.setFooter(Messages.getString("IdentityDBCmd.8")); //$NON-NLS-1$ Opt...
setKeyStoreParams(_providerClassName, _ksType, _ksPassword, _ksURL); log.finer("-identitydb handler will use the following options:"); log.finer(" -file=" + _idbFileName); log.finer(" -storetype=" + storeType); log.finer(" -keystore=" + storeURL); log.finer(" -provider=" + provider); log.finer(" -v=" + verbose);
setKeyStoreParams(true, _providerClassName, _ksType, _ksPassword, _ksURL); if (Configuration.DEBUG) { log.fine("-identitydb handler will use the following options:"); log.fine(" -file=" + _idbFileName); log.fine(" -storetype=" + storeType); log.fine(" -keystore=" + storeURL); log.fine(" -provider=" + provider); log...
void setup() throws Exception { setInputStreamParam(_idbFileName); setKeyStoreParams(_providerClassName, _ksType, _ksPassword, _ksURL); log.finer("-identitydb handler will use the following options:"); //$NON-NLS-1$ log.finer(" -file=" + _idbFileName); //$NON-NLS-1$ log.finer(" -storetype=" + storeT...
setRolloverBorders(toolBar.isRollover());
protected void installDefaults() { LookAndFeel.installBorder(toolBar, "ToolBar.border"); LookAndFeel.installColorsAndFont(toolBar, "ToolBar.background", "ToolBar.foreground", "ToolBar.font"); dockingBorderColor = UIManager.getColor("ToolBar.dockingForeground"); docking...
public final CharBuffer decode (ByteBuffer bb)
public final synchronized CharBuffer decode (ByteBuffer bb)
public final CharBuffer decode (ByteBuffer bb) { try { // NB: This implementation serializes different threads calling // Charset.decode(), a potential performance problem. It might // be better to remove the cache, or use ThreadLocal to cache on // a per-thread basis. syn...
{ synchronized (Charset.class)
public final CharBuffer decode (ByteBuffer bb) { try { // NB: This implementation serializes different threads calling // Charset.decode(), a potential performance problem. It might // be better to remove the cache, or use ThreadLocal to cache on // a per-thread basis. syn...
}
public final CharBuffer decode (ByteBuffer bb) { try { // NB: This implementation serializes different threads calling // Charset.decode(), a potential performance problem. It might // be better to remove the cache, or use ThreadLocal to cache on // a per-thread basis. syn...
public final ByteBuffer encode (CharBuffer cb)
public final synchronized ByteBuffer encode (CharBuffer cb)
public final ByteBuffer encode (CharBuffer cb) { try { // NB: This implementation serializes different threads calling // Charset.encode(), a potential performance problem. It might // be better to remove the cache, or use ThreadLocal to cache on // a per-thread basis. syn...
{ synchronized (Charset.class)
public final ByteBuffer encode (CharBuffer cb) { try { // NB: This implementation serializes different threads calling // Charset.encode(), a potential performance problem. It might // be better to remove the cache, or use ThreadLocal to cache on // a per-thread basis. syn...
}
public final ByteBuffer encode (CharBuffer cb) { try { // NB: This implementation serializes different threads calling // Charset.encode(), a potential performance problem. It might // be better to remove the cache, or use ThreadLocal to cache on // a per-thread basis. syn...
focusColor = UIManager.getColor(prefix + "focus");
protected void installDefaults(AbstractButton b) { String prefix = getPropertyPrefix(); LookAndFeel.installColorsAndFont(b, prefix + "background", prefix + "foreground", prefix + "font"); LookAndFeel.installBorder(b, prefix + "border"); focusColor = UIManager.getColor(...
if (b.isContentAreaFilled())
if (b.isContentAreaFilled() && b.isOpaque())
protected void paintButtonPressed(Graphics g, AbstractButton b) { if (b.isContentAreaFilled()) { Rectangle area = new Rectangle(); SwingUtilities.calculateInnerArea(b, area); g.setColor(b.getBackground().darker()); g.fillRect(area.x, area.y, area.width, area.height); } }
g.setColor(b.getBackground().darker());
g.setColor(UIManager.getColor(getPropertyPrefix() + "shadow"));
protected void paintButtonPressed(Graphics g, AbstractButton b) { if (b.isContentAreaFilled()) { Rectangle area = new Rectangle(); SwingUtilities.calculateInnerArea(b, area); g.setColor(b.getBackground().darker()); g.fillRect(area.x, area.y, area.width, area.height); } }
int divLoc = splitPane.getDividerLocation(); int valLoc = validLocation(divLoc); if (divLoc != valLoc) splitPane.setDividerLocation(valLoc);
public void paint(Graphics g, JComponent jc) { // Do nothing. All the painting is handled by children. }
throws BadKind, Bounds;
throws BadKind, org.omg.CORBA.TypeCodePackage.Bounds;
public abstract short member_visibility(int index) throws BadKind, Bounds;
throw new REException("Unicode block is not supported yet", REException.REG_ESCAPE, 0);
try { name = name.substring(2); Character.UnicodeBlock block = Character.UnicodeBlock.forName(name); return new UnicodeBlockHandler(block); } catch (IllegalArgumentException e) { throw new REException("Invalid Unicode block name: " + name, REException.REG_ESCAPE, 0); }
private Handler getHandler(String name) throws REException { if (name.equals("Lower") || name.equals("Upper") || // name.equals("ASCII") || name.equals("Alpha") || name.equals("Digit") || name.equals("Alnum") || name.equals("Punct") || name.equals("G...
if (Configuration.DEBUG)
Parser getParser() { log.entering(this.getClass().getName(), "getParser"); //$NON-NLS-1$ Parser result = new ClasspathToolParser(Main.CERTREQ_CMD, true); result.setHeader(Messages.getString("CertReqCmd.25")); //$NON-NLS-1$ result.setFooter(Messages.getString("CertReqCmd.24")); //$NON-NLS-1$ OptionGrou...
log.finer("-certreq handler will use the following options:"); log.finer(" -alias=" + alias); log.finer(" -sigalg=" + _sigAlgorithm); log.finer(" -file=" + _certReqFileName); log.finer(" -storetype=" + storeType); log.finer(" -keystore=" + storeURL); log.finer(" -provider=" + provider); log.finer(" -v=" + verbos...
if (Configuration.DEBUG) { log.fine("-certreq handler will use the following options:"); log.fine(" -alias=" + alias); log.fine(" -sigalg=" + _sigAlgorithm); log.fine(" -file=" + _certReqFileName); log.fine(" -storetype=" + storeType); log.fine(" -keystore=" + storeURL); log.fine(" -provider=" + provider); log.fi...
void setup() throws Exception { setOutputStreamParam(_certReqFileName); setKeyStoreParams(_providerClassName, _ksType, _ksPassword, _ksURL); setAliasParam(_alias); setKeyPasswordNoPrompt(_password); log.finer("-certreq handler will use the following options:"); //$NON-NLS-1$ log.finer(" -alias=" +...
if (Configuration.DEBUG)
void start() throws KeyStoreException, NoSuchAlgorithmException, IOException, UnsupportedCallbackException, UnrecoverableKeyException, InvalidKeyException, SignatureException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. get the key entry and certificate chain associated to ...
if (Configuration.DEBUG)
Parser getParser() { log.entering(this.getClass().getName(), "getParser"); //$NON-NLS-1$ Parser result = new ClasspathToolParser(Main.STOREPASSWD_CMD, true); result.setHeader(Messages.getString("StorePasswdCmd.18")); //$NON-NLS-1$ result.setFooter(Messages.getString("StorePasswdCmd.17")); //$NON-NLS-1$ ...
log.finer("-storepasswd handler will use the following options:"); log.finer(" -storetype=" + storeType); log.finer(" -keystore=" + storeURL); log.finer(" -provider=" + provider); log.finer(" -v=" + verbose);
if (Configuration.DEBUG) { log.fine("-storepasswd handler will use the following options:"); log.fine(" -storetype=" + storeType); log.fine(" -keystore=" + storeURL); log.fine(" -provider=" + provider); log.fine(" -v=" + verbose); }
void setup() throws Exception { setKeyStoreParams(_providerClassName, _ksType, _ksPassword, _ksURL); setNewKeystorePassword(_newPassword); log.finer("-storepasswd handler will use the following options:"); //$NON-NLS-1$ log.finer(" -storetype=" + storeType); //$NON-NLS-1$ log.finer(" -keystore=" + s...
if (Configuration.DEBUG)
void start() throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ saveKeyStore(newStorePasswordChars); log.exiting(getClass().getName(), "start"); //$NON-NLS-1$ }
Iterator<Map.Entry<K, V>> itr = new HashIterator<Map.Entry<K, V>>(ENTRIES);
Iterator<Map.Entry<K, V>> itr = new EntryIterator();
public synchronized int hashCode() { // Since we are already synchronized, and entrySet().iterator() // would repeatedly re-lock/release the monitor, we directly use the // unsynchronized HashIterator instead. Iterator<Map.Entry<K, V>> itr = new HashIterator<Map.Entry<K, V>>(ENTRIES); int hashcode = 0...
Iterator<Map.Entry<? extends K, ? extends V>> entries = new HashIterator<Map.Entry<? extends K, ? extends V>>(ENTRIES);
Iterator<Map.Entry<K, V>> entries = new EntryIterator();
public synchronized String toString() { // Since we are already synchronized, and entrySet().iterator() // would repeatedly re-lock/release the monitor, we directly use the // unsynchronized HashIterator instead. Iterator<Map.Entry<? extends K, ? extends V>> entries = new HashIterator<Map.Entry<? ex...
queue.notify();
public static void dispatch(Runnable runner) { synchronized (queue) { queue.add(runner); } }
wait();
queue.wait();
public void run() { while (true) { Runnable r; synchronized (queue) { while (queue.size() == 0) { try { wait(); } catch (InterruptedException _) { ...
private int checkRule(int month, int day, int dayOfWeek)
private int checkRule(int month)
private int checkRule(int month, int day, int dayOfWeek) { if (month < 0 || month > 11) throw new IllegalArgumentException("month out of range"); int daysInMonth = getDaysInMonth(month, 1); if (dayOfWeek == 0) { if (day <= 0 || day > daysInMonth) throw new IllegalArgumentException("day out of ra...
if (month < 0 || month > 11)
if (startDay != 0) { if (startMonth < 0 || startMonth > 11)
private int checkRule(int month, int day, int dayOfWeek) { if (month < 0 || month > 11) throw new IllegalArgumentException("month out of range"); int daysInMonth = getDaysInMonth(month, 1); if (dayOfWeek == 0) { if (day <= 0 || day > daysInMonth) throw new IllegalArgumentException("day out of ra...
int daysInMonth = getDaysInMonth(month, 1); if (dayOfWeek == 0)
if (startDayOfWeek == 0) startMode = DOM_MODE; else
private int checkRule(int month, int day, int dayOfWeek) { if (month < 0 || month > 11) throw new IllegalArgumentException("month out of range"); int daysInMonth = getDaysInMonth(month, 1); if (dayOfWeek == 0) { if (day <= 0 || day > daysInMonth) throw new IllegalArgumentException("day out of ra...
if (day <= 0 || day > daysInMonth) throw new IllegalArgumentException("day out of range"); return DOM_MODE; } else if (dayOfWeek > 0)
if (startDayOfWeek > 0) startMode = DOW_IN_MONTH_MODE; else
private int checkRule(int month, int day, int dayOfWeek) { if (month < 0 || month > 11) throw new IllegalArgumentException("month out of range"); int daysInMonth = getDaysInMonth(month, 1); if (dayOfWeek == 0) { if (day <= 0 || day > daysInMonth) throw new IllegalArgumentException("day out of ra...
if (Math.abs(day) > (daysInMonth + 6) / 7) throw new IllegalArgumentException("dayOfWeekInMonth out of range"); if (dayOfWeek > Calendar.SATURDAY) throw new IllegalArgumentException("dayOfWeek out of range"); return DOW_IN_MONTH_MODE;
startDayOfWeek = -startDayOfWeek; if (startDay < 0) { startDay = - startDay; startMode = DOW_LE_DOM_MODE;
private int checkRule(int month, int day, int dayOfWeek) { if (month < 0 || month > 11) throw new IllegalArgumentException("month out of range"); int daysInMonth = getDaysInMonth(month, 1); if (dayOfWeek == 0) { if (day <= 0 || day > daysInMonth) throw new IllegalArgumentException("day out of ra...
{ if (day == 0 || Math.abs(day) > daysInMonth)
startMode = DOW_GE_DOM_MODE; } if (startDayOfWeek > Calendar.SATURDAY) throw new IllegalArgumentException("day of week out of range"); } if (startMode != DOW_IN_MONTH_MODE && (startDay <= 0 || startDay > getDaysInMonth(month, 1)))
private int checkRule(int month, int day, int dayOfWeek) { if (month < 0 || month > 11) throw new IllegalArgumentException("month out of range"); int daysInMonth = getDaysInMonth(month, 1); if (dayOfWeek == 0) { if (day <= 0 || day > daysInMonth) throw new IllegalArgumentException("day out of ra...
if (dayOfWeek < -Calendar.SATURDAY) throw new IllegalArgumentException("dayOfWeek out of range"); if (day < 0) return DOW_LE_DOM_MODE; else return DOW_GE_DOM_MODE;
private int checkRule(int month, int day, int dayOfWeek) { if (month < 0 || month > 11) throw new IllegalArgumentException("month out of range"); int daysInMonth = getDaysInMonth(month, 1); if (dayOfWeek == 0) { if (day <= 0 || day > daysInMonth) throw new IllegalArgumentException("day out of ra...
return startMode;
private int checkRule(int month, int day, int dayOfWeek) { if (month < 0 || month > 11) throw new IllegalArgumentException("month out of range"); int daysInMonth = getDaysInMonth(month, 1); if (dayOfWeek == 0) { if (day <= 0 || day > daysInMonth) throw new IllegalArgumentException("day out of ra...
this.endMode = checkRule(month, day, dayOfWeek);
public void setEndRule(int month, int day, int dayOfWeek, int time) { this.endMode = checkRule(month, day, dayOfWeek); this.endMonth = month; this.endDay = day; this.endDayOfWeek = Math.abs(dayOfWeek); if (this.endTimeMode == WALL_TIME) this.endTime = time; else if (this.endTimeMode == STANDARD_...
this.endMode = checkRule(month);
public void setEndRule(int month, int day, int dayOfWeek, int time) { this.endMode = checkRule(month, day, dayOfWeek); this.endMonth = month; this.endDay = day; this.endDayOfWeek = Math.abs(dayOfWeek); if (this.endTimeMode == WALL_TIME) this.endTime = time; else if (this.endTimeMode == STANDARD_...
this.startMode = checkRule(month, day, dayOfWeek);
public void setStartRule(int month, int day, int dayOfWeek, int time) { this.startMode = checkRule(month, day, dayOfWeek); this.startMonth = month; this.startDay = day; this.startDayOfWeek = Math.abs(dayOfWeek); if (this.startTimeMode == WALL_TIME || this.startTimeMode == STANDARD_TIME) this.star...
this.startMode = checkRule(month);
public void setStartRule(int month, int day, int dayOfWeek, int time) { this.startMode = checkRule(month, day, dayOfWeek); this.startMonth = month; this.startDay = day; this.startDayOfWeek = Math.abs(dayOfWeek); if (this.startTimeMode == WALL_TIME || this.startTimeMode == STANDARD_TIME) this.star...
if ((e.getModifiersEx() & InputEvent.BUTTON1_DOWN_MASK) != 0)
if (e.getButton() == MouseEvent.BUTTON1)
public void mousePressed(MouseEvent e) { if (e.getSource() instanceof AbstractButton) { AbstractButton button = (AbstractButton) e.getSource(); ButtonModel model = button.getModel(); if ((e.getModifiersEx() & InputEvent.BUTTON1_DOWN_MASK) != 0) { // It is important th...
if ((e.getModifiersEx() & InputEvent.BUTTON1_DOWN_MASK) != 0)
if (e.getButton() == MouseEvent.BUTTON1)
public void mouseReleased(MouseEvent e) { if (e.getSource() instanceof AbstractButton) { AbstractButton button = (AbstractButton) e.getSource(); ButtonModel model = button.getModel(); if ((e.getModifiersEx() & InputEvent.BUTTON1_DOWN_MASK) != 0) { // It is important t...
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); checkIcon = UIManager.getIcon("CheckBoxMenuItem.checkIcon");
public BasicCheckBoxMenuItemUI() { super(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); checkIcon = UIManager.getIcon("CheckBoxMenuItem.checkIcon"); }
public static void main(String[] args) {
public static void main(String[] args) throws IOException {
public static void main(String[] args) { IFoo origFoo = new FooImpl(); IFoo proxy = (IFoo) Proxy.newProxyInstance(ProxyTest.class.getClassLoader(), new Class[] { IFoo.class }, new Handler<IFoo>(origFoo)); proxy.foo(); }
IFoo proxy = (IFoo) Proxy.newProxyInstance(ProxyTest.class.getClassLoader(),
final ClassLoader loader = ProxyTest.class.getClassLoader(); IFoo proxy = (IFoo) Proxy.newProxyInstance(loader,
public static void main(String[] args) { IFoo origFoo = new FooImpl(); IFoo proxy = (IFoo) Proxy.newProxyInstance(ProxyTest.class.getClassLoader(), new Class[] { IFoo.class }, new Handler<IFoo>(origFoo)); proxy.foo(); }
if (true) { byte[] classData = ProxyBuilder.getProxyClass(loader, new Class[] { IFoo.class }); FileOutputStream os = new FileOutputStream("$Proxy0.class"); os.write(classData); os.close(); }
public static void main(String[] args) { IFoo origFoo = new FooImpl(); IFoo proxy = (IFoo) Proxy.newProxyInstance(ProxyTest.class.getClassLoader(), new Class[] { IFoo.class }, new Handler<IFoo>(origFoo)); proxy.foo(); }
protected AccessibleJProgressBar(JProgressBar component)
protected AccessibleJProgressBar()
protected AccessibleJProgressBar(JProgressBar component) { super(component); }
super(component);
protected AccessibleJProgressBar(JProgressBar component) { super(component); }
accessibleContext = new AccessibleJProgressBar(this);
accessibleContext = new AccessibleJProgressBar();
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJProgressBar(this); return accessibleContext; }
helper.atomicChangeObjectColor(object, gcColor, GC_WHITE);
if (gcColor != GC_YELLOW) { helper.atomicChangeObjectColor(object, gcColor, GC_WHITE); }
public boolean visit(Object object) { final int gcColor = helper.getObjectColor(object); helper.atomicChangeObjectColor(object, gcColor, GC_WHITE); return true; }
"ScrollBar.width", new Integer(17),
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", get...
JComboBox cb = (JComboBox) parent; if (!cb.isEditable()) { Rectangle bounds = parent.getBounds(); arrowButton.setBounds(0, 0, bounds.width, bounds.height); } else superLayout(parent);
layoutComboBox(parent, this);
public void layoutContainer(Container parent) { JComboBox cb = (JComboBox) parent; if (!cb.isEditable()) { Rectangle bounds = parent.getBounds(); arrowButton.setBounds(0, 0, bounds.width, bounds.height); } else superLayout(parent); }
if (e.getPropertyName().equals("editable"))
super.propertyChange(e); String name = e.getPropertyName(); if (name.equals("editable"))
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("editable")) editablePropertyChanged(e); super.propertyChange(e); }
super.propertyChange(e);
if (name.equals("enabled")) { if (arrowButton instanceof MetalComboBoxButton) { arrowButton.setFocusable(!comboBox.isEditable() && comboBox.isEnabled()); comboBox.repaint(); } }
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("editable")) editablePropertyChanged(e); super.propertyChange(e); }
ComboBoxEditor cbe = comboBox.getEditor(); if (cbe != null) { cbe.getEditorComponent().setFont(comboBox.getFont()); cbe.setItem(comboBox.getSelectedItem()); cbe.addActionListener(comboBox); }
super.configureEditor(); if (popupKeyListener != null) editor.removeKeyListener(popupKeyListener); if (focusListener != null) editor.addFocusListener(focusListener);
public void configureEditor() { ComboBoxEditor cbe = comboBox.getEditor(); if (cbe != null) { cbe.getEditorComponent().setFont(comboBox.getFont()); cbe.setItem(comboBox.getSelectedItem()); cbe.addActionListener(comboBox); } }
} if (comboBox.isEditable()) { arrowButton.setText(null); if (editor != null) editor.setVisible(true); } else { String text = ""; Object selected = comboBox.getSelectedItem(); if (selected != null) text = selected.toString(); arrowButton.setText(text); if (editor != null) editor.setVisible(true);
b.setFocusable(!comboBox.isEditable() && comboBox.isEnabled()); comboBox.repaint();
protected void editablePropertyChanged(PropertyChangeEvent e) { if (arrowButton instanceof MetalComboBoxButton) { MetalComboBoxButton b = (MetalComboBoxButton) arrowButton; b.setIconOnly(comboBox.isEditable()); } if (comboBox.isEditable()) { arrowButton.setText(null); ...
Dimension d = getDisplaySize();
if (!isMinimumSizeDirty) return new Dimension(cachedMinimumSize); Dimension d; if (!comboBox.isEditable() && arrowButton != null && arrowButton instanceof MetalComboBoxButton) {
public Dimension getMinimumSize(JComponent c) { Dimension d = getDisplaySize(); MetalComboBoxButton b = (MetalComboBoxButton) arrowButton; Insets insets = b.getInsets(); int insetsH = insets.top + insets.bottom; int insetsW = insets.left + insets.right; if (!comboBox.isEditable()) { Ico...
int insetsH = insets.top + insets.bottom; int insetsW = insets.left + insets.right; if (!comboBox.isEditable())
Insets arrowInsets = b.getInsets(); Insets comboInsets = comboBox.getInsets(); Icon icon = b.getComboIcon(); d.width += comboInsets.left + comboInsets.right; d.width += arrowInsets.left + arrowInsets.right; d.width += arrowInsets.right + icon.getIconWidth(); d.height += comboInsets.top + comboInsets.bottom; d.height +=...
public Dimension getMinimumSize(JComponent c) { Dimension d = getDisplaySize(); MetalComboBoxButton b = (MetalComboBoxButton) arrowButton; Insets insets = b.getInsets(); int insetsH = insets.top + insets.bottom; int insetsW = insets.left + insets.right; if (!comboBox.isEditable()) { Ico...
Icon icon = b.getComboIcon(); int iconWidth = icon.getIconWidth() + 6; return new Dimension(d.width + insetsW + iconWidth, d.height + insetsH);
d = super.getMinimumSize(c); Insets arrowMargin = arrowButton.getMargin(); Insets comboInsets = comboBox.getInsets(); if (editor instanceof JComponent) { Insets editorInsets = ((JComponent) editor).getInsets(); d.height += editorInsets.top + editorInsets.bottom; } d.height += arrowMargin.top + arrowMargin.bottom; d.hei...
public Dimension getMinimumSize(JComponent c) { Dimension d = getDisplaySize(); MetalComboBoxButton b = (MetalComboBoxButton) arrowButton; Insets insets = b.getInsets(); int insetsH = insets.top + insets.bottom; int insetsW = insets.left + insets.right; if (!comboBox.isEditable()) { Ico...
return new Dimension(d.width + insetsW + (d.height + insetsH) - 4, d.height + insetsH + 1);
{ d = super.getMinimumSize(c); } cachedMinimumSize.setSize(d.width, d.height); isMinimumSizeDirty = false; return new Dimension(cachedMinimumSize);
public Dimension getMinimumSize(JComponent c) { Dimension d = getDisplaySize(); MetalComboBoxButton b = (MetalComboBoxButton) arrowButton; Insets insets = b.getInsets(); int insetsH = insets.top + insets.bottom; int insetsW = insets.left + insets.right; if (!comboBox.isEditable()) { Ico...
manager.layoutContainer(parent);
if (comboBox.isEditable()) manager.superLayout(parent); else if (arrowButton != null) { Insets comboInsets = comboBox.getInsets(); int width = comboBox.getWidth(); int height = comboBox.getHeight(); arrowButton.setBounds(comboInsets.left, comboInsets.top, width - (comboInsets.left + comboInsets.right), height - (comboI...
public void layoutComboBox(Container parent, MetalComboBoxUI.MetalComboBoxLayoutManager manager) { manager.layoutContainer(parent); }
ComboBoxEditor cbe = comboBox.getEditor(); if (cbe != null) { cbe.getEditorComponent().setFont(null); cbe.setItem(null); cbe.removeActionListener(comboBox); }
super.unconfigureEditor(); if (focusListener != null) editor.removeFocusListener(focusListener);
public void unconfigureEditor() { ComboBoxEditor cbe = comboBox.getEditor(); if (cbe != null) { cbe.getEditorComponent().setFont(null); cbe.setItem(null); cbe.removeActionListener(comboBox); } }
return new BasicButtonListener();
return new BasicButtonListener(b);
protected BasicButtonListener createButtonListener(AbstractButton b) { return new BasicButtonListener(); }
return new Kernel(width, height, data);
try { return super.clone(); } catch (CloneNotSupportedException e) { throw (Error) new InternalError().initCause(e); }
public Object clone() { return new Kernel(width, height, data); }
current = (ret == null) ? current : ret;
public Node nextNode() throws DOMException { if (root == null) { throw new DOMException(DOMException.INVALID_STATE_ERR, "null root"); } Node ret; do { if (current.equals(root)) { ret = root.getFirstChild(); } else if (walk) { ...
BootLog.info("Adding permissions for " + cs);
private final void loadExtension(Extension ext) { final String id = ext.getDeclaringPluginDescriptor().getId(); final URL url; try { url = new URL("plugin:" + id + "!/"); final ClassLoader cl = ext.getDeclaringPluginDescriptor() .getPluginClassLoader(); ...
public XMLWriter (Writer writer, String encoding) { setWriter (writer, encoding); }
public XMLWriter () throws IOException { this (System.out); }
public XMLWriter (Writer writer, String encoding) { setWriter (writer, encoding); }
super("TODO");
super("font-bold");
public BoldAction() { super("TODO"); // TODO: Figure out correct name of this Action. }
super("TODO");
super("font-italic");
public ItalicAction() { super("TODO"); // TODO: Figure out correct name of this Action. }
super("TODO");
super("font-underline");
public UnderlineAction() { super("TODO"); // TODO: Figure out name for this action. }
public static Throwable read(cdrBufInput input, ServiceContext[] contexts)
public static Throwable read(BufferredCdrInput input, ServiceContext[] contexts)
public static Throwable read(cdrBufInput input, ServiceContext[] contexts) { input.mark(Integer.MAX_VALUE); int h = input.read_long(); if (h == 0) { // This block reads exception info in the Sun specific format. // (currently we read the exception name only). try { ...
if (name == null) name = super.getName();
public String getName() { Object tag = getAttribute(StyleConstants.NameAttribute); String name = null; if (tag != null) name = tag.toString(); return name; }