rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
protected FontMetrics(Font font) {
FontMetrics(Font font) {
protected FontMetrics(Font font) { this.font = font; }
public int bytesWidth(byte buf[], int offset, int len) {
bytesWidth(byte buf[], int offset, int len) {
public int bytesWidth(byte buf[], int offset, int len) { int total_width = 0; for (int i = offset; i < len; i++) total_width = charWidth((char) buf[i]); return (total_width); }
public int charWidth(int ch) { return (charWidth((char) ch)); }
charWidth(int ch) { return(charWidth((char)ch)); }
public int charWidth(int ch) { return (charWidth((char) ch)); }
public int charsWidth(char buf[], int offset, int len) {
charsWidth(char buf[], int offset, int len) {
public int charsWidth(char buf[], int offset, int len) { int total_width = 0; for (int i = offset; i < len; i++) total_width = charWidth(buf[i]); return (total_width); }
total_width = charWidth(buf[i]); return (total_width); }
total_width += charWidth(buf[i]); return(total_width); }
public int charsWidth(char buf[], int offset, int len) { int total_width = 0; for (int i = offset; i < len; i++) total_width = charWidth(buf[i]); return (total_width); }
public int getAscent() { return (1); }
getAscent() { return(1); }
public int getAscent() { return (1); }
public int getDescent() { return (1); }
getDescent() { return(1); }
public int getDescent() { return (1); }
public Font getFont() { return (font); }
getFont() { return(font); }
public Font getFont() { return (font); }
public int getHeight() { return (getAscent() + getDescent() + getLeading()); }
getHeight() { return(getAscent() + getDescent() + getLeading()); }
public int getHeight() { return (getAscent() + getDescent() + getLeading()); }
public int getLeading() { return (0); }
getLeading() { return(0); }
public int getLeading() { return (0); }
public int getMaxAdvance() { return (-1); }
getMaxAdvance() { return(-1); }
public int getMaxAdvance() { return (-1); }
public int getMaxAscent() { return (getAscent()); }
getMaxAscent() { return(getAscent()); }
public int getMaxAscent() { return (getAscent()); }
public int getMaxDecent() { return (getMaxDescent()); }
getMaxDecent() { return getDescent (); }
public int getMaxDecent() { return (getMaxDescent()); }
public int getMaxDescent() { return (getDescent()); }
getMaxDescent() { return getMaxDecent (); }
public int getMaxDescent() { return (getDescent()); }
public int[] getWidths() { return (new int[256]);
getWidths() { int [] result = new int[256]; for(char i = 0; i < 256; i++) { result[i]= charWidth(i);
public int[] getWidths() { return (new int[256]); }
return(result); }
public int[] getWidths() { return (new int[256]); }
public int stringWidth(String str) {
stringWidth(String str) {
public int stringWidth(String str) { char[] buf = new char[str.length()]; str.getChars(0, str.length(), buf, 0); return (charsWidth(buf, 0, buf.length)); }
public String toString() { return (this.getClass() + "[font=" + font + ",ascent=" + getAscent() + ",descent=" + getDescent() + ",height=" + getHeight() + "]"); }
toString() { return (this.getClass() + "[font=" + font + ",ascent=" + getAscent() + ",descent=" + getDescent() + ",height=" + getHeight() + "]"); }
public String toString() { return (this.getClass() + "[font=" + font + ",ascent=" + getAscent() + ",descent=" + getDescent() + ",height=" + getHeight() + "]"); }
this(null, null);
this(null, null, false);
public JRadioButton() { this(null, null); }
return null;
if (accessibleContext == null) { accessibleContext = new AccessibleJRadioButton(); } return accessibleContext;
public AccessibleContext getAccessibleContext() { //Gets the AccessibleContext associated with this JRadioButton. return null; }
if (index0 == -1 || index1 == -1) return;
public void addSelectionInterval(int index0, int index1) { int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); oldSel = sel.clone(); if (selectionMode == SINGLE_SELECTION) setSelectionInterval(index0, index1); // COMPAT: Like Sun (but not like IBM), we allow calls to // add...
if (index0 == -1 || index1 == -1) return;
public void removeSelectionInterval(int index0, int index1) { oldSel = sel.clone(); int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); // if selectionMode is SINGLE_INTERVAL_SELECTION and removing the interval // (index0,index1) would leave...
if (index0 == -1 || index1 == -1) return;
public void setSelectionInterval(int index0, int index1) { oldSel = sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelection...
PlainDocument()
public PlainDocument()
PlainDocument() { super(new GapContent()); }
super(new GapContent()); }
this(new GapContent()); }
PlainDocument() { super(new GapContent()); }
SizeRequirements[] getChildRequirements(int axis)
private SizeRequirements[] getChildRequirements(int axis)
SizeRequirements[] getChildRequirements(int axis) { // Allocate SizeRequirements for each child view. int count = getViewCount(); SizeRequirements[] childReqs = new SizeRequirements[count]; for (int i = 0; i < count; ++i) { View view = getView(i); childReqs[i] = new SizeRequirements((i...
if (axis == X_AXIS) return offsetsX[childIndex]; else return offsetsY[childIndex];
if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException("Illegal axis argument"); return offsets[axis][childIndex];
protected int getOffset(int axis, int childIndex) { if (axis == X_AXIS) return offsetsX[childIndex]; else return offsetsY[childIndex]; }
setSize(bounds.width, bounds.height);
layout(bounds.width, bounds.height);
public Shape modelToView(int pos, Shape a, Position.Bias bias) throws BadLocationException { // Make sure everything is allocated properly and then call super if (!isAllocationValid()) { Rectangle bounds = a.getBounds(); setSize(bounds.width, bounds.height); } return super.model...
public int getDecayTime()
public final int getDecayTime()
public int getDecayTime() { return decayTime; }
public int getEarlyReflectionDelay()
public final int getEarlyReflectionDelay()
public int getEarlyReflectionDelay() { return earlyReflectionDelay; }
public float getEarlyReflectionIntensity()
public final float getEarlyReflectionIntensity()
public float getEarlyReflectionIntensity() { return earlyReflectionIntensity; }
public int getLateReflectionDelay()
public final int getLateReflectionDelay()
public int getLateReflectionDelay() { return lateReflectionDelay; }
public float getLateReflectionIntensity()
public final float getLateReflectionIntensity()
public float getLateReflectionIntensity() { return lateReflectionIntensity; }
public String toString()
public final String toString()
public String toString() { return ("name=" + name + "; earlyReflectionDelay=" + earlyReflectionDelay + "; earlyReflectionIntensity=" + earlyReflectionIntensity + "; lateReflectionDelay=" + lateReflectionDelay + "; lateReflectionIntensity=" + lateReflectionIntensity + "; decayTime=" + decayTime); ...
this( null, LogManager.getIntProperty("java.util.logging.FileHandler.limit", 0), LogManager.getIntProperty("java.util.logging.FileHandler.count", 1), LogManager.getBooleanProperty("java.util.logging.FileHandler.append", false));
this(LogManager.getLogManager().getProperty(PATTERN_KEY), LogManager.getIntProperty(LIMIT_KEY, DEFAULT_LIMIT), LogManager.getIntProperty(COUNT_KEY, DEFAULT_COUNT), LogManager.getBooleanProperty(APPEND_KEY, DEFAULT_APPEND));
public FileHandler() throws IOException, SecurityException { this(/* pattern: use configiguration */ null, LogManager.getIntProperty("java.util.logging.FileHandler.limit", /* default */ 0), LogManager.getIntProperty("java.util.logging.FileHandler.count", /* default */ 1), LogManager.getBooleanPr...
pattern = LogManager.getLogManager().getProperty( "java.util.logging.FileHandler.pattern");
pattern = LogManager.getLogManager().getProperty(PATTERN_KEY);
private OutputStream createFileStream(String pattern, int limit, int count, boolean append, int generation) { String path; int unique = 0; /* Throws a SecurityException if the caller does not have * LoggingPermission("control"). */ LogManager.g...
pattern = "%h/java%u.log";
pattern = DEFAULT_PATTERN;
private OutputStream createFileStream(String pattern, int limit, int count, boolean append, int generation) { String path; int unique = 0; /* Throws a SecurityException if the caller does not have * LoggingPermission("control"). */ LogManager.g...
assert false : e.toString();
public float getPreferredSpan(int axis) { if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException(); FontMetrics fm = getFontMetrics(); if (axis == Y_AXIS) return super.getPreferredSpan(axis); String text; Element elem = getElement(); try { text = elem.getDocument()....
return fm.stringWidth(text) + 30;
return fm.stringWidth(text);
public float getPreferredSpan(int axis) { if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException(); FontMetrics fm = getFontMetrics(); if (axis == Y_AXIS) return super.getPreferredSpan(axis); String text; Element elem = getElement(); try { text = elem.getDocument()....
lastComponentEntered.dispatchEvent(exited);
tempComponent = lastComponentEntered;
private void acquireComponentForMouseEvent(MouseEvent me) { int x = me.getX(); int y = me.getY(); // Find the candidate which should receive this event. Component parent = frame.getContentPane(); if (parent == null) return; Component candidate = null; Point p = me.getPoint(); ...
tempComponent.dispatchEvent(exited);
private void acquireComponentForMouseEvent(MouseEvent me) { int x = me.getX(); int y = me.getY(); // Find the candidate which should receive this event. Component parent = frame.getContentPane(); if (parent == null) return; Component candidate = null; Point p = me.getPoint(); ...
temp = String.valueOf (calendar.get (Calendar.YEAR));
temp = "00"+String.valueOf (calendar.get (Calendar.YEAR));
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
iter.setIndex(save);
public int following (int pos) { int save = iter.getIndex(); iter.setIndex(pos); int r = next (); iter.setIndex(save); return r; }
protected URLConnection openConnection(URL url) throws IOException { return (new gnu.java.net.protocol.jar.JarURLConnection(url)); }
protected URLConnection openConnection(URL url) throws IOException { return new Connection(url); }
protected URLConnection openConnection(URL url) throws IOException { return (new gnu.java.net.protocol.jar.JarURLConnection(url)); }
protected void parseURL(URL url, String url_string, int start, int end) { String file = url.getFile();
protected void parseURL (URL url, String url_string, int start, int end) { String file = url.getFile(); if (!file.equals("")) { url_string = url_string.substring (start, end); if (url_string.startsWith("/")) { int idx = file.lastIndexOf ("!/"); if (idx < 0) throw new URLParseError("no !/ in spec"); file = file.su...
protected void parseURL(URL url, String url_string, int start, int end) { // This method does not throw an exception or return a value. Thus our // strategy when we encounter an error in parsing is to return without // doing anything. String file = url.getFile(); if (file != null && file != "") { //has context u...
if (file != null && file != "") { url_string = url_string.substring(start, end); if (url_string.startsWith("/")) { int idx = file.lastIndexOf("!/"); if (idx == -1) file = file + "!" + url_string; else file = file.substring(0, idx + 1) + url_string; } else { int idx = file.lastIndexOf("/"); if (idx == -1) file = "/" + u...
if (end < start) return; if (end - start < 2) return; if (start > url_string.length()) return; url_string = url_string.substring (start, end);
protected void parseURL(URL url, String url_string, int start, int end) { // This method does not throw an exception or return a value. Thus our // strategy when we encounter an error in parsing is to return without // doing anything. String file = url.getFile(); if (file != null && file != "") { //has context u...
if (end < start) return; if (end - start < 2) return; if (start > url_string.length()) return;
int jar_stop; if ((jar_stop = url_string.indexOf("!/")) < 0) throw new URLParseError("no !/ in spec");
protected void parseURL(URL url, String url_string, int start, int end) { // This method does not throw an exception or return a value. Thus our // strategy when we encounter an error in parsing is to return without // doing anything. String file = url.getFile(); if (file != null && file != "") { //has context u...
url_string = url_string.substring(start, end); if (!url.getProtocol().equals("jar")) return; setURL(url, "jar", url.getHost(), url.getPort(), url_string, null); }
try { new URL(url_string.substring (0, jar_stop)); } catch (MalformedURLException e) { throw new URLParseError("invalid inner URL: " + e.getMessage()); } if (!url.getProtocol().equals ("jar") ) throw new URLParseError("unexpected protocol " + url.getProtocol()); setURL (url, "jar", url.getHost(), url.getPort(), url_s...
protected void parseURL(URL url, String url_string, int start, int end) { // This method does not throw an exception or return a value. Thus our // strategy when we encounter an error in parsing is to return without // doing anything. String file = url.getFile(); if (file != null && file != "") { //has context u...
Variable v = (Variable) source;
Variable v = source;
public void addSource(Variable source) { sources.add(source); int type = getType(); if (type == UNKNOWN) { setType(source.getType()); Variable v = (Variable) source; varIndex = v.getIndex(); } else if (type != source.getType()) { throw new AssertionError("phi operand source types don't match"); } }
else if (! got_pos_suf) { pos.setErrorIndex(index); return null; }
public Number parse (String str, ParsePosition pos) { /* * Our strategy is simple: copy the text into separate buffers: one for the int part, * one for the fraction part and for the exponential part. * We translate or omit locale-specific information. * If exponential is sufficiently big we merg...
while (true) try { exitSequence.join(); } catch (InterruptedException e) { } }
while (shutdownHooks != null) { try { exitSequence.join(); } catch (InterruptedException e) { } } halt(status); }
public void exit(int status) { SecurityManager sm = SecurityManager.current; // Be thread-safe! if (sm != null) sm.checkExit(status); if (runShutdownHooks()) halt(status); // Someone else already called runShutdownHooks(). // Make sure we are not/no longer in the shutdownHooks set. // And...
synchronized (libpath) { exitSequence = null; }
boolean runShutdownHooks() { boolean first = false; synchronized (libpath) // Synch on libpath, not this, to avoid deadlock. { if (exitSequence == null) { first = true; exitSequence = Thread.currentThread(); if (shutdownHooks != null) { ...
throw new RuntimeException ("LocationOnlyFilter.matches not implemented");
return true;
public boolean matches (Event event) { // FIXME throw new RuntimeException ("LocationOnlyFilter.matches not implemented"); }
if (e.getPropertyName().equals("viewport"))
String propName = e.getPropertyName(); if (propName.equals("viewport"))
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("viewport")) updateViewport(e); else if (e.getPropertyName().equals("rowHeader")) updateRowHeader(e); else if (e.getPropertyName().equals("columnHeader")) updateColumnHeader(e); else if (e....
else if (e.getPropertyName().equals("rowHeader"))
else if (propName.equals("rowHeader"))
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("viewport")) updateViewport(e); else if (e.getPropertyName().equals("rowHeader")) updateRowHeader(e); else if (e.getPropertyName().equals("columnHeader")) updateColumnHeader(e); else if (e....
else if (e.getPropertyName().equals("columnHeader"))
else if (propName.equals("columnHeader"))
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("viewport")) updateViewport(e); else if (e.getPropertyName().equals("rowHeader")) updateRowHeader(e); else if (e.getPropertyName().equals("columnHeader")) updateColumnHeader(e); else if (e....
else if (e.getPropertyName().equals("horizontalScrollBarPolicy")
else if (propName.equals("horizontalScrollBarPolicy")
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("viewport")) updateViewport(e); else if (e.getPropertyName().equals("rowHeader")) updateRowHeader(e); else if (e.getPropertyName().equals("columnHeader")) updateColumnHeader(e); else if (e....
else if (propName.equals("verticalScrollBar")) { JScrollBar oldSb = (JScrollBar) e.getOldValue(); oldSb.getModel().removeChangeListener(vsbChangeListener); JScrollBar newSb = (JScrollBar) e.getNewValue(); newSb.getModel().addChangeListener(vsbChangeListener); } else if (propName.equals("horizontalScrollBar")) { JScroll...
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("viewport")) updateViewport(e); else if (e.getPropertyName().equals("rowHeader")) updateRowHeader(e); else if (e.getPropertyName().equals("columnHeader")) updateColumnHeader(e); else if (e....
private static cdrBufOutput createBuffer(InputStream input, int proposed_size)
private static BufferedCdrOutput createBuffer(InputStream input, int proposed_size)
private static cdrBufOutput createBuffer(InputStream input, int proposed_size) { cdrBufOutput bout; bout = new cdrBufOutput(2 * proposed_size + 256); if (input instanceof cdrBufInput) { cdrBufInput in = (cdrBufInput) input; bout.setBigEndian(in.isBigEndian()); } if (input ...
cdrBufOutput bout; bout = new cdrBufOutput(2 * proposed_size + 256);
BufferedCdrOutput bout; bout = new BufferedCdrOutput(2 * proposed_size + 256);
private static cdrBufOutput createBuffer(InputStream input, int proposed_size) { cdrBufOutput bout; bout = new cdrBufOutput(2 * proposed_size + 256); if (input instanceof cdrBufInput) { cdrBufInput in = (cdrBufInput) input; bout.setBigEndian(in.isBigEndian()); } if (input ...
if (input instanceof cdrBufInput)
if (input instanceof BufferredCdrInput)
private static cdrBufOutput createBuffer(InputStream input, int proposed_size) { cdrBufOutput bout; bout = new cdrBufOutput(2 * proposed_size + 256); if (input instanceof cdrBufInput) { cdrBufInput in = (cdrBufInput) input; bout.setBigEndian(in.isBigEndian()); } if (input ...
cdrBufInput in = (cdrBufInput) input;
BufferredCdrInput in = (BufferredCdrInput) input;
private static cdrBufOutput createBuffer(InputStream input, int proposed_size) { cdrBufOutput bout; bout = new cdrBufOutput(2 * proposed_size + 256); if (input instanceof cdrBufInput) { cdrBufInput in = (cdrBufInput) input; bout.setBigEndian(in.isBigEndian()); } if (input ...
cdrBufOutput output, int level)
BufferedCdrOutput output, int level)
public static int readNestedValue(int value_tag, InputStream input, cdrBufOutput output, int level) throws IOException { String id = null; if (level < -1) { // For the first level, this information is already behind. output.write_long(value_tag - vf_CHUNKING); // The nested valu...
if (input instanceof noHeaderInput) ((noHeaderInput) input).subsequentCalls = false;
if (input instanceof HeadlessInput) ((HeadlessInput) input).subsequentCalls = false;
public static Serializable readValue(InputStream input, final int position, Object value, BoxedValueHelper helper, String id, String[] ids, String codebase) { gnuRuntime g; gnuValueStream c = ((gnuValueStream) input); if (c.getRunTime() == null) { g = new gnuRuntime(codebase, value); ...
cdrBufOutput output = createBuffer(input, 1024);
BufferedCdrOutput output = createBuffer(input, 1024);
static Object read_instance(InputStream input, final int position, Object value, int value_tag, BoxedValueHelper helper, String id, String[] ids, String codebase) { if (helper != m_StringValueHelper && id != null) if (id.equals(StringValueHelper.id())) { value = null; helper = ...
cdrBufInput ci = new cdrBufInput(output.buffer.getBuffer());
BufferredCdrInput ci = new BufferredCdrInput(output.buffer.getBuffer());
static Object read_instance(InputStream input, final int position, Object value, int value_tag, BoxedValueHelper helper, String id, String[] ids, String codebase) { if (helper != m_StringValueHelper && id != null) if (id.equals(StringValueHelper.id())) { value = null; helper = ...
input = new noHeaderInput(ci, input);
input = new HeadlessInput(ci, input);
static Object read_instance(InputStream input, final int position, Object value, int value_tag, BoxedValueHelper helper, String id, String[] ids, String codebase) { if (helper != m_StringValueHelper && id != null) if (id.equals(StringValueHelper.id())) { value = null; helper = ...
if (input instanceof cdrBufInput)
if (input instanceof BufferredCdrInput)
static Object read_instance(InputStream input, final int position, Object value, int value_tag, BoxedValueHelper helper, String id, String[] ids, String codebase) { if (helper != m_StringValueHelper && id != null) if (id.equals(StringValueHelper.id())) { value = null; helper = ...
input = new noHeaderInput((cdrBufInput) input, null);
input = new HeadlessInput((BufferredCdrInput) input, null);
static Object read_instance(InputStream input, final int position, Object value, int value_tag, BoxedValueHelper helper, String id, String[] ids, String codebase) { if (helper != m_StringValueHelper && id != null) if (id.equals(StringValueHelper.id())) { value = null; helper = ...
else if (input instanceof noHeaderInput)
else if (input instanceof HeadlessInput)
static Object read_instance(InputStream input, final int position, Object value, int value_tag, BoxedValueHelper helper, String id, String[] ids, String codebase) { if (helper != m_StringValueHelper && id != null) if (id.equals(StringValueHelper.id())) { value = null; helper = ...
((noHeaderInput) input).subsequentCalls = false;
((HeadlessInput) input).subsequentCalls = false;
static Object read_instance(InputStream input, final int position, Object value, int value_tag, BoxedValueHelper helper, String id, String[] ids, String codebase) { if (helper != m_StringValueHelper && id != null) if (id.equals(StringValueHelper.id())) { value = null; helper = ...
cdrBufOutput bout = new cdrBufOutput();
BufferedCdrOutput bout = new BufferedCdrOutput();
static Object read_instance(InputStream input, final int position, Object value, int value_tag, BoxedValueHelper helper, String id, String[] ids, String codebase) { if (helper != m_StringValueHelper && id != null) if (id.equals(StringValueHelper.id())) { value = null; helper = ...
input = new noHeaderInput( (cdrBufInput) bout.create_input_stream(), input);
input = new HeadlessInput( (BufferredCdrInput) bout.create_input_stream(), input);
static Object read_instance(InputStream input, final int position, Object value, int value_tag, BoxedValueHelper helper, String id, String[] ids, String codebase) { if (helper != m_StringValueHelper && id != null) if (id.equals(StringValueHelper.id())) { value = null; helper = ...
if (output instanceof cdrBufOutput)
if (output instanceof BufferedCdrOutput)
static void writeValue(OutputStream output, Serializable value, BoxedValueHelper helper) { ((gnuValueStream) output).getRunTime().target = value; if (helper != null) helper.write_value(output, value); else if (!writeSelf(output, value)) { // Try to find helper via class loader. bo...
cdrBufOutput b = (cdrBufOutput) output;
BufferedCdrOutput b = (BufferedCdrOutput) output;
static void writeValue(OutputStream output, Serializable value, BoxedValueHelper helper) { ((gnuValueStream) output).getRunTime().target = value; if (helper != null) helper.write_value(output, value); else if (!writeSelf(output, value)) { // Try to find helper via class loader. bo...
return super.equals(other);
return self==other;
public boolean equals(org.omg.CORBA.Object self, java.lang.Object other) { return super.equals(other); }
return rm.claimIOResource(owner, low, length); }});
return rm.claimIOResource(owner, low, length); }
public Object run() throws ResourceNotFreeException { return rm.claimIOResource(owner, low, length); }});
io.getCSR(3);
public void handleInterrupt(int irq) { while ((io.getCSR(0) & CSR0_INTR) != 0) { final int csr0 = io.getCSR(0); /*final int csr3 =*/ io.getCSR(3); final int csr4 = io.getCSR(4); final int csr5 = io.getCSR(5); io.setCSR(0, csr0); io.setCSR(4, csr4); io.setCSR(5, csr5); // check if interrupt is due to I...
HashSet consumers = new HashSet();
Vector consumers = new Vector();
public ImageProducer getSource() { return new ImageProducer() { HashSet consumers = new HashSet(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(ImageConsumer ic) { return consumers.contains(ic); ...
Iterator i = consumers.iterator(); while(i.hasNext())
for(int i=0;i<consumers.size();i++)
public ImageProducer getSource() { return new ImageProducer() { HashSet consumers = new HashSet(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(ImageConsumer ic) { return consumers.contains(ic); ...
ImageConsumer c = (ImageConsumer) i.next();
ImageConsumer c = (ImageConsumer) consumers.elementAt(i);
public ImageProducer getSource() { return new ImageProducer() { HashSet consumers = new HashSet(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(ImageConsumer ic) { return consumers.contains(ic); ...
if(!consumers.contains(ic))
public void addConsumer(ImageConsumer ic) { consumers.add(ic); }
Iterator i = consumers.iterator(); while(i.hasNext())
for(int i=0;i<consumers.size();i++)
public void startProduction(ImageConsumer ic) { int x = 0; int y = 0; int width = getWidth(); int height = getHeight(); int stride = width; int offset = 0; int[] pixels = getRGB(x, y, width, height, ...
ImageConsumer c = (ImageConsumer) i.next();
ImageConsumer c = (ImageConsumer) consumers.elementAt(i);
public void startProduction(ImageConsumer ic) { int x = 0; int y = 0; int width = getWidth(); int height = getHeight(); int stride = width; int offset = 0; int[] pixels = getRGB(x, y, width, height, ...
return new PlainDocument() { public void insertString(int offset, String str, AttributeSet a) throws BadLocationException { if (str != null && str.indexOf('\n') == -1) super.insertString(offset, str, a); } };
return new PlainDocument();
protected Document createDefaultModel() { // subclassed to swallow newlines return new PlainDocument() { public void insertString(int offset, String str, AttributeSet a) throws BadLocationException { if (str != null && str.indexOf('\n') == -1) super.insertString(offset, st...
BasicTreeUI.this.editingPath = null; BasicTreeUI.this.editingRow = -1; BasicTreeUI.this.editingComponent = null; BasicTreeUI.this.cellEditor = null; BasicTreeUI.this.tree.repaint();
editingPath = null; editingRow = -1; stopEditingInCompleteEditing = false; if (editingComponent != null) tree.remove(editingComponent.getParent()); editingComponent = null; if (cellEditor != null) { if (cellEditor instanceof DefaultTreeCellEditor) tree.removeTreeSelectionListener((DefaultTreeCellEditor) cellEditor); ce...
public void editingCanceled(ChangeEvent e) { BasicTreeUI.this.editingPath = null; BasicTreeUI.this.editingRow = -1; BasicTreeUI.this.editingComponent = null; BasicTreeUI.this.cellEditor = null; BasicTreeUI.this.tree.repaint(); }
BasicTreeUI.this.editingPath = null; BasicTreeUI.this.editingRow = -1; BasicTreeUI.this.editingComponent = null; BasicTreeUI.this.cellEditor = null; BasicTreeUI.this.tree.repaint();
editingPath = null; editingRow = -1; stopEditingInCompleteEditing = false; if (editingComponent != null) { tree.remove(editingComponent.getParent()); editingComponent = null; } if (cellEditor != null) { newVal = ((JTextField) getCellEditor().getCellEditorValue()).getText(); completeEditing(false, false, true); if (cell...
public void editingStopped(ChangeEvent e) { BasicTreeUI.this.editingPath = null; BasicTreeUI.this.editingRow = -1; BasicTreeUI.this.editingComponent = null; BasicTreeUI.this.cellEditor = null; BasicTreeUI.this.tree.repaint(); }
TreeModel mod = BasicTreeUI.this.tree.getModel(); TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); Object last = null; if (start != null) last = start.getLastPathComponent(); if (last != null) { if (e.getKeyCode() == KeyEvent.VK_DOWN || e.getKeyCode() == KeyEvent.VK_KP_DOWN) { Object next = BasicTreeUI....
public void keyPressed(KeyEvent e) { TreeModel mod = BasicTreeUI.this.tree.getModel(); TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); Object last = null; if (start != null) last = start.getLastPathComponent(); if (last != null) { // DOWN, KP...
int row = Math.round(click.y / BasicTreeUI.this.getRowHeight()); TreePath path = BasicTreeUI.this.getClosestPathForLocation(tree, click.x, click.y);
int row = Math.round(click.y / getRowHeight()); TreePath path = getClosestPathForLocation(tree, click.x, click.y);
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / BasicTreeUI.this.getRowHeight()); TreePath path = BasicTreeUI.this.getClosestPathForLocation(tree, click.x, click.y); if (path...
Rectangle bounds = BasicTreeUI.this.getPathBounds( BasicTreeUI.this.tree, path);
Rectangle bounds = getPathBounds(tree, path);
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / BasicTreeUI.this.getRowHeight()); TreePath path = BasicTreeUI.this.getClosestPathForLocation(tree, click.x, click.y); if (path...
else if (BasicTreeUI.this.hasControlIcons() && (click.x < (bounds.x - rightChildIndent + 5) && click.x > (bounds.x - rightChildIndent - 5)))
else if (hasControlIcons() && (click.x < (bounds.x - rightChildIndent + 5) && click.x > (bounds.x - rightChildIndent - 5)))
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / BasicTreeUI.this.getRowHeight()); TreePath path = BasicTreeUI.this.getClosestPathForLocation(tree, click.x, click.y); if (path...
if ((inBounds || cntlClick) && BasicTreeUI.this.tree.isVisible(path)) { if (!cntlClick && !BasicTreeUI.this.isLeaf(row))
if ((inBounds || cntlClick) && tree.isVisible(path))
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / BasicTreeUI.this.getRowHeight()); TreePath path = BasicTreeUI.this.getClosestPathForLocation(tree, click.x, click.y); if (path...
Object cell = path.getLastPathComponent(); if (lastClicked != null && lastClicked.equals(cell)) clickCount = 2; else { lastClicked = cell; clickCount = 1; } }
selectPath(tree, path);
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / BasicTreeUI.this.getRowHeight()); TreePath path = BasicTreeUI.this.getClosestPathForLocation(tree, click.x, click.y); if (path...
if (clickCount == 2 || cntlClick == true)
if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row))
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / BasicTreeUI.this.getRowHeight()); TreePath path = BasicTreeUI.this.getClosestPathForLocation(tree, click.x, click.y); if (path...
clickCount = 0; lastClicked = null; BasicTreeUI.this.tree.getSelectionModel().clearSelection(); if (BasicTreeUI.this.tree.isExpanded(path)) BasicTreeUI.this.tree.collapsePath(path);
if (tree.isExpanded(path)) tree.collapsePath(path);
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / BasicTreeUI.this.getRowHeight()); TreePath path = BasicTreeUI.this.getClosestPathForLocation(tree, click.x, click.y); if (path...
BasicTreeUI.this.tree.expandPath(path);
tree.expandPath(path);
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / BasicTreeUI.this.getRowHeight()); TreePath path = BasicTreeUI.this.getClosestPathForLocation(tree, click.x, click.y); if (path...
BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, path); if (!path.equals(BasicTreeUI.this.tree.getLeadSelectionPath())) if (BasicTreeUI.this.tree.isEditing()) BasicTreeUI.this.tree.stopEditing();
if (!cntlClick && tree.isEditable()) startEditing(path, e);
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / BasicTreeUI.this.getRowHeight()); TreePath path = BasicTreeUI.this.getClosestPathForLocation(tree, click.x, click.y); if (path...
BasicTreeUI.this.tree.repaint();
tree.repaint();
public void treeCollapsed(TreeExpansionEvent event) { BasicTreeUI.this.tree.repaint(); }
BasicTreeUI.this.tree.repaint();
tree.repaint();
public void treeExpanded(TreeExpansionEvent event) { BasicTreeUI.this.tree.repaint(); }
Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectPreviousChangeLead")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); selectPath(tree, new TreePath(getPathToRoot(prev, 0))); tree.setLead...
public void actionPerformed(ActionEvent e) { }