rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
SecureRandom rnd = new SecureRandom (); rnd.nextBytes(PS);
prng.nextBytes(PS);
public byte[] encode(final byte[] M) { // a. Generate an octet string PS of length k - mLen - 3 consisting // of pseudo-randomly generated nonzero octets. The length of PS // will be at least eight octets. final byte[] PS = new byte[k - M.length - 3]; // FIXME. This should be configurable, some...
{ new SecureRandom ().nextBytes(buffer);
getDefaultPRNG().nextBytes(buffer);
private void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else { new SecureRandom ().nextBytes(buffer); } }
}
private void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else { new SecureRandom ().nextBytes(buffer); } }
public BigInteger add(BigInteger val)
private static BigInteger add(int x, int y)
public BigInteger add(BigInteger val) { return add(this, val, 1); }
return add(this, val, 1);
return valueOf((long) x + (long) y);
public BigInteger add(BigInteger val) { return add(this, val, 1); }
public BigInteger divide(BigInteger val)
private static void divide(long x, long y, BigInteger quotient, BigInteger remainder, int rounding_mode)
public BigInteger divide(BigInteger val) { if (val.isZero()) throw new ArithmeticException("divisor is zero"); BigInteger quot = new BigInteger(); divide(this, val, quot, null, TRUNCATE); return quot.canonicalize(); }
if (val.isZero()) throw new ArithmeticException("divisor is zero");
boolean xNegative, yNegative; if (x < 0) { xNegative = true; if (x == Long.MIN_VALUE) { divide(valueOf(x), valueOf(y), quotient, remainder, rounding_mode); return; } x = -x; } else xNegative = false;
public BigInteger divide(BigInteger val) { if (val.isZero()) throw new ArithmeticException("divisor is zero"); BigInteger quot = new BigInteger(); divide(this, val, quot, null, TRUNCATE); return quot.canonicalize(); }
BigInteger quot = new BigInteger(); divide(this, val, quot, null, TRUNCATE); return quot.canonicalize();
if (y < 0) { yNegative = true; if (y == Long.MIN_VALUE) { if (rounding_mode == TRUNCATE) { if (quotient != null) quotient.set(0); if (remainder != null) remainder.set(x); } else divide(valueOf(x), valueOf(y), quotient, remainder, rounding_mode); return; } y = -y; } else yNegative = false; long q = x / y; long r = x % ...
public BigInteger divide(BigInteger val) { if (val.isZero()) throw new ArithmeticException("divisor is zero"); BigInteger quot = new BigInteger(); divide(this, val, quot, null, TRUNCATE); return quot.canonicalize(); }
public TransformerException(String msg, Throwable cause)
public TransformerException(String msg)
public TransformerException(String msg, Throwable cause) { this(msg, null, cause); }
this(msg, null, cause); }
this(msg, null, null); }
public TransformerException(String msg, Throwable cause) { this(msg, null, cause); }
SizeRequirements[] childReqs = getChildRequirements(axis);
updateChildRequirements(axis); updateRequirements(axis);
protected void baselineLayout(int span, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(span, requi...
childReqs, offsets, spans); layoutValid[axis] = true;
childReqs[axis], offsets, spans);
protected void baselineLayout(int span, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(span, requi...
SizeRequirements[] childReqs = getChildRequirements(axis); return SizeRequirements.getAlignedSizeRequirements(childReqs);
updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; float prefRight = 0; float maxLeft = 0; float maxRight = 0; for (int i = 0; i < childReqs[axis].length; i++) { float myMinLeft = childReqs[axis][i].minimu...
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { SizeRequirements[] childReqs = getChildRequirements(axis); return SizeRequirements.getAlignedSizeRequirements(childReqs); }
SizeRequirements[] childReqs = getChildRequirements(axis); return SizeRequirements.getTiledSizeRequirements(childReqs);
updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred = 0; long maximum = 0; for (int i = 0; i < children.length; i++) { minimum += childReqs[axis][i].minimum; preferred += childReqs[axis][i].preferred; maximum += childReqs[a...
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { SizeRequirements[] childReqs = getChildRequirements(axis); return SizeRequirements.getTiledSizeRequirements(childReqs); }
SizeRequirements[] childReqs = getChildRequirements(axis); return SizeRequirements.getAlignedSizeRequirements(childReqs);
updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; float prefRight = 0; float maxLeft = 0; float maxRight = 0; for (int i = 0; i < childReqs[axis].length; i++) { float myMinLeft = childReqs[axis][i].minimu...
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { SizeRequirements[] childReqs = getChildRequirements(axis); return SizeRequirements.getAlignedSizeRequirements(childReqs); }
if (! isLayoutValid(axis)) requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]);
updateRequirements(axis);
public float getAlignment(int axis) { float align; if (axis == myAxis) align = 0.5F; else { if (! isLayoutValid(axis)) requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); align = requirement...
if (!isLayoutValid(axis)) {
float max;
public float getMaximumSpan(int axis) { if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequirements...
requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]);
max = getPreferredSpan(axis);
public float getMaximumSpan(int axis) { if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequirements...
requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); } return requirements[axis].maximum;
max = Integer.MAX_VALUE; return max;
public float getMaximumSpan(int axis) { if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequirements...
if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); }
updateRequirements(axis);
public float getMinimumSpan(int axis) { if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequirem...
if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); }
updateRequirements(axis);
public float getPreferredSpan(int axis) { if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequir...
requirements[minorAxis] = calculateMinorAxisRequirements(minorAxis, requirements[minorAxis]); layoutMinorAxis(newSpan[minorAxis], minorAxis, offsets[minorAxis],
layoutValid[minorAxis] = false; span[minorAxis] = newSpan[minorAxis]; layoutMinorAxis(span[minorAxis], minorAxis, offsets[minorAxis],
protected void layout(int width, int height) { int[] newSpan = new int[]{ width, height }; int count = getViewCount(); // Update minor axis as appropriate. We need to first update the minor // axis layout because that might affect the children's preferences along // the major axis. int minorAxis = ...
span[myAxis] = newSpan[myAxis];
protected void layout(int width, int height) { int[] newSpan = new int[]{ width, height }; int count = getViewCount(); // Update minor axis as appropriate. We need to first update the minor // axis layout because that might affect the children's preferences along // the major axis. int minorAxis = ...
requirements[myAxis] = calculateMajorAxisRequirements(myAxis, requirements[myAxis]); layoutMajorAxis(newSpan[myAxis], myAxis, offsets[myAxis],
layoutValid[myAxis] = false; span[myAxis] = newSpan[myAxis]; layoutMajorAxis(span[myAxis], myAxis, offsets[myAxis],
protected void layout(int width, int height) { int[] newSpan = new int[]{ width, height }; int count = getViewCount(); // Update minor axis as appropriate. We need to first update the minor // axis layout because that might affect the children's preferences along // the major axis. int minorAxis = ...
assert layoutValid[myAxis] == true : "Major axis layout must be valid after layout"; assert layoutValid[minorAxis] == true : "Minor axis layout must be valid after layout";
if (layoutValid[myAxis] == false) System.err.println("WARNING: Major axis layout must be valid after layout"); if (layoutValid[minorAxis] == false) System.err.println("Minor axis layout must be valid after layout");
protected void layout(int width, int height) { int[] newSpan = new int[]{ width, height }; int count = getViewCount(); // Update minor axis as appropriate. We need to first update the minor // axis layout because that might affect the children's preferences along // the major axis. int minorAxis = ...
SizeRequirements[] childReqs = getChildRequirements(axis);
updateChildRequirements(axis); updateRequirements(axis);
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targe...
SizeRequirements.calculateTiledPositions(targetSpan, null, childReqs,
SizeRequirements.calculateTiledPositions(targetSpan, requirements[axis], childReqs[axis],
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targe...
layoutValid[axis] = true;
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targe...
SizeRequirements[] childReqs = getChildRequirements(axis);
updateChildRequirements(axis); updateRequirements(axis);
protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(tar...
childReqs, offsets, spans); layoutValid[axis] = true;
childReqs[axis], offsets, spans);
protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(tar...
TableColumnModel cols = table.getColumnModel();
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getR...
int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0;
Point p1 = new Point(clip.x, clip.y); int c0 = table.columnAtPoint(p1); if (c0 == -1) c0 = 0; int r0 = table.rowAtPoint(p1); if (r0 == -1) r0 = 0; Point p2 = new Point(clip.x + clip.width, clip.y + clip.height); int cn = table.columnAtPoint(p2); if (cn == -1) cn = table.getColumnCount() - 1; int rn = table.rowAtPoint(p...
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getR...
Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle();
TableColumnModel cmodel = table.getColumnModel(); int [] widths = new int[cn+1]; for (int i = c0; i <=cn ; i++) { widths[i] = cmodel.getColumn(i).getWidth(); } Rectangle bounds = table.getCellRect(r0, c0, false); bounds.height = table.getRowHeight()+table.getRowMargin(); int left = bounds.x; int top = bounds.y; ...
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getR...
for (int c = 0; c < ncols && x < xmax; ++c)
Color grid = table.getGridColor(); for (int r = r0; r <= rn; ++r)
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getR...
y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap....
for (int c = c0; c <= cn; ++c)
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getR...
y += height; } x += width;
bounds.y += height; bounds.x = left;
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getR...
ymax = y; xmax = x; Color grid = table.getGridColor();
bottom = bounds.y;
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getR...
x = x0;
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getR...
for (int c = 0; c < ncols && x < xmax; ++c)
int x = left; for (int c = c0; c <= cn; ++c)
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getR...
x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax);
gfx.drawLine(x, top, x, bottom); x += widths[c];
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getR...
y = y0;
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getR...
for (int r = 0; r < nrows && y < ymax; ++r)
int y = top; for (int r = r0; r <= rn; ++r)
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getR...
gfx.drawLine(x0, y, xmax, y);
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getR...
{ x += columnModel.getColumn(i).getWidth(); x += x_gap; }
x += columnModel.getColumn(i).getWidth();
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math....
bad.minor = Minor.Any;
public static ServantAlreadyActive extract(Any any) { try { EmptyExceptionHolder h = (EmptyExceptionHolder) any.extract_Streamable(); return (ServantAlreadyActive) h.value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("ServantAlreadyActiv...
builder.emitObject(os, object);
throw new RuntimeException("Unresolved object " + object);
public int addressOf32(Object object) { final NativeStream.ObjectRef ref = os.getObjectRef(object); try { if (!ref.isResolved()) { builder.emitObject(os, object); } final int offset = (int) os.getBaseAddr() + ref.getOffset(); return offset; } catch (ClassNotFoundException ex) { throw new RuntimeExcepti...
} catch (ClassNotFoundException ex) { throw new RuntimeException("Unresolved object ref", ex);
public int addressOf32(Object object) { final NativeStream.ObjectRef ref = os.getObjectRef(object); try { if (!ref.isResolved()) { builder.emitObject(os, object); } final int offset = (int) os.getBaseAddr() + ref.getOffset(); return offset; } catch (ClassNotFoundException ex) { throw new RuntimeExcepti...
builder.emitObject(os, object);
throw new RuntimeException("Unresolved object " + object);
public long addressOf64(Object object) { final NativeStream.ObjectRef ref = os.getObjectRef(object); try { if (!ref.isResolved()) { builder.emitObject(os, object); } final long offset = os.getBaseAddr() + ref.getOffset(); return offset; } catch (ClassNotFoundException ex) { throw new RuntimeException("...
} catch (ClassNotFoundException ex) { throw new RuntimeException("Unresolved object ref", ex);
public long addressOf64(Object object) { final NativeStream.ObjectRef ref = os.getObjectRef(object); try { if (!ref.isResolved()) { builder.emitObject(os, object); } final long offset = os.getBaseAddr() + ref.getOffset(); return offset; } catch (ClassNotFoundException ex) { throw new RuntimeException("...
if (e.getPropertyName().equals(JComboBox.RENDERER_CHANGED_PROPERTY))
if (e.getPropertyName().equals("renderer"))
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JComboBox.RENDERER_CHANGED_PROPERTY)) { list.setCellRenderer((ListCellRenderer) e.getNewValue()); revalidate(); repaint(); } if (e.getPropertyName().equals(JComboBox.MODEL_CHANGED_PROPERTY)) { ...
if (e.getPropertyName().equals(JComboBox.MODEL_CHANGED_PROPERTY))
if (e.getPropertyName().equals("dataModel"))
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JComboBox.RENDERER_CHANGED_PROPERTY)) { list.setCellRenderer((ListCellRenderer) e.getNewValue()); revalidate(); repaint(); } if (e.getPropertyName().equals(JComboBox.MODEL_CHANGED_PROPERTY)) { ...
public void setPopupSize(int width, int height)
public void setPopupSize(Dimension size)
public void setPopupSize(int width, int height) { super.setSize(width, height); }
super.setSize(width, height);
super.setSize(size);
public void setPopupSize(int width, int height) { super.setSize(width, height); }
throws NotImplementedException
protected void installKeyboardActions() throws NotImplementedException { // FIXME: implement }
Object[] bindings = (Object[]) SharedUIDefaults.get("MenuBar.windowBindings"); InputMap inputMap = LookAndFeel.makeComponentInputMap(menuBar, bindings); SwingUtilities.replaceUIInputMap(menuBar, JComponent.WHEN_IN_FOCUSED_WINDOW, inputMap); SwingUtilities.replaceUIActionMap(menuBar, getActionMap());
protected void installKeyboardActions() throws NotImplementedException { // FIXME: implement }
throws NotImplementedException
protected void uninstallKeyboardActions() throws NotImplementedException { // FIXME: implement. }
SwingUtilities.replaceUIInputMap(menuBar, JComponent.WHEN_IN_FOCUSED_WINDOW, null); SwingUtilities.replaceUIActionMap(menuBar, null);
protected void uninstallKeyboardActions() throws NotImplementedException { // FIXME: implement. }
public AbstractAction(String name)
public AbstractAction()
public AbstractAction(String name) { this(name, null); // TODO: default icon?? }
this(name, null);
this("");
public AbstractAction(String name) { this(name, null); // TODO: default icon?? }
if (selected)
if (selected && isEnabled())
public void setSelected(boolean selected) { // if this menu selection is true, then activate this menu and // display popup associated with this menu if (selected) { super.setArmed(true); super.setSelected(true); // FIXME: The popup menu should be shown on the screen after certain // number of sec...
if (this.isShowing())
if (isShowing())
public void setSelected(boolean selected) { // if this menu selection is true, then activate this menu and // display popup associated with this menu if (selected) { super.setArmed(true); super.setSelected(true); // FIXME: The popup menu should be shown on the screen after certain // number of sec...
add(list, BorderLayout.CENTER);
setLayout(new GridLayout(1, 1)); list.setBorder(new BevelBorder(BevelBorder.LOWERED)); add(list);
public WindowBar() { this.list = new JList(); this.model = new DefaultListModel(); this.wrappers = new HashMap<JInternalFrame, FrameWrapper>(); list.setModel(model); add(list, BorderLayout.CENTER); }
public void setPrototypeDisplayValue(Object newPrototypeDisplayValue)
public void setPrototypeDisplayValue(Object value)
public void setPrototypeDisplayValue(Object newPrototypeDisplayValue) { prototypeDisplayValue = newPrototypeDisplayValue; }
prototypeDisplayValue = newPrototypeDisplayValue;
Object oldValue = prototypeDisplayValue; prototypeDisplayValue = value; firePropertyChange("prototypeDisplayValue", oldValue, value);
public void setPrototypeDisplayValue(Object newPrototypeDisplayValue) { prototypeDisplayValue = newPrototypeDisplayValue; }
public DefaultComboBoxModel(Object[] items)
public DefaultComboBoxModel()
public DefaultComboBoxModel(Object[] items) { list = new Vector(Arrays.asList(items)); }
list = new Vector(Arrays.asList(items));
list = new Vector();
public DefaultComboBoxModel(Object[] items) { list = new Vector(Arrays.asList(items)); }
changeSupport.firePropertyChange(propertyName, new Boolean(oldValue), new Boolean(newValue));
changeSupport.firePropertyChange(propertyName, Boolean.valueOf(oldValue), Boolean.valueOf(newValue));
public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) { if (changeSupport != null) changeSupport.firePropertyChange(propertyName, new Boolean(oldValue), new Boolean(newValue)); }
this.propertyListeners = new Hashtable();
this.propertyListeners = new HashMap();
public SwingPropertyChangeSupport(Object source) { super(source); this.source = source; this.listeners = new EventListenerList(); this.propertyListeners = new Hashtable(); }
this.x = (int) x; this.y = (int) y; this.width = (int) width; this.height = (int) height;
this.x = (int) Math.floor(x); this.y = (int) Math.floor(y); this.width = (int) Math.ceil(x + width) - this.x; this.height = (int) Math.ceil(y + height) - this.y;
public void setRect(double x, double y, double width, double height) { this.x = (int) x; this.y = (int) y; this.width = (int) width; this.height = (int) height; }
public PropertyChangeListener[] getPropertyChangeListeners(String property)
public PropertyChangeListener[] getPropertyChangeListeners()
public PropertyChangeListener[] getPropertyChangeListeners(String property) { return changeSupport == null ? new PropertyChangeListener[0] : changeSupport.getPropertyChangeListeners(property); }
: changeSupport.getPropertyChangeListeners(property);
: changeSupport.getPropertyChangeListeners();
public PropertyChangeListener[] getPropertyChangeListeners(String property) { return changeSupport == null ? new PropertyChangeListener[0] : changeSupport.getPropertyChangeListeners(property); }
public synchronized PropertyChangeListener[] getPropertyChangeListeners( String propertyName)
public synchronized PropertyChangeListener[] getPropertyChangeListeners()
public synchronized PropertyChangeListener[] getPropertyChangeListeners( String propertyName) { EventListenerList list = (EventListenerList) propertyListeners.get(propertyName); if (list == null) return getPropertyChangeListeners(); int size = listeners.getListenerCount() + list.getListe...
EventListenerList list = (EventListenerList) propertyListeners.get(propertyName); if (list == null) return getPropertyChangeListeners(); int size = listeners.getListenerCount() + list.getListenerCount();
List namedListeners = new ArrayList(); Set namedListenerEntries = propertyListeners.entrySet(); Iterator iterator = namedListenerEntries.iterator(); while (iterator.hasNext()) { Map.Entry e = (Map.Entry) iterator.next(); String propertyName = (String) e.getKey(); EventListenerList ell = (EventListenerList) e.getValue()...
public synchronized PropertyChangeListener[] getPropertyChangeListeners( String propertyName) { EventListenerList list = (EventListenerList) propertyListeners.get(propertyName); if (list == null) return getPropertyChangeListeners(); int size = listeners.getListenerCount() + list.getListe...
for (int i = 0; i < listeners.listenerList.length; i += 2) { result[index++] = (PropertyChangeListener) listeners.listenerList[i + 1]; }
for (int i = 0; i < list.length; i += 2) result[index++] = (PropertyChangeListener) list[i + 1];
public synchronized PropertyChangeListener[] getPropertyChangeListeners( String propertyName) { EventListenerList list = (EventListenerList) propertyListeners.get(propertyName); if (list == null) return getPropertyChangeListeners(); int size = listeners.getListenerCount() + list.getListe...
Object[] specificListeners = list.getListenerList(); for (int i = 0; i < specificListeners.length; i += 2) { result[index++] = (PropertyChangeListener) specificListeners[i + 1]; }
Iterator iterator2 = namedListeners.iterator(); while (iterator2.hasNext()) result[index++] = (PropertyChangeListenerProxy) iterator2.next();
public synchronized PropertyChangeListener[] getPropertyChangeListeners( String propertyName) { EventListenerList list = (EventListenerList) propertyListeners.get(propertyName); if (list == null) return getPropertyChangeListeners(); int size = listeners.getListenerCount() + list.getListe...
g.fillRect(clip.x, clip.y, clip.width, clip.height);
g.fillRect(0, 0, c.getWidth(), c.getHeight());
public void update(Graphics g, JComponent c) { if (c.isOpaque()) { g.setColor(c.getBackground()); Rectangle clip = g.getClipBounds(); g.fillRect(clip.x, clip.y, clip.width, clip.height); } paint(g, c); }
public FileArgument(String name, String description) { super(name, description, SINGLE);
public FileArgument(String name, String description, boolean multi) { super(name, description, multi);
public FileArgument(String name, String description) { super(name, description, SINGLE); }
public void setIndeterminate(boolean newValue)
public void setIndeterminate(boolean flag)
public void setIndeterminate(boolean newValue) { if (indeterminate != newValue) { boolean olddeter = indeterminate; indeterminate = newValue; firePropertyChange("indeterminate", olddeter, indeterminate); } }
if (indeterminate != newValue)
if (indeterminate != flag)
public void setIndeterminate(boolean newValue) { if (indeterminate != newValue) { boolean olddeter = indeterminate; indeterminate = newValue; firePropertyChange("indeterminate", olddeter, indeterminate); } }
boolean olddeter = indeterminate; indeterminate = newValue; firePropertyChange("indeterminate", olddeter, indeterminate);
indeterminate = flag; firePropertyChange("indeterminate", !flag, indeterminate);
public void setIndeterminate(boolean newValue) { if (indeterminate != newValue) { boolean olddeter = indeterminate; indeterminate = newValue; firePropertyChange("indeterminate", olddeter, indeterminate); } }
Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); calcRect = tr.union(ir);
Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); height = tr.union(ir).height;
protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle t...
calcRect.height = fontHeight;
height = fontHeight;
protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle t...
calcRect.height += insets.top + insets.bottom; return calcRect.height;
height += insets.top + insets.bottom; return height;
protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle t...
Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); calcRect = tr.union(ir);
Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); width = tr.union(ir).width;
protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangl...
calcRect.width = metrics.stringWidth(tabPane.getTitleAt(tabIndex));
width = metrics.stringWidth(tabPane.getTitleAt(tabIndex));
protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangl...
calcRect.width += insets.left + insets.right; return calcRect.width;
width += insets.left + insets.right; return width;
protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangl...
protected Rectangle getTabBounds(int tabIndex, Rectangle dest)
public Rectangle getTabBounds(JTabbedPane pane, int i)
protected Rectangle getTabBounds(int tabIndex, Rectangle dest) { dest.setBounds(getTabBounds(tabPane, tabIndex)); return dest; }
dest.setBounds(getTabBounds(tabPane, tabIndex)); return dest;
return rects[i];
protected Rectangle getTabBounds(int tabIndex, Rectangle dest) { dest.setBounds(getTabBounds(tabPane, tabIndex)); return dest; }
Insets insets = getInsets(); int w = defaultSize + insets.left + insets.right; int h = defaultSize + insets.top + insets.bottom; return new Dimension(w, h);
return PREFERRED_SIZE;
public Dimension getPreferredSize() { Insets insets = getInsets(); int w = defaultSize + insets.left + insets.right; int h = defaultSize + insets.top + insets.bottom; return new Dimension(w, h); }
if ((path == null) || (treeModel.isLeaf(path.getLastPathComponent())))
if (path == null)
public void expandPath(TreePath path) { // Don't expand if last path component is a leaf node. if ((path == null) || (treeModel.isLeaf(path.getLastPathComponent()))) return; try { fireTreeWillExpand(path); } catch (ExpandVetoException ev) { // We do nothing if attempt ha...
setSelectionPath(temp);
revalidate(); repaint();
public void scrollPathToVisible(TreePath path) { if (path == null) return; Object[] oPath = path.getPath(); TreePath temp = new TreePath(oPath[0]); boolean stop = false; int i = 1; while (!stop) { while (isVisible(temp)) if (i < oPath.length) temp = temp.pathByA...
public DefaultTreeModel(TreeNode root, boolean asksAllowsChildren)
public DefaultTreeModel(TreeNode root)
public DefaultTreeModel(TreeNode root, boolean asksAllowsChildren) { setRoot(root); this.asksAllowsChildren = asksAllowsChildren; }
this.asksAllowsChildren = asksAllowsChildren;
public DefaultTreeModel(TreeNode root, boolean asksAllowsChildren) { setRoot(root); this.asksAllowsChildren = asksAllowsChildren; }
protected URLConnection(URL url) { this.url = url; allowUserInteraction = def_allow_user_inter; useCaches = def_use_caches; req_props = new Hashtable(def_req_props); }
protected URLConnection(URL url) { this.url = url; allowUserInteraction = defaultAllowUserInteraction; useCaches = defaultUseCaches; }
protected URLConnection(URL url) { // Set up all our instance variables this.url = url; allowUserInteraction = def_allow_user_inter; useCaches = def_use_caches; req_props = new Hashtable(def_req_props); }
public boolean getAllowUserInteraction() { return (allowUserInteraction);
public boolean getAllowUserInteraction() { return allowUserInteraction;
public boolean getAllowUserInteraction() { return (allowUserInteraction); }
public Object getContent() throws IOException { String type = getContentType();
public Object getContent() throws IOException { if (!connected) connect();
public Object getContent() throws IOException { // connect(); String type = getContentType(); // First try the factory ContentHandler ch = null; if (factory != null) ch = factory.createContentHandler(type); if (ch != null) return (ch.getContent(this)); // Then try our default class try { Class cls = Cla...
ContentHandler ch = null; if (factory != null) ch = factory.createContentHandler(type);
String type = getContentType(); ContentHandler ch = getContentHandler(type);
public Object getContent() throws IOException { // connect(); String type = getContentType(); // First try the factory ContentHandler ch = null; if (factory != null) ch = factory.createContentHandler(type); if (ch != null) return (ch.getContent(this)); // Then try our default class try { Class cls = Cla...
if (ch != null) return (ch.getContent(this));
if (ch != null) return ch.getContent(this);
public Object getContent() throws IOException { // connect(); String type = getContentType(); // First try the factory ContentHandler ch = null; if (factory != null) ch = factory.createContentHandler(type); if (ch != null) return (ch.getContent(this)); // Then try our default class try { Class cls = Cla...
try { Class cls = Class.forName("gnu.java.net.content." + type.replace('/', '.')); Object obj = cls.newInstance(); if (!(obj instanceof ContentHandler)) throw new UnknownServiceException(type); ch = (ContentHandler) obj; return (ch.getContent(this)); } catch (ClassNotFoundException e) { } catch (InstantiationExcepti...
return getInputStream(); }
public Object getContent() throws IOException { // connect(); String type = getContentType(); // First try the factory ContentHandler ch = null; if (factory != null) ch = factory.createContentHandler(type); if (ch != null) return (ch.getContent(this)); // Then try our default class try { Class cls = Cla...
public String getContentEncoding() { return (getHeaderField("content-encoding"));
public String getContentEncoding() { return getHeaderField("content-encoding");
public String getContentEncoding() { return (getHeaderField("content-encoding")); }