rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
float myMaxRight = children[i].maximum - myMinLeft;
float myMaxRight = children[i].maximum - myMaxLeft;
getAlignedSizeRequirements(SizeRequirements[] children) { float minLeft = 0; float minRight = 0; float prefLeft = 0; float prefRight = 0; float maxLeft = 0; float maxRight = 0; for (int i = 0; i < children.length; i++) { float myMinLeft = children[i].minimum * children[i].alignment; ...
return new SizeRequirements(minSize, prefSize, maxSize, 0.5F);
float align = prefLeft / (prefRight + prefLeft); if (Float.isNaN(align)) align = 0; return new SizeRequirements(minSize, prefSize, maxSize, align);
getAlignedSizeRequirements(SizeRequirements[] children) { float minLeft = 0; float minRight = 0; float prefLeft = 0; float prefRight = 0; float maxLeft = 0; float maxRight = 0; for (int i = 0; i < children.length; i++) { float myMinLeft = children[i].minimum * children[i].alignment; ...
public Deflater(int lvl, boolean nowrap)
public Deflater()
public Deflater(int lvl, boolean nowrap) { if (lvl == DEFAULT_COMPRESSION) lvl = 6; else if (lvl < NO_COMPRESSION || lvl > BEST_COMPRESSION) throw new IllegalArgumentException(); pending = new DeflaterPending(); engine = new DeflaterEngine(pending); this.noHeader = nowrap; setStrategy(DEF...
if (lvl == DEFAULT_COMPRESSION) lvl = 6; else if (lvl < NO_COMPRESSION || lvl > BEST_COMPRESSION) throw new IllegalArgumentException(); pending = new DeflaterPending(); engine = new DeflaterEngine(pending); this.noHeader = nowrap; setStrategy(DEFAULT_STRATEGY); setLevel(lvl); reset();
this(DEFAULT_COMPRESSION, false);
public Deflater(int lvl, boolean nowrap) { if (lvl == DEFAULT_COMPRESSION) lvl = 6; else if (lvl < NO_COMPRESSION || lvl > BEST_COMPRESSION) throw new IllegalArgumentException(); pending = new DeflaterPending(); engine = new DeflaterEngine(pending); this.noHeader = nowrap; setStrategy(DEF...
public DeflaterOutputStream(OutputStream out, Deflater defl, int bufsize)
public DeflaterOutputStream(OutputStream out)
public DeflaterOutputStream(OutputStream out, Deflater defl, int bufsize) { super(out); if (bufsize <= 0) throw new IllegalArgumentException("bufsize <= 0"); buf = new byte[bufsize]; def = defl; }
super(out); if (bufsize <= 0) throw new IllegalArgumentException("bufsize <= 0"); buf = new byte[bufsize]; def = defl;
this(out, new Deflater(), 4096);
public DeflaterOutputStream(OutputStream out, Deflater defl, int bufsize) { super(out); if (bufsize <= 0) throw new IllegalArgumentException("bufsize <= 0"); buf = new byte[bufsize]; def = defl; }
public void write(byte[] buf, int off, int len) throws IOException
public void write(int bval) throws IOException
public void write(byte[] buf, int off, int len) throws IOException { def.setInput(buf, off, len); deflate(); }
def.setInput(buf, off, len); deflate();
byte[] b = new byte[1]; b[0] = (byte) bval; write(b, 0, 1);
public void write(byte[] buf, int off, int len) throws IOException { def.setInput(buf, off, len); deflate(); }
computeFields();
public void setTimeInMillis(long time) { this.time = time; isTimeSet = true; computeFields(); }
public final void set(int year, int month, int date)
public void set(int field, int value)
public final void set(int year, int month, int date) { isTimeSet = false; fields[YEAR] = year; fields[MONTH] = month; fields[DATE] = date; isSet[YEAR] = isSet[MONTH] = isSet[DATE] = true; isSet[WEEK_OF_YEAR] = false; isSet[DAY_OF_YEAR] = false; isSet[WEEK_OF_MONTH] = false; isSet[DAY_OF_WEEK] = false; isSe...
fields[YEAR] = year; fields[MONTH] = month; fields[DATE] = date; isSet[YEAR] = isSet[MONTH] = isSet[DATE] = true; isSet[WEEK_OF_YEAR] = false; isSet[DAY_OF_YEAR] = false; isSet[WEEK_OF_MONTH] = false; isSet[DAY_OF_WEEK] = false; isSet[DAY_OF_WEEK_IN_MONTH] = false;
fields[field] = value; isSet[field] = true; switch (field) { case YEAR: case MONTH: case DATE: isSet[WEEK_OF_YEAR] = false; isSet[DAY_OF_YEAR] = false; isSet[WEEK_OF_MONTH] = false; isSet[DAY_OF_WEEK] = false; isSet[DAY_OF_WEEK_IN_MONTH] = false; break; case AM_PM: isSet[HOUR_OF_DAY] = false; break; case HOUR_OF_DAY: i...
public final void set(int year, int month, int date) { isTimeSet = false; fields[YEAR] = year; fields[MONTH] = month; fields[DATE] = date; isSet[YEAR] = isSet[MONTH] = isSet[DATE] = true; isSet[WEEK_OF_YEAR] = false; isSet[DAY_OF_YEAR] = false; isSet[WEEK_OF_MONTH] = false; isSet[DAY_OF_WEEK] = false; isSe...
if (subURL.equals(baseURL)) continue;
private void initialize() { JarFile jarfile = null; try { jarfile = ((JarURLConnection) baseJarURL.openConnection()).getJarFile(); Manifest manifest; Attributes attributes; String classPathString; IndexListParser parser = new IndexListParser(jarfile, bas...
else { clearAll(); }
public IndexListParser(JarFile jarfile, URL baseJarURL, URL baseURL) { try { // Parse INDEX.LIST if it exists if (jarfile.getEntry(JAR_INDEX_FILE) != null) { BufferedReader br = new BufferedReader(new InputStreamReader(new URL(baseJarURL, ...
if (container != parent) throw new AWTError("BoxLayout can't be shared");
public void invalidateLayout(Container parent) { synchronized (container.getTreeLock()) { xChildren = null; yChildren = null; xTotal = null; yTotal = null; offsetsX = null; offsetsY = null; spansX = null; spansY = null; } }
return new Dimension(xTotal.maximum, yTotal.maximum);
Insets i = container.getInsets(); return new Dimension(xTotal.maximum + i.left + i.right, yTotal.maximum + i.top + i.bottom);
public Dimension maximumLayoutSize(Container parent) { synchronized (container.getTreeLock()) { if (container != parent) throw new AWTError("BoxLayout can't be shared"); checkTotalRequirements(); return new Dimension(xTotal.maximum, yTotal.maximum); } }
return new Dimension(xTotal.minimum, yTotal.minimum);
Insets i = container.getInsets(); return new Dimension(xTotal.minimum + i.left + i.right, yTotal.minimum + i.top + i.bottom);
public Dimension minimumLayoutSize(Container parent) { synchronized (container.getTreeLock()) { if (container != parent) throw new AWTError("BoxLayout can't be shared"); checkTotalRequirements(); return new Dimension(xTotal.minimum, yTotal.minimum); } }
public abstract void setDirectory(String dir);
void setDirectory (String dir);
public abstract void setDirectory(String dir);
public abstract void setFile(String file);
void setFile (String file);
public abstract void setFile(String file);
public abstract void setFilenameFilter(FilenameFilter ff);
void setFilenameFilter (FilenameFilter ff);
public abstract void setFilenameFilter(FilenameFilter ff);
public final Class getCategory()
public Class getCategory()
public final Class getCategory() { return MultipleDocumentHandling.class; }
public final String getName()
public String getName()
public final String getName() { return "multiple-document-handling"; }
public abstract BeanInfo[] getAdditionalBeanInfo();
BeanInfo[] getAdditionalBeanInfo();
public abstract BeanInfo[] getAdditionalBeanInfo();
public abstract BeanDescriptor getBeanDescriptor();
BeanDescriptor getBeanDescriptor();
public abstract BeanDescriptor getBeanDescriptor();
public abstract int getDefaultEventIndex();
int getDefaultEventIndex();
public abstract int getDefaultEventIndex();
public abstract int getDefaultPropertyIndex();
int getDefaultPropertyIndex();
public abstract int getDefaultPropertyIndex();
public abstract EventSetDescriptor[] getEventSetDescriptors();
EventSetDescriptor[] getEventSetDescriptors();
public abstract EventSetDescriptor[] getEventSetDescriptors();
public abstract java.awt.Image getIcon(int iconType);
java.awt.Image getIcon(int iconType);
public abstract java.awt.Image getIcon(int iconType);
public abstract MethodDescriptor[] getMethodDescriptors();
MethodDescriptor[] getMethodDescriptors();
public abstract MethodDescriptor[] getMethodDescriptors();
public abstract PropertyDescriptor[] getPropertyDescriptors();
PropertyDescriptor[] getPropertyDescriptors();
public abstract PropertyDescriptor[] getPropertyDescriptors();
return axis = axis == X_AXIS ? 1 : 0;
return axis == X_AXIS ? 1 : 0;
public int getResizeWeight(int axis) { return axis = axis == X_AXIS ? 1 : 0; }
public VariableReference(XPathVariableResolver resolver, String name)
public VariableReference(XPathVariableResolver resolver, QName name)
public VariableReference(XPathVariableResolver resolver, String name) { this.resolver = resolver; this.name = name; }
QName qname = QName.valueOf(name); return resolver.resolveVariable(qname);
return resolver.resolveVariable(name);
public Object evaluate(Node context, int pos, int len) { if (resolver != null) { if (resolver instanceof Bindings) { // Needs context to operate properly return ((Bindings) resolver).get(name, context, pos, len); } QName qname = QName.valueOf(name); ...
return "$" + name;
StringBuffer buf = new StringBuffer("$"); String prefix = name.getPrefix(); if (prefix != null && !"".equals(prefix)) { buf.append(prefix); buf.append(':'); } buf.append(name.getLocalPart()); return buf.toString();
public String toString() { return "$" + name; }
public static <T> int binarySearch(List<? extends T> l, T key, Comparator<? super T> c)
int binarySearch(List<? extends T> l, T key)
public static <T> int binarySearch(List<? extends T> l, T key, Comparator<? super T> c) { int pos = 0; int low = 0; int hi = l.size() - 1; // We use a linear search with log(n) comparisons using an iterator // if the list is sequential-access. if (isSequential(l)) { ListIterator<T> itr...
int pos = 0; int low = 0; int hi = l.size() - 1; if (isSequential(l)) { ListIterator<T> itr = ((List<T>) l).listIterator(); int i = 0; T o = itr.next(); boolean forward = true; while (low <= hi) { pos = (low + hi) >> 1; if (i < pos) { if (!forward) itr.next(); for ( ; i != pos; i++, o = itr.next()); forward = true; ...
return binarySearch(l, key, null);
public static <T> int binarySearch(List<? extends T> l, T key, Comparator<? super T> c) { int pos = 0; int low = 0; int hi = l.size() - 1; // We use a linear search with log(n) comparisons using an iterator // if the list is sequential-access. if (isSequential(l)) { ListIterator<T> itr...
public void paintImmediately(Rectangle r) { Component root = this.getRootPane(); if (root == null || ! root.isShowing()) return; Graphics g = root.getGraphics(); if (g == null) return; Rectangle clip = SwingUtilities.convertRectangle(this, r, root); g.setClip(clip); root.paint(g); g.dispose();
public void paintImmediately(int x, int y, int w, int h) { paintImmediately(new Rectangle(x, y, w, h));
public void paintImmediately(Rectangle r) { Component root = this.getRootPane(); if (root == null || ! root.isShowing()) return; Graphics g = root.getGraphics(); if (g == null) return; Rectangle clip = SwingUtilities.convertRectangle(this, r, root); g.setClip(clip); root.paint(g); g.d...
public void setTcpNoDelay(boolean on) throws SocketException { if (impl == null) throw new SocketException("Not connected");
public void setTcpNoDelay(boolean on) throws SocketException { if (isClosed()) throw new SocketException("socket is closed");
public void setTcpNoDelay(boolean on) throws SocketException { if (impl == null) throw new SocketException("Not connected"); impl.setOption(SocketOptions.TCP_NODELAY, new Boolean(on)); }
impl.setOption(SocketOptions.TCP_NODELAY, new Boolean(on));
getImpl().setOption(SocketOptions.TCP_NODELAY, Boolean.valueOf(on));
public void setTcpNoDelay(boolean on) throws SocketException { if (impl == null) throw new SocketException("Not connected"); impl.setOption(SocketOptions.TCP_NODELAY, new Boolean(on)); }
public InetAddress getInetAddress() { if (impl != null) return impl.getInetAddress();
public InetAddress getInetAddress() { if (! isConnected()) return null; try { return getImpl().getInetAddress(); } catch (SocketException e) { }
public InetAddress getInetAddress() { if (impl != null) return impl.getInetAddress(); return null; }
return new HashIterator<V>(VALUES);
return new ValueIterator();
public Collection<V> values() { if (values == null) { // We don't bother overriding many of the optional methods, as doing so // wouldn't provide any significant performance advantage. Collection<V> r = new AbstractCollection<V>() { public int size() { ...
protected void doResolveMember(AbstractVmClassLoader clc) {
protected void doResolveMember(VmClassLoader clc) {
protected void doResolveMember(AbstractVmClassLoader clc) { final VmType vmClass = getConstClass().getResolvedVmClass(); if (vmClass.isInterface()) { throw new IncompatibleClassChangeError(getClassName() + " must be a class"); } final VmMethod vmMethod = vmClass.getMethod(getName(), getSignature()); if (vmMeth...
protected abstract void doResolveMember(AbstractVmClassLoader clc);
protected abstract void doResolveMember(VmClassLoader clc);
protected abstract void doResolveMember(AbstractVmClassLoader clc);
"SpinnerUI", "javax.swing.plaf.basic.BasicSpinnerUI",
protected void initClassDefaults(UIDefaults defaults) { // Variables Object[] uiDefaults; // Initialize Class Defaults uiDefaults = new Object[] { "ButtonUI", "javax.swing.plaf.basic.BasicButtonUI", "CheckBoxMenuItemUI", "javax.swing.plaf.basic.BasicCheckBoxMenuItemUI", "CheckBoxUI", "java...
"notify-field-accept")},
"notify-field-accept"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, InputEvent.SHIFT_DOWN_MASK), "selection-backward"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.SHIFT_DOWN_MASK), "selection-forward"), },
protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; // The default Look and Feel happens to use these three purple shades // extensively. Color lightPurple = new Color(0xCC, 0xCC, 0xFF); Color midPurple = new Color(0x99, 0x99, 0xCC); Color darkPurple = new Color(0x6...
throw new IllegalArgumentException("Unexpected OID: " + algOID);
throw new InvalidParameterException("Unexpected OID: " + algOID);
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger p, g, q, y; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); checkIsConstructed(derSPKI, "Wrong SubjectPubl...
GraphicsEnvironment.setLocalGraphicsEnvironment(new JNodeGraphicsEnvironment());
protected void startPlugin() throws PluginException { AccessController.doPrivileged(new SetPropertyAction("awt.toolkit", TOOLKIT)); VMImageUtils.setAPI(new VMImageAPIImpl(), this); GraphicsEnvironment.setLocalGraphicsEnvironment(new JNodeGraphicsEnvironment()); }
parent = LogManager.getLogManager().rootLogger;
parent = root;
protected Logger(String name, String resourceBundleName) throws MissingResourceException { this.name = name; this.resourceBundleName = resourceBundleName; if (resourceBundleName == null) resourceBundle = null; else resourceBundle = ResourceBundle.getBundle(resourceBundleName); level = nul...
LogManager lm;
public synchronized void setParent(Logger parent) { LogManager lm; /* Throw a new NullPointerException if parent is null. */ parent.getClass(); lm = LogManager.getLogManager(); if (this == lm.rootLogger) throw new IllegalArgumentException( "only the root logger can have a null parent")...
lm = LogManager.getLogManager(); if (this == lm.rootLogger)
if (this == root)
public synchronized void setParent(Logger parent) { LogManager lm; /* Throw a new NullPointerException if parent is null. */ parent.getClass(); lm = LogManager.getLogManager(); if (this == lm.rootLogger) throw new IllegalArgumentException( "only the root logger can have a null parent")...
"only the root logger can have a null parent");
"the root logger can only have a null parent");
public synchronized void setParent(Logger parent) { LogManager lm; /* Throw a new NullPointerException if parent is null. */ parent.getClass(); lm = LogManager.getLogManager(); if (this == lm.rootLogger) throw new IllegalArgumentException( "only the root logger can have a null parent")...
Enumeration enum = properties.elements(); while(enum.hasMoreElements()) { Aproperties[i] = (PropertyDescriptor)enum.nextElement();
Enumeration e = properties.elements(); while (e.hasMoreElements()) { Aproperties[i] = (PropertyDescriptor) e.nextElement();
public BeanInfo getBeanInfo() { int defaultProperty = -1; int defaultEvent = -1; PropertyDescriptor[] Aproperties = new PropertyDescriptor[properties.size()]; int i = 0; Enumeration enum = properties.elements(); while(enum.hasMoreElements()) { Aproperties[i] = (PropertyDescriptor)enum.nextElement(); if(defau...
EventSetDescriptor[] Aevents = new EventSetDescriptor[events.size()]; i = 0; e = events.elements(); while (e.hasMoreElements()) { Aevents[i] = (EventSetDescriptor) e.nextElement(); if(defaultEventName != null && Aevents[i].getName().equals(defaultEventName)) { defaultEvent = i; } i++; } MethodDescriptor[] Amethods = n...
public BeanInfo getBeanInfo() { int defaultProperty = -1; int defaultEvent = -1; PropertyDescriptor[] Aproperties = new PropertyDescriptor[properties.size()]; int i = 0; Enumeration enum = properties.elements(); while(enum.hasMoreElements()) { Aproperties[i] = (PropertyDescriptor)enum.nextElement(); if(defau...
java.awt.Image[] icons) {
Image[] icons) {
public ExplicitBeanInfo(BeanDescriptor beanDescriptor, BeanInfo[] additionalBeanInfo, PropertyDescriptor[] propertyDescriptors, int defaultPropertyIndex, EventSetDescriptor[] eventSetDescriptors, int defaultEventIndex, ...
public void redo() throws CannotRedoException { if (canRedo() == false) { throw new CannotRedoException(); } hasBeenDone = true; }
public void redo() throws CannotRedoException { if (!canRedo()) throw new CannotRedoException(); hasBeenDone = true; }
public void redo() throws CannotRedoException { if (canRedo() == false) { throw new CannotRedoException(); } hasBeenDone = true; } // redo()
public void undo() throws CannotUndoException { if (canUndo() == false) { throw new CannotUndoException(); } hasBeenDone = false; }
public void undo() throws CannotUndoException { if (!canUndo()) throw new CannotUndoException(); hasBeenDone = false; }
public void undo() throws CannotUndoException { if (canUndo() == false) { throw new CannotUndoException(); } hasBeenDone = false; } // undo()
public abstract void setLineIncrement(int inc);
void setLineIncrement(int inc);
public abstract void setLineIncrement(int inc);
public abstract void setPageIncrement(int inc);
void setPageIncrement(int inc);
public abstract void setPageIncrement(int inc);
public abstract void setValues(int value, int visible, int min, int max);
void setValues(int value, int visible, int min, int max);
public abstract void setValues(int value, int visible, int min, int max);
tk = ((ClasspathToolkit) Toolkit.getDefaultToolkit ()); return tk.getLocalGraphicsEnvironment ();
tk = ((ClasspathToolkit) Toolkit.getDefaultToolkit()); localGraphicsEnvironment = tk.getLocalGraphicsEnvironment(); return localGraphicsEnvironment; }
public static GraphicsEnvironment getLocalGraphicsEnvironment() { ClasspathToolkit tk; tk = ((ClasspathToolkit) Toolkit.getDefaultToolkit ()); return tk.getLocalGraphicsEnvironment (); }
throw new Error("Cannot set layout. Use getContentPane().setLayout() instead.");
throw new Error("Cannot set layout. Use getContentPane().setLayout()" + " instead."); getContentPane().setLayout(manager); } else
public void setLayout(LayoutManager manager) { if (isRootPaneCheckingEnabled()) throw new Error("Cannot set layout. Use getContentPane().setLayout() instead."); super.setLayout(manager); }
else getContentPane().remove(comp);
public void remove(Component comp) { super.remove(comp); }
public JColorChooser() {
public JColorChooser() { this(new DefaultColorSelectionModel());
public JColorChooser() { // TODO } // JColorChooser()
public void addChooserPanel(AbstractColorChooserPanel panel) {
public void addChooserPanel(AbstractColorChooserPanel panel) { if (panel == null) return; AbstractColorChooserPanel[] old = chooserPanels; AbstractColorChooserPanel[] newPanels = new AbstractColorChooserPanel[(old == null) ? 1 : old.length + 1]; if (old != null) System.arraycopy(old, 0, newPanels, 0, old.length); newPa...
public void addChooserPanel(AbstractColorChooserPanel panel) { // TODO } // addChooserPanel()
ActionListener okListener, ActionListener cancelListener) { return null;
ActionListener okListener, ActionListener cancelListener) { Component parent = findParent(component); if (parent == null) throw new AWTError("No suitable parent found for Component."); JDialog dialog; if (parent instanceof Frame) dialog = new ModalDialog((Frame) parent, title); else dialog = new ModalDialog((Dialog) pa...
public static JDialog createDialog(Component component, String title, boolean modal, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener) { return null; // TODO } // createDialog()
public AbstractColorChooserPanel[] getChooserPanels() { return null;
public AbstractColorChooserPanel[] getChooserPanels() { return chooserPanels;
public AbstractColorChooserPanel[] getChooserPanels() { return null; // TODO } // getChooserPanels()
public Color getColor() { return null;
public Color getColor() { return selectionModel.getSelectedColor();
public Color getColor() { return null; // TODO } // getColor()
public JComponent getPreviewPanel() { return null;
public JComponent getPreviewPanel() { return previewPanel;
public JComponent getPreviewPanel() { return null; // TODO } // getPreviewPanel()
public ColorSelectionModel getSelectionModel() { return null;
public ColorSelectionModel getSelectionModel() { return selectionModel;
public ColorSelectionModel getSelectionModel() { return null; // TODO } // getSelectionModel()
public String getUIClassID() { return uiClassID;
public String getUIClassID() { return "ColorChooserUI";
public String getUIClassID() { return uiClassID; } // getUIClassID()
protected String paramString() { return null;
protected String paramString() { return "JColorChooser";
protected String paramString() { return null; // TODO } // paramString()
public AbstractColorChooserPanel removeChooserPanel( AbstractColorChooserPanel panel) { return null; }
public AbstractColorChooserPanel removeChooserPanel(AbstractColorChooserPanel panel) { int index = -1; for (int i = 0; i < chooserPanels.length; i++) if (panel == chooserPanels[i]) { index = i; break; } if (index == -1) return null; AbstractColorChooserPanel[] old = chooserPanels; if (chooserPanels.length == 1) choos...
public AbstractColorChooserPanel removeChooserPanel( AbstractColorChooserPanel panel) { return null; // TODO } // removeChooserPanel()
public void setChooserPanels(AbstractColorChooserPanel[] panels) {
public void setChooserPanels(AbstractColorChooserPanel[] panels) { if (panels != chooserPanels) { if (chooserPanels != null) for (int i = 0; i < chooserPanels.length; i++) if (chooserPanels[i] != null) chooserPanels[i].uninstallChooserPanel(this); AbstractColorChooserPanel[] old = chooserPanels; chooserPanels = panels...
public void setChooserPanels(AbstractColorChooserPanel[] panels) { // TODO } // setChooserPanels()
public void setColor(Color color) {
public void setColor(Color color) { if (color != null) selectionModel.setSelectedColor(color);
public void setColor(Color color) { // TODO } // setColor()
public void setPreviewPanel(JComponent component) {
public void setPreviewPanel(JComponent component) { if (component != previewPanel) { JComponent old = previewPanel; previewPanel = component; firePropertyChange(PREVIEW_PANEL_PROPERTY, old, previewPanel); }
public void setPreviewPanel(JComponent component) { // TODO } // setPreviewPanel()
public void setSelectionModel(ColorSelectionModel model) {
public void setSelectionModel(ColorSelectionModel model) { if (model == null) throw new AWTError("ColorSelectionModel is not allowed to be null."); selectionModel = model;
public void setSelectionModel(ColorSelectionModel model) { // TODO } // setSelectionModel()
Color initial) { return null;
Color initial) { JColorChooser choose = new JColorChooser(initial); JDialog dialog = createDialog(component, title, true, choose, null, null); dialog.getContentPane().add(choose); dialog.pack(); dialog.show(); return choose.getColor();
public static Color showDialog(Component component, String title, Color initial) { return null; // TODO } // showDialog()
public void updateUI() { setUI((ColorChooserUI) UIManager.get(this)); invalidate();
public void updateUI() { setUI((ColorChooserUI) UIManager.getUI(this)); revalidate();
public void updateUI() { setUI((ColorChooserUI) UIManager.get(this)); invalidate(); } // updateUI()
public JDialog(Frame owner, String title) { this(owner, title, false, null); }
public JDialog() { this(SwingUtilities.getOwnerFrame(), "", false, null); }
public JDialog(Frame owner, String title) { this(owner, title, false, null); }
public void installChooserPanel(JColorChooser chooser) {
public void installChooserPanel(JColorChooser chooser) { this.chooser = chooser; buildChooser();
public void installChooserPanel(JColorChooser chooser) { // TODO } // installChooserPanel()
public void uninstallChooserPanel(JColorChooser chooser) {
public void uninstallChooserPanel(JColorChooser chooser) { this.chooser = null;
public void uninstallChooserPanel(JColorChooser chooser) { // TODO } // uninstallChooserPanel()
if (highlightEntry == null) highlightEntry = highlighter.addHighlight(0, 0, getSelectionPainter()); else
if (highlightEntry != null)
private void clearHighlight() { Highlighter highlighter = textComponent.getHighlighter(); if (highlighter == null) return; if (selectionVisible) { try { if (highlightEntry == null) highlightEntry = highlighter.addHighlight(0, 0, getSelectionPainter()); else ...
public String paramString()
protected String paramString()
public String paramString() { StringBuffer sb = new StringBuffer(super.paramString()); sb.append(",fixedCellHeight=").append(getFixedCellHeight()); sb.append(",fixedCellWidth=").append(getFixedCellWidth()); sb.append(",selectionBackground="); if (getSelectionBackground() != null) sb.append(getSel...
revalidate(); repaint();
protected void addImpl(Component comp, Object layerConstraint, int index) { Integer layer; if (layerConstraint != null && layerConstraint instanceof Integer) layer = (Integer) layerConstraint; else if (componentToLayer.containsKey (comp)) layer = (Integer) componentToLayer.remove (comp); ...
return getPreferredSize(c);
return new Dimension(Short.MAX_VALUE, Short.MAX_VALUE);
public Dimension getMaximumSize(JComponent c) { return getPreferredSize(c); }
if (getSelectedIndex() != -1)
if (getSelectedIndex() != -1 && getSelectedComponent() != null)
public void setSelectedIndex(int index) { checkIndex(index, -1, tabs.size()); if (index != getSelectedIndex()) { if (getSelectedIndex() != -1) getSelectedComponent().hide(); if (index != -1) getComponentAt(index).show(); } model.setSelectedIndex(index); }
if (index != -1)
if (index != -1 && getComponentAt(index) != null)
public void setSelectedIndex(int index) { checkIndex(index, -1, tabs.size()); if (index != getSelectedIndex()) { if (getSelectedIndex() != -1) getSelectedComponent().hide(); if (index != -1) getComponentAt(index).show(); } model.setSelectedIndex(index); }
}
public void setSelectedIndex(int index) { checkIndex(index, -1, tabs.size()); if (index != getSelectedIndex()) { if (getSelectedIndex() != -1) getSelectedComponent().hide(); if (index != -1) getComponentAt(index).show(); } model.setSelectedIndex(index); }
}
public void setSelectedIndex(int index) { checkIndex(index, -1, tabs.size()); if (index != getSelectedIndex()) { if (getSelectedIndex() != -1) getSelectedComponent().hide(); if (index != -1) getComponentAt(index).show(); } model.setSelectedIndex(index); }
return new Dimension(getIcon().getIconWidth(), getIcon().getIconHeight());
Insets insets = getInsets(); int w = defaultSize + insets.left + insets.right; int h = defaultSize + insets.top + insets.bottom; return new Dimension(w, h);
public Dimension getPreferredSize() { return new Dimension(getIcon().getIconWidth(), getIcon().getIconHeight()); }
Polygon arrow = getArrow(dir, 10); if (getIcon() == null) setIcon(new arrowIcon(arrow)); else ((arrowIcon) getIcon()).setArrow(arrow);
public void setDirection(int dir) { Polygon arrow = getArrow(dir, 10); if (getIcon() == null) setIcon(new arrowIcon(arrow)); else ((arrowIcon) getIcon()).setArrow(arrow); this.direction = dir; }
public Rectangle2D getBounds2D() { float nx1 = Math.min(Math.min(x1, ctrlx), x2); float ny1 = Math.min(Math.min(y1, ctrly), y2); float nx2 = Math.max(Math.max(x1, ctrlx), x2); float ny2 = Math.max(Math.max(y1, ctrly), y2);
public Rectangle2D getBounds2D() { float nx1 = (float) Math.min(Math.min(x1, ctrlx), x2); float ny1 = (float) Math.min(Math.min(y1, ctrly), y2); float nx2 = (float) Math.max(Math.max(x1, ctrlx), x2); float ny2 = (float) Math.max(Math.max(y1, ctrly), y2);
public Rectangle2D getBounds2D() { float nx1 = Math.min(Math.min(x1, ctrlx), x2); float ny1 = Math.min(Math.min(y1, ctrly), y2); float nx2 = Math.max(Math.max(x1, ctrlx), x2); float ny2 = Math.max(Math.max(y1, ctrly), y2); return new Rectangle2D.Float(nx1, ny1, nx2 - nx1, ny2 - ny1); }
public boolean contains(double x, double y) { int crossings = 0; double x1 = getX1(); double y1 = getY1(); double x2 = getX2(); double y2 = getY2(); double dy = y2 - y1; if ((dy > 0.0 && y >= y1 && y <= y2) || (dy < 0.0 && y <= y1 && y >= y2)) { if (x <= x1 + (y - y1) * (x2 - x1) / dy) { crossings++; } } double ctr...
public boolean contains(double x, double y) { throw new Error("not implemented");
public boolean contains(double x, double y) { // We count the "Y" crossings to determine if the point is // inside the curve bounded by its closing line. int crossings = 0; double x1 = getX1(); double y1 = getY1(); double x2 = getX2(); double y2 = getY2(); // First check for a crossing of the line connecting t...
public static double getFlatness(double x1, double y1, double cx, double cy, double x2, double y2) { return Math.sqrt(getFlatnessSq(x1, y1, cx, cy, x2, y2));
public static double getFlatness(double x1, double y1, double cx, double cy, double x2, double y2) { return Line2D.ptSegDist(x1, y1, x2, y2, cx, cy);
public static double getFlatness(double x1, double y1, double cx, double cy, double x2, double y2) { return Math.sqrt(getFlatnessSq(x1, y1, cx, cy, x2, y2)); }
private int current;
private int current = 0;
public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public void next() { current++; } public int curr...
public boolean isDone() { return current < 2;
public boolean isDone() { return current >= 2;
public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public void next() { current++; } public int curr...
public int currentSegment(float[] coords) { if (current == 0) {
public int currentSegment(float[] coords) { int result; switch (current) { case 0:
public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public void next() { current++; } public int curr...
if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) {
result = SEG_MOVETO; break; case 1:
public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public void next() { current++; } public int curr...
return SEG_QUADTO; } throw new NoSuchElementException("quad iterator out of bounds");
return result;
public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public void next() { current++; } public int curr...
public int currentSegment(double[] coords) { if (current == 0) {
public int currentSegment(double[] coords) { int result; switch (current) { case 0:
public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public void next() { current++; } public int curr...
public int currentSegment(float[] coords) { if (current == 0) {
public int currentSegment(float[] coords) { int result; switch (current) { case 0:
public int currentSegment(float[] coords) { if (current == 0) { coords[0] = (float) getX1(); coords[1] = (float) getY1(); if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) { coords[0] = (float) getCtrlX(); coords[1] = (float) getCtrlY(...