rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if (vsb != null)
if (vp != null && event.getSource() == vp)
ChangeListener createScrollListener() { return new ChangeListener() { public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); ...
BoundedRangeModel vmod = vsb.getModel(); if (vmod != null) ypos = vmod.getValue();
Rectangle vr = vp.getViewRect(); Dimension vs = vp.getViewSize(); if (vsb != null && (vsb.getMinimum() != 0 || vsb.getMaximum() != vs.height || vsb.getValue() != vr.y || vsb.getVisibleAmount() != vr.height)) { vsb.setValue(vr.y, vr.height, 0, vs.height); } if (hsb != null && (hsb.getMinimum() != 0 || hsb.getMaxi...
ChangeListener createScrollListener() { return new ChangeListener() { public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); ...
{ BoundedRangeModel hmod = hsb.getModel(); if (hmod != null) xpos = hmod.getValue();
xpos = hsb.getValue(); Point pt = new Point(xpos, ypos); if (vp != null && vp.getViewPosition() != pt) vp.setViewPosition(pt);
ChangeListener createScrollListener() { return new ChangeListener() { public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); ...
if (JScrollPane.this.viewport != null) JScrollPane.this.viewport.setViewPosition(new Point(xpos, ypos));
ChangeListener createScrollListener() { return new ChangeListener() { public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); ...
int xpos = 0; int ypos = 0;
public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); if (vsb != null) { BoundedRangeMod...
if (vsb != null)
if (vp != null && event.getSource() == vp)
public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); if (vsb != null) { BoundedRangeMod...
BoundedRangeModel vmod = vsb.getModel(); if (vmod != null) ypos = vmod.getValue();
Rectangle vr = vp.getViewRect(); Dimension vs = vp.getViewSize(); if (vsb != null && (vsb.getMinimum() != 0 || vsb.getMaximum() != vs.height || vsb.getValue() != vr.y || vsb.getVisibleAmount() != vr.height)) { vsb.setValue(vr.y, vr.height, 0, vs.height); } if (hsb != null && (hsb.getMinimum() != 0 || hsb.getMaxi...
public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); if (vsb != null) { BoundedRangeMod...
{ BoundedRangeModel hmod = hsb.getModel(); if (hmod != null) xpos = hmod.getValue();
xpos = hsb.getValue(); Point pt = new Point(xpos, ypos); if (vp != null && vp.getViewPosition() != pt) vp.setViewPosition(pt);
public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); if (vsb != null) { BoundedRangeMod...
if (JScrollPane.this.viewport != null) JScrollPane.this.viewport.setViewPosition(new Point(xpos, ypos));
public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); if (vsb != null) { BoundedRangeMod...
return new JScrollBar(SwingConstants.VERTICAL);
return new ScrollBar(SwingConstants.VERTICAL);
public JScrollBar createVerticalScrollBar() { return new JScrollBar(SwingConstants.VERTICAL); }
if (v != null) v.addChangeListener(scrollListener);
public void setViewport(JViewport v) { JViewport old = viewport; removeNonNull(old); viewport = v; addNonNull(v); revalidate(); repaint(); firePropertyChange(VIEWPORT_CHANGED_PROPERTY, old, v); sync(); }
public void setCoalescing(boolean value) { coalescing = value; }
public void setCoalescing(boolean coalescing) { this.coalescing = coalescing; }
public void setCoalescing(boolean value) { coalescing = value; } // setCoalescing()
public void setIgnoringComments(boolean value) { ignoreComments = value; }
public void setIgnoringComments(boolean ignoreComments) { ignoringComments = ignoreComments; }
public void setIgnoringComments(boolean value) { ignoreComments = value; } // setIgnoringComments()
public void setIgnoringElementContentWhitespace(boolean value) { whitespace = value; }
public void setIgnoringElementContentWhitespace(boolean whitespace) { ignoringElementContentWhitespace = whitespace; }
public void setIgnoringElementContentWhitespace(boolean value) { whitespace = value; } // setIgnoringElementContentWhitespace()
}
processActionEvent(ActionEvent event){ if (action_listeners != null) action_listeners.actionPerformed(event);}
byte[] byteBuf; String charsetName; int oldPosition; charsetName = getCharsetName(platform, language, encoding);
String charsetName = getCharsetName(platform, language, encoding);
private static String decodeName(int platform, int encoding, int language, ByteBuffer buffer, int offset, int len) { byte[] byteBuf; String charsetName; int oldPosition; charsetName = getCharsetName(platform, language, encoding); if (charsetName == null) return n...
byteBuf = new byte[len]; oldPosition = buffer.position(); try { buffer.position(offset); buffer.get(byteBuf); try { return new String(byteBuf, charsetName); } catch (UnsupportedEncodingException uex) { } } finally { buffer.position(oldPosition); } return null;
return decodeName(charsetName, buffer, offset, len);
private static String decodeName(int platform, int encoding, int language, ByteBuffer buffer, int offset, int len) { byte[] byteBuf; String charsetName; int oldPosition; charsetName = getCharsetName(platform, language, encoding); if (charsetName == null) return n...
&& endTime == zone.endTime);
&& endTime == zone.endTime && endTimeMode == zone.endTimeMode);
public synchronized boolean equals(Object o) { if (this == o) return true; if (!(o instanceof SimpleTimeZone)) return false; SimpleTimeZone zone = (SimpleTimeZone) o; if (zone.hashCode() != hashCode() || !getID().equals(zone.getID()) || rawOffset != zone.rawOffset || useDaylight != zone.useDayl...
int daysInMonth = getDaysInMonth(month, year); if (day < 1 || day > daysInMonth) throw new IllegalArgumentException("day out of range"); if (dayOfWeek < Calendar.SUNDAY || dayOfWeek > Calendar.SATURDAY) throw new IllegalArgumentException("dayOfWeek out of range"); if (month < Calendar.JANUARY || month > Calendar.DECEMB...
public int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis) { // This method is called by Calendar, so we mustn't use that class. int daylightSavings = 0; if (useDaylight && era == GregorianCalendar.AD && year >= startYear) { // This does only work for Gregorian calen...
&& endDayOfWeek == zone.endDayOfWeek && endTime == zone.endTime);
&& endDayOfWeek == zone.endDayOfWeek && endTime == zone.endTime && endTimeMode == zone.endTimeMode);
public boolean hasSameRules(TimeZone other) { if (this == other) return true; if (!(other instanceof SimpleTimeZone)) return false; SimpleTimeZone zone = (SimpleTimeZone) other; if (zone.hashCode() != hashCode() || rawOffset != zone.rawOffset || useDaylight != zone.useDaylight) return fals...
day -= 6;
day = Math.abs(day) - 6;
private boolean isBefore(int calYear, int calMonth, int calDayOfMonth, int calDayOfWeek, int calMillis, int mode, int month, int day, int dayOfWeek, int millis) { // This method is called by Calendar, so we mustn't use that class. // We have to do all calculations by hand. // check the months...
serialVersionOnStream = 1; }
startTimeMode = WALL_TIME; endTimeMode = WALL_TIME; serialVersionOnStream = 2; }
private void readObject(java.io.ObjectInputStream input) throws java.io.IOException, ClassNotFoundException { input.defaultReadObject(); if (serialVersionOnStream == 0) { // initialize the new fields to default values. dstSavings = 60 * 60 * 1000; endMode = DOW_IN_MONTH_MODE; startMode = DOW_IN_MONTH_M...
this.endDay = Math.abs(day);
this.endDay = day;
public void setEndRule(int month, int day, int dayOfWeek, int time) { this.endMode = checkRule(month, day, dayOfWeek); this.endMonth = month; // FIXME: XXX: JDK 1.2 allows negative values and has 2 new variations // of this method. this.endDay = Math.abs(day); this.endDayOfWeek = Math.abs(dayOfWeek...
else if (this.endTimeMode == STANDARD_TIME) this.endTime = time + this.dstSavings; else this.endTime = time + this.rawOffset + this.dstSavings;
public void setEndRule(int month, int day, int dayOfWeek, int time) { this.endMode = checkRule(month, day, dayOfWeek); this.endMonth = month; // FIXME: XXX: JDK 1.2 allows negative values and has 2 new variations // of this method. this.endDay = Math.abs(day); this.endDayOfWeek = Math.abs(dayOfWeek...
this.startDay = Math.abs(day);
this.startDay = day;
public void setStartRule(int month, int day, int dayOfWeek, int time) { this.startMode = checkRule(month, day, dayOfWeek); this.startMonth = month; // FIXME: XXX: JDK 1.2 allows negative values and has 2 new variations // of this method. this.startDay = Math.abs(day); this.startDayOfWeek = Math.abs...
this.startTime = time;
if (this.startTimeMode == WALL_TIME || this.startTimeMode == STANDARD_TIME) this.startTime = time; else this.startTime = time + this.rawOffset;
public void setStartRule(int month, int day, int dayOfWeek, int time) { this.startMode = checkRule(month, day, dayOfWeek); this.startMonth = month; // FIXME: XXX: JDK 1.2 allows negative values and has 2 new variations // of this method. this.startDay = Math.abs(day); this.startDayOfWeek = Math.abs...
+ ",endTime=" + endTime : "") + "]";
+ ",endTime=" + endTime + ",endTimeMode=" + endTimeMode : "") + "]";
public String toString() { // the test for useDaylight is an incompatibility to jdk1.2, but // I think this shouldn't hurt. return getClass().getName() + "[" + "id=" + getID() + ",offset=" + rawOffset + ",dstSavings=" + dstSavings + ",useDaylight=" + useDaylight + (useDaylight ? ",...
public long write(ByteBuffer[] srcs) throws IOException;
long write(ByteBuffer[] srcs, int offset, int length) throws IOException;
public long write(ByteBuffer[] srcs) throws IOException;
public long read(ByteBuffer[] srcs) throws IOException;
long read(ByteBuffer[] srcs, int offset, int length) throws IOException;
public long read(ByteBuffer[] srcs) throws IOException;
getMaxExpansion(int value) { return(5); }
public int getMaxExpansion(int value) { return 1; }
getMaxExpansion(int value){ //************ Implement me!!!!!!!!! return(5);}
getOffset() { return(pos); }
public int getOffset() { return textIndex; }
getOffset(){ return(pos);}
previous() { --pos; if (pos < 0) return(NULLORDER);
public int previous() { RuleBasedCollator.CollationElement e = previousBlock();
previous(){ --pos; if (pos < 0) return(NULLORDER); String s = str.charAt(pos) + ""; return(rbc.getCollationElementValue(s));}
String s = str.charAt(pos) + ""; return(rbc.getCollationElementValue(s)); }
if (e == null) return NULLORDER; return e.getValue(); }
previous(){ --pos; if (pos < 0) return(NULLORDER); String s = str.charAt(pos) + ""; return(rbc.getCollationElementValue(s));}
setOffset(int offset) {
public void setOffset(int offset) {
setOffset(int offset){ if (offset < 0) throw new IllegalArgumentException("Negative offset: " + offset); if ((str.length() > 0) && (offset > 0)) throw new IllegalArgumentException("Offset too large: " + offset); else if (offset > (str.length() - 1)) throw new IllegalArgumentException("Offset too large: " + ...
if ((str.length() > 0) && (offset > 0)) throw new IllegalArgumentException("Offset too large: " + offset); else if (offset > (str.length() - 1))
if (offset > (text.length() - 1))
setOffset(int offset){ if (offset < 0) throw new IllegalArgumentException("Negative offset: " + offset); if ((str.length() > 0) && (offset > 0)) throw new IllegalArgumentException("Offset too large: " + offset); else if (offset > (str.length() - 1)) throw new IllegalArgumentException("Offset too large: " + ...
pos = offset; }
for (index = 0; index < text_decomposition.length; index++) { if (offset <= text_indexes[index]) break; } if (text_indexes[index] == offset) textIndex = offset; else textIndex = text_indexes[index-1]; }
setOffset(int offset){ if (offset < 0) throw new IllegalArgumentException("Negative offset: " + offset); if ((str.length() > 0) && (offset > 0)) throw new IllegalArgumentException("Offset too large: " + offset); else if (offset > (str.length() - 1)) throw new IllegalArgumentException("Offset too large: " + ...
setText(String str) { this.str = str; pos = 0; }
public void setText(String text) { int idx = 0; int idx_idx = 0; int alreadyExpanded = 0; int idxToMove = 0; this.text = text; this.index = 0; String work_text = text.intern(); Vector v = new Vector(); Vector vi = new Vector(); while (idx < work_text.length()) { String key, key_old; Object object = null; int p = ...
setText(String str){ this.str = str; pos = 0;}
WStringSeqHolder h = new WStringSeqHolder(); h._read(input); return h.value;
String[] value = new String[ input.read_long() ]; for (int i = 0; i < value.length; i++) { value [ i ] = input.read_wstring(); } return value;
public static String[] read(InputStream input) { WStringSeqHolder h = new WStringSeqHolder(); h._read(input); return h.value; }
WStringSeqHolder h = new WStringSeqHolder(value); h._write(output);
output.write_long(value.length); for (int i = 0; i < value.length; i++) { output.write_wstring(value [ i ]); }
public static void write(OutputStream output, String[] value) { WStringSeqHolder h = new WStringSeqHolder(value); h._write(output); }
public WStringSeqHolder(String[] initial_value)
public WStringSeqHolder()
public WStringSeqHolder(String[] initial_value) { value = initial_value; typecode.setLength(value.length); }
value = initial_value; typecode.setLength(value.length);
public WStringSeqHolder(String[] initial_value) { value = initial_value; typecode.setLength(value.length); }
public BigDecimal (BigInteger num, int scale) throws NumberFormatException
public BigDecimal (BigInteger num)
public BigDecimal (BigInteger num, int scale) throws NumberFormatException { if (scale < 0) throw new NumberFormatException ("scale of " + scale + " is < 0"); this.intVal = num; this.scale = scale; }
if (scale < 0) throw new NumberFormatException ("scale of " + scale + " is < 0"); this.intVal = num; this.scale = scale;
this (num, 0);
public BigDecimal (BigInteger num, int scale) throws NumberFormatException { if (scale < 0) throw new NumberFormatException ("scale of " + scale + " is < 0"); this.intVal = num; this.scale = scale; }
g.drawString(str, placement.x, placement.y);
g.drawString(str, placement.x, placement.y + fm.getAscent());
protected void paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) { String str = progressBar.getString(); int full = getAmountFull(b, width, height); Point placement = getStringPlacement(g, progressBar.getString(), ...
public Font deriveFont (AffineTransform a)
public Font deriveFont (int style, float size)
public Font deriveFont (AffineTransform a){ if (a == null) throw new IllegalArgumentException ("Affine transformation is null"); return peer.deriveFont (this, a);}
if (a == null) throw new IllegalArgumentException ("Affine transformation is null"); return peer.deriveFont (this, a);
return peer.deriveFont (this, style, size);
public Font deriveFont (AffineTransform a){ if (a == null) throw new IllegalArgumentException ("Affine transformation is null"); return peer.deriveFont (this, a);}
public final SelectableChannel configureBlocking (boolean block)
public final SelectableChannel configureBlocking(boolean blocking)
public final SelectableChannel configureBlocking (boolean block) throws IOException { synchronized (LOCK) { blocking = true; implConfigureBlocking (block); } return this; }
synchronized (LOCK)
synchronized (blockingLock())
public final SelectableChannel configureBlocking (boolean block) throws IOException { synchronized (LOCK) { blocking = true; implConfigureBlocking (block); } return this; }
blocking = true; implConfigureBlocking (block);
if (this.blocking != blocking) { implConfigureBlocking(blocking); this.blocking = blocking; }
public final SelectableChannel configureBlocking (boolean block) throws IOException { synchronized (LOCK) { blocking = true; implConfigureBlocking (block); } return this; }
protected abstract void implConfigureBlocking (boolean block)
protected abstract void implConfigureBlocking(boolean blocking)
protected abstract void implConfigureBlocking (boolean block) throws IOException;
return registered > 0;
return ! keys.isEmpty();
public final boolean isRegistered() { return registered > 0; }
return register (selector, 0, null);
synchronized (blockingLock()) { return locate(selector); }
public final SelectionKey keyFor(Selector selector) { try { return register (selector, 0, null); } catch (Exception e) { return null; } }
if (keys == null) return null;
ListIterator it = keys.listIterator();
private SelectionKey locate (Selector selector) { if (keys == null) return null; SelectionKey k = null; ListIterator it = keys.listIterator (); while (it.hasNext ()) { k = (SelectionKey) it.next (); if (k.selector () == selector) { return k; } }...
SelectionKey k = null; ListIterator it = keys.listIterator (); while (it.hasNext ()) { k = (SelectionKey) it.next (); if (k.selector () == selector)
while (it.hasNext())
private SelectionKey locate (Selector selector) { if (keys == null) return null; SelectionKey k = null; ListIterator it = keys.listIterator (); while (it.hasNext ()) { k = (SelectionKey) it.next (); if (k.selector () == selector) { return k; } }...
return k; }
SelectionKey key = (SelectionKey) it.next(); if (key.selector() == selector) return key;
private SelectionKey locate (Selector selector) { if (keys == null) return null; SelectionKey k = null; ListIterator it = keys.listIterator (); while (it.hasNext ()) { k = (SelectionKey) it.next (); if (k.selector () == selector) { return k; } }...
return k;
return null;
private SelectionKey locate (Selector selector) { if (keys == null) return null; SelectionKey k = null; ListIterator it = keys.listIterator (); while (it.hasNext ()) { k = (SelectionKey) it.next (); if (k.selector () == selector) { return k; } }...
SelectionKey k = null;
if ((ops & ~validOps()) != 0) throw new IllegalArgumentException(); SelectionKey key = null;
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); ...
synchronized (LOCK)
synchronized (blockingLock())
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); ...
k = locate (selector);
key = locate(selector);
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); ...
if (k != null)
if (key != null)
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); ...
k.attach (att);
if (att != null) key.attach(att);
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); ...
k = selector.register (this, ops, att);
key = selector.register(this, ops, att); if (key != null) addSelectionKey(key); } }
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); ...
if (k != null) add (k);
return key;
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); ...
} return k; }
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); ...
return (cal.getTimeInMillis() == getTimeInMillis());
return (cal.gregorianCutover == gregorianCutover && super.equals(o));
public boolean equals(Object o) { if (! (o instanceof GregorianCalendar)) return false; GregorianCalendar cal = (GregorianCalendar) o; return (cal.getTimeInMillis() == getTimeInMillis()); }
focusColor = getFocusColor(); selectColor = getSelectColor(); disabledTextColor = getDisabledTextColor();
UIDefaults def = UIManager.getLookAndFeelDefaults(); focusColor = def.getColor(getPropertyPrefix() + "focus"); selectColor = def.getColor(getPropertyPrefix() + "select"); disabledTextColor = def.getColor(getPropertyPrefix() + "disabledText");
public MetalButtonUI() { super(); focusColor = getFocusColor(); selectColor = getSelectColor(); disabledTextColor = getDisabledTextColor(); }
public static ComponentUI createUI(JComponent component) { if (instance == null) instance = new MetalButtonUI(); return instance;
public static ComponentUI createUI(JComponent c) { return new MetalButtonUI();
public static ComponentUI createUI(JComponent component) { if (instance == null) instance = new MetalButtonUI(); return instance; }
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); button.setFont(defaults.getFont("Button.font")); if (button.getParent() instanceof JToolBar) button.setBorder(MetalBorders.getToolbarButtonBorder());
if (button.isRolloverEnabled()) { if (button.getBorder() instanceof UIResource) button.setBorder(MetalBorders.getRolloverBorder()); }
public void installDefaults(AbstractButton button) { super.installDefaults(button); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); button.setFont(defaults.getFont("Button.font")); if (button.getParent() instanceof JToolBar) button.setBorder(MetalBorders.getToolbarButtonBorder()); }
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); menuBar.setBackground(defaults.getColor("MenuBar.background")); menuBar.setBorder(defaults.getBorder("MenuBar.border")); menuBar.setFont(defaults.getFont("MenuBar.font")); menuBar.setForeground(defaults.getColor("MenuBar.foreground"));
LookAndFeel.installBorder(menuBar, "MenuBar.border"); LookAndFeel.installColorsAndFont(menuBar, "MenuBar.background", "MenuBar.foreground", "MenuBar.font");
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); menuBar.setBackground(defaults.getColor("MenuBar.background")); menuBar.setBorder(defaults.getBorder("MenuBar.border")); menuBar.setFont(defaults.getFont("MenuBar.font")); menuBar.setForeground(defaults.getCol...
modifyPartition(PARTITION.getValue(cmdLine), api, bs);
modifyPartition(PARTITION.getValue(cmdLine), api, bs, current);
public static void main(String[] args) throws SyntaxErrorException { ParsedArguments cmdLine = HELP_INFO.parse(args); DeviceManager dm; try { dm = InitialNaming.lookup(DeviceManager.NAME); boolean isAction = PARAM_ACTION.isSet(cmdLine); boolean isInitMBR = PARAM_INITMBR.isSet(cmdLine); boolean isDevice = PA...
private static void modifyPartition(String description, BlockDeviceAPI api, BootSector bs) throws IOException {
private static void modifyPartition(String description, BlockDeviceAPI api, BootSector bs, Device dev) throws IOException {
private static void modifyPartition(String description, BlockDeviceAPI api, BootSector bs) throws IOException { // arg 1 should be in the form id:start:size:fs StringTokenizer st = new StringTokenizer(description, ":"); int id = Integer.parseInt(st.nextToken()); //BUG in long //long start = Long.parseLong(st.next...
DeviceManager dm = null; try { dm = InitialNaming.lookup(DeviceManager.NAME); dm.stop(dev); dm.start(dev); } catch (NameNotFoundException e) { e.printStackTrace(); } catch (DeviceNotFoundException e) { e.printStackTrace(); } catch (DriverException e) { e.printStackTrace(); }
private static void modifyPartition(String description, BlockDeviceAPI api, BootSector bs) throws IOException { // arg 1 should be in the form id:start:size:fs StringTokenizer st = new StringTokenizer(description, ":"); int id = Integer.parseInt(st.nextToken()); //BUG in long //long start = Long.parseLong(st.next...
if (ActivationSystemTransient.debug) System.out.println("Instantiating "+desc.getClassName());
public MarshalledObject newInstance(ActivationID id, ActivationDesc desc) throws ActivationException, RemoteException { try { Remote object; Class objectClass; ClassLoader loader = Thread.currentThread().getContextClassLoader(); objectClass = loader.loadClass(desc.getClassNam...
if (parent == null) { if (this instanceof MenuBar) { MenuBar menuBar = (MenuBar) this; if (menuBar.frame != null) retVal = menuBar.frame.postEvent(event); } } else
if (parent != null)
postEvent(Event event) { boolean retVal = false; MenuContainer parent = getParent(); if (parent == null) { if (this instanceof MenuBar) { MenuBar menuBar = (MenuBar) this; if (menuBar.frame != null) retVal = menuBar.frame.postEvent(event); } ...
public float getLSB () throws NotImplementedException
public float getLSB()
public float getLSB () throws NotImplementedException { throw new Error ("not implemented"); }
throw new Error ("not implemented");
if (horizontal) return (float) bounds.getX(); return (float) bounds.getY();
public float getLSB () throws NotImplementedException { throw new Error ("not implemented"); }
public float getRSB () throws NotImplementedException
public float getRSB()
public float getRSB () throws NotImplementedException { throw new Error ("not implemented"); }
throw new Error ("not implemented");
if (horizontal) return (float) (advanceX - (bounds.getX() + bounds.getWidth())); return (float) (advanceY - (bounds.getY() + bounds.getHeight()));
public float getRSB () throws NotImplementedException { throw new Error ("not implemented"); }
for (Iterator i = list.iterator(); i.hasNext(); ) { final Permission p = (Permission)i.next();
for (Permission p : list) {
public boolean implies(Permission perm) { for (Iterator i = list.iterator(); i.hasNext(); ) { final Permission p = (Permission)i.next(); if (p.implies(perm)) { return true; } } return false; }
public ServerSocketChannel(SelectorProvider provider) {
protected ServerSocketChannel(SelectorProvider provider) {
public ServerSocketChannel(SelectorProvider provider) { super(provider); }
if (closed) throw new AsynchronousCloseException();
protected final void end (boolean completed) throws AsynchronousCloseException { }
caret.setVisible(!caret.isVisible());
Caret c = caret; if (c != null) c.setVisible(!c.isVisible());
public void actionPerformed(ActionEvent ev) { caret.setVisible(!caret.isVisible()); }
setDelay(caret.getBlinkRate());
Caret c = caret; if (c != null) { setDelay(c.getBlinkRate());
public void update() { stop(); setDelay(caret.getBlinkRate()); if (editable) start(); else caret.setVisible(false); }
caret.setVisible(false);
c.setVisible(false); }
public void update() { stop(); setDelay(caret.getBlinkRate()); if (editable) start(); else caret.setVisible(false); }
p.close();
public SignedObject(Serializable object, PrivateKey signingKey, Signature signingEngine) throws IOException, InvalidKeyException, SignatureException { thealgorithm = signingEngine.getAlgorithm(); ByteArrayOutputStream ostream = new ByteArrayOutputStream(); ObjectOutputStream p = new ObjectOutputSt...
ByteArrayInputStream istream = new ByteArrayInputStream(content);
ByteArrayInputStream bais = new ByteArrayInputStream(content); ObjectInput oi = new ObjectInputStream(bais); Object obj = oi.readObject(); oi.close(); bais.close();
public Object getObject() throws IOException, ClassNotFoundException { ByteArrayInputStream istream = new ByteArrayInputStream(content); return new ObjectInputStream(istream).readObject(); }
return new ObjectInputStream(istream).readObject();
return obj;
public Object getObject() throws IOException, ClassNotFoundException { ByteArrayInputStream istream = new ByteArrayInputStream(content); return new ObjectInputStream(istream).readObject(); }
return signature;
return (byte[]) signature.clone();
public byte[] getSignature() { return signature; }
private Provider ()
Provider ()
private Provider () { extendedLoaded = false; canonicalNames = new HashMap (); charsets = new HashMap (); // US-ASCII aka ISO646-US addCharset (new US_ASCII ()); // ISO-8859-1 aka ISO-LATIN-1 addCharset (new ISO_8859_1 ()); // UTF-8 addCharset (new UTF_8 ()); // UTF-16BE addCharset (...
if(cs == null && !extendedLoaded)
if (cs == null)
public Charset charsetForName (String charsetName) { Charset cs = (Charset) charsets.get(canonicalNames.get(charsetName.toLowerCase())); if(cs == null && !extendedLoaded) { loadExtended(); cs = (Charset) charsets.get(canonicalNames.get(charsetName.toLowerCase())); } return cs; }
private void loadExtended ()
private synchronized void loadExtended ()
private void loadExtended () { if(extendedLoaded) return; addCharset (new ISO_8859_3 ()); // ISO-8859-3 aka ISO-LATIN-3 addCharset (new ISO_8859_6 ()); // ISO-8859-6 (Arabic) addCharset (new ISO_8859_8 ()); // ISO-8859-8 (Hebrew) // Some more codepages addCharset (new Cp855()); // IBM...
addCharset (new MacCentralEurope()); addCharset (new MacCroatian()); addCharset (new MacCyrillic()); addCharset (new MacDingbat()); addCharset (new MacGreek()); addCharset (new MacIceland()); addCharset (new MacRoman()); addCharset (new MacRomania()); addCharset (new MacSymbol()); addCharset (new MacThai()); addCharset...
private void loadExtended () { if(extendedLoaded) return; addCharset (new ISO_8859_3 ()); // ISO-8859-3 aka ISO-LATIN-3 addCharset (new ISO_8859_6 ()); // ISO-8859-6 (Arabic) addCharset (new ISO_8859_8 ()); // ISO-8859-8 (Hebrew) // Some more codepages addCharset (new Cp855()); // IBM...
super("Windows-1250", new String[] {
super("windows-1250", new String[] {
public Windows1250() { super("Windows-1250", new String[] { "Windows1250", "ibm-5346_P100-1998", "ibm-5346", "cp1250", "cp-1250", "cp_1250", "windows1250", "windows_1250" }); lookupTable = lookup; }
super("Windows-1252", new String[] {
super("windows-1252", new String[] {
public Windows1252() { super("Windows-1252", new String[] { "Windows1252", "ibm-5348_P100-1997", "ibm-5348", "windows-1252", "cp1252", "cp-1252" }); lookupTable = lookup; }
super("Windows-1253", new String[] {
super("windows-1253", new String[] {
public Windows1253() { super("Windows-1253", new String[] { "Windows1253", "cp1253", "cp-1253", "cp_1253", "windows1253", "windows_1253" }); lookupTable = lookup; }
super("Windows-1254", new String[] {
super("windows-1254", new String[] {
public Windows1254() { super("Windows-1254", new String[] { "Windows1254", "cp1254", "cp-1254", "cp_1254", "windows1254", "windows_1254" }); lookupTable = lookup; }
super("Windows-1257", new String[] {
super("windows-1257", new String[] {
public Windows1257() { super("Windows-1257", new String[] { "Windows1257", "cp1257", "cp-1257", "cp_1257", "windows1257", "windows_1257" }); lookupTable = lookup; }
super("Windows-1255", new String[] {
super("windows-1255", new String[] {
public Windows1255() { super("Windows-1255", new String[] { "Windows1255", "cp1255", "cp-1255", "cp_1255", "windows1255", "windows_1255" }); lookupTable = lookup; }
super("Windows-1256", new String[] {
super("windows-1256", new String[] {
public Windows1256() { super("Windows-1256", new String[] { "Windows1256", "cp1256", "cp-1256", "cp_1256", "windows1256", "windows_1256" }); lookupTable = lookup; }
super("Windows-1258", new String[] {
super("windows-1258", new String[] {
public Windows1258() { super("Windows-1258", new String[] { "Windows1258", "cp1258", "cp-1258", "cp_1258", "windows1258", "windows_1258" }); lookupTable = lookup; }