rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
charAttr.addAttribute(StyleConstants.StrikeThrough, new Boolean(true));
charAttr.addAttribute(StyleConstants.StrikeThrough, Boolean.TRUE);
public static boolean translateTag(MutableAttributeSet charAttr, Tag t, MutableAttributeSet a) { if(t == Tag.FONT) { if(a.getAttribute("color") != null) { Color c = getColor(""+a.getAttribute("color")); if( c == null ) return false; charAttr.addAttribute(StyleConstants.Foreground...
charAttr.addAttribute(StyleConstants.Superscript, new Boolean(true));
charAttr.addAttribute(StyleConstants.Superscript, Boolean.TRUE);
public static boolean translateTag(MutableAttributeSet charAttr, Tag t, MutableAttributeSet a) { if(t == Tag.FONT) { if(a.getAttribute("color") != null) { Color c = getColor(""+a.getAttribute("color")); if( c == null ) return false; charAttr.addAttribute(StyleConstants.Foreground...
charAttr.addAttribute(StyleConstants.Subscript, new Boolean(true));
charAttr.addAttribute(StyleConstants.Subscript, Boolean.TRUE);
public static boolean translateTag(MutableAttributeSet charAttr, Tag t, MutableAttributeSet a) { if(t == Tag.FONT) { if(a.getAttribute("color") != null) { Color c = getColor(""+a.getAttribute("color")); if( c == null ) return false; charAttr.addAttribute(StyleConstants.Foreground...
return super.hashCode ();
int hashCode = get(position()) + 31; int multiplier = 1; for (int i = position() + 1; i < limit(); ++i) { multiplier *= 31; hashCode += (get(i) + 30)*multiplier; } return hashCode;
public int hashCode () { // FIXME: Check what SUN calculates here. return super.hashCode (); }
final public static ShortBuffer wrap (short[] array, int offset, int length)
public static final ShortBuffer wrap (short[] array, int offset, int length)
final public static ShortBuffer wrap (short[] array, int offset, int length) { return new ShortBufferImpl (array, 0, array.length, offset + length, offset, -1, false); }
throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
public Text splitText(int offset) { if (isReadonly()) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } try { String text = getNodeValue(); String before = text.substring(0, offset); String after = text.substring(offset); Text next; if (get...
throw new DomEx(DomEx.INDEX_SIZE_ERR);
throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
public Text splitText(int offset) { if (isReadonly()) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } try { String text = getNodeValue(); String before = text.substring(0, offset); String after = text.substring(offset); Text next; if (get...
public int deflate(byte[] output, int offset, int length)
public int deflate(byte[] output)
public int deflate(byte[] output, int offset, int length) { int origLength = length; if (state == CLOSED_STATE) throw new IllegalStateException("Deflater closed"); if (state < BUSY_STATE) { /* output header */ int header = (DEFLATED + ((DeflaterConstants.MAX_WBITS - 8) << 4)) << 8; int lev...
int origLength = length; if (state == CLOSED_STATE) throw new IllegalStateException("Deflater closed"); if (state < BUSY_STATE) { int header = (DEFLATED + ((DeflaterConstants.MAX_WBITS - 8) << 4)) << 8; int level_flags = (level - 1) >> 1; if (level_flags < 0 || level_flags > 3) level_flags = 3; header |= level_flags...
return deflate(output, 0, output.length);
public int deflate(byte[] output, int offset, int length) { int origLength = length; if (state == CLOSED_STATE) throw new IllegalStateException("Deflater closed"); if (state < BUSY_STATE) { /* output header */ int header = (DEFLATED + ((DeflaterConstants.MAX_WBITS - 8) << 4)) << 8; int lev...
public void setInput(byte[] input, int off, int len)
public void setInput(byte[] input)
public void setInput(byte[] input, int off, int len) { if ((state & IS_FINISHING) != 0) throw new IllegalStateException("finish()/end() already called"); engine.setInput(input, off, len); }
if ((state & IS_FINISHING) != 0) throw new IllegalStateException("finish()/end() already called"); engine.setInput(input, off, len);
setInput(input, 0, input.length);
public void setInput(byte[] input, int off, int len) { if ((state & IS_FINISHING) != 0) throw new IllegalStateException("finish()/end() already called"); engine.setInput(input, off, len); }
final Class mainClass = Class.forName(mainClassName);
final Class<?> mainClass = Class.forName(mainClassName);
public void run() { try { final Class mainClass = Class.forName(mainClassName); final Method mainMethod = mainClass.getMethod("main", new Class[] { String[].class }); try { mainMethod.invoke(null, new Object[] { args }); } catch (InvocationTargetException ex) { ex.getTargetException().printS...
setPriority(NORM_PRIORITY + 1);
EventDispatchThread(EventQueue queue) { super(); setName("AWT-EventQueue-" + ++dispatchThreadNum); this.queue = queue; setPriority(NORM_PRIORITY + 1); }
System.out.println("run of dispatch thread"); while (true) { try {
while (true) { try {
public void run() { System.out.println("run of dispatch thread"); while (true) { try { AWTEvent evt = queue.getNextEvent(); //Unsafe.debug("@@dispatch "); Unsafe.debug(evt.toString()); KeyboardFocusManager manager; manager = KeyboardFocus...
if (!manager.dispatchEvent(evt)) {
if (!manager.dispatchEvent (evt))
public void run() { System.out.println("run of dispatch thread"); while (true) { try { AWTEvent evt = queue.getNextEvent(); //Unsafe.debug("@@dispatch "); Unsafe.debug(evt.toString()); KeyboardFocusManager manager; manager = KeyboardFocus...
} catch (ThreadDeath death) {
catch (ThreadDeath death) {
public void run() { System.out.println("run of dispatch thread"); while (true) { try { AWTEvent evt = queue.getNextEvent(); //Unsafe.debug("@@dispatch "); Unsafe.debug(evt.toString()); KeyboardFocusManager manager; manager = KeyboardFocus...
System.out.println("dispatch thread:threaddeath");
public void run() { System.out.println("run of dispatch thread"); while (true) { try { AWTEvent evt = queue.getNextEvent(); //Unsafe.debug("@@dispatch "); Unsafe.debug(evt.toString()); KeyboardFocusManager manager; manager = KeyboardFocus...
System.out.println("dispatch thread:interrupted");
public void run() { System.out.println("run of dispatch thread"); while (true) { try { AWTEvent evt = queue.getNextEvent(); //Unsafe.debug("@@dispatch "); Unsafe.debug(evt.toString()); KeyboardFocusManager manager; manager = KeyboardFocus...
} catch (Throwable x) { System.out.println("dispatch thread:exception"); x.printStackTrace();
} catch (Throwable x) {
public void run() { System.out.println("run of dispatch thread"); while (true) { try { AWTEvent evt = queue.getNextEvent(); //Unsafe.debug("@@dispatch "); Unsafe.debug(evt.toString()); KeyboardFocusManager manager; manager = KeyboardFocus...
public LineBorder() { }
public LineBorder(Color color) { this(color, 1, false); }
public LineBorder() { }
{ return false; }
{ return (!roundedCorners) && (lineColor.getAlpha() == 255); }
public boolean isBorderOpaque() { return false; }
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Color oldColor = g.getColor(); try
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { }
finally { g.setColor(oldColor); } }
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { }
if (length < flags.length) { boolean newFlags [] = new boolean [length]; System.arraycopy (flags, 0, newFlags, 0, flags.length); flags = newFlags; boolean newDeclFlags[] = new boolean[length]; System.arraycopy (declaredFlags, 0, newDeclFlags, 0, declaredFlags.length); declaredFlags = newDeclFlags;
if (length < specified.length) { boolean newFlags []; newFlags = new boolean [length]; System.arraycopy (declared, 0, newFlags, 0, declared.length); declared = newFlags; newFlags = new boolean [length]; System.arraycopy (specified, 0, newFlags, 0, specified.length); specified = newFlags;
public void addAttribute (String uri, String localName, String qName, String type, String value) { super.addAttribute (uri, localName, qName, type, value); int length = getLength (); if (length < flags.length) { boolean newFlags [] = new boolean [length]; System.arraycopy (flags, 0, newFlags, 0, ...
flags [length - 1] = true; declaredFlags[length - 1] = type.equals("CDATA");
specified [length - 1] = true; declared [length - 1] = !"CDATA".equals (type);
public void addAttribute (String uri, String localName, String qName, String type, String value) { super.addAttribute (uri, localName, qName, type, value); int length = getLength (); if (length < flags.length) { boolean newFlags [] = new boolean [length]; System.arraycopy (flags, 0, newFlags, 0, ...
throw new ArrayIndexOutOfBoundsException ("No attribute at index: " + index); return declaredFlags [index];
throw new ArrayIndexOutOfBoundsException ( "No attribute at index: " + index); return declared [index];
public boolean isDeclared (int index) { if (index < 0 || index >= getLength ()) throw new ArrayIndexOutOfBoundsException ("No attribute at index: " + index); return declaredFlags [index]; }
return flags [index];
return specified [index];
public boolean isSpecified (int index) { if (index < 0 || index >= getLength ()) throw new ArrayIndexOutOfBoundsException ( "No attribute at index: " + index); return flags [index]; }
if (index != origMax) System.arraycopy (flags, index + 1, flags, index,
if (index != origMax) { System.arraycopy (declared, index + 1, declared, index, origMax - index); System.arraycopy (specified, index + 1, specified, index,
public void removeAttribute (int index) { int origMax = getLength () - 1; super.removeAttribute (index); if (index != origMax) System.arraycopy (flags, index + 1, flags, index, origMax - index); }
}
public void removeAttribute (int index) { int origMax = getLength () - 1; super.removeAttribute (index); if (index != origMax) System.arraycopy (flags, index + 1, flags, index, origMax - index); }
flags = new boolean [length]; declaredFlags = new boolean[length];
declared = new boolean [length]; specified = new boolean [length];
public void setAttributes (Attributes atts) { int length = atts.getLength (); super.setAttributes (atts); flags = new boolean [length]; declaredFlags = new boolean[length]; if (atts instanceof Attributes2) { Attributes2 a2 = (Attributes2) atts; for (int i = 0; i < length; i++) { flags [i] = a2.isSpecifi...
flags [i] = a2.isSpecified (i); declaredFlags[i] = a2.isDeclared(i);
declared [i] = a2.isDeclared (i); specified [i] = a2.isSpecified (i);
public void setAttributes (Attributes atts) { int length = atts.getLength (); super.setAttributes (atts); flags = new boolean [length]; declaredFlags = new boolean[length]; if (atts instanceof Attributes2) { Attributes2 a2 = (Attributes2) atts; for (int i = 0; i < length; i++) { flags [i] = a2.isSpecifi...
flags [i] = true; declaredFlags[i] = getType(i).equals("CDATA");
declared [i] = !"CDATA".equals (atts.getType (i)); specified [i] = true;
public void setAttributes (Attributes atts) { int length = atts.getLength (); super.setAttributes (atts); flags = new boolean [length]; declaredFlags = new boolean[length]; if (atts instanceof Attributes2) { Attributes2 a2 = (Attributes2) atts; for (int i = 0; i < length; i++) { flags [i] = a2.isSpecifi...
throw new ArrayIndexOutOfBoundsException ("No attribute at index: " + index); declaredFlags [index] = value;
throw new ArrayIndexOutOfBoundsException ( "No attribute at index: " + index); declared [index] = value;
public void setDeclared (int index, boolean value) { if (index < 0 || index >= getLength ()) throw new ArrayIndexOutOfBoundsException ("No attribute at index: " + index); declaredFlags [index] = value; }
flags [index] = value;
specified [index] = value;
public void setSpecified (int index, boolean value) { if (index < 0 || index >= getLength ()) throw new ArrayIndexOutOfBoundsException ( "No attribute at index: " + index); flags [index] = value; }
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
protected void openInput(DeviceManager devMan) { AccessController.doPrivileged(new PrivilegedAction() { public Object run() { SwingPcTextScreen systemScreen = getTextScreenManager().getSystemScreen(); final JComponent screen = systemScreen.getScreenComponent(); ...
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
public Object run() { SwingPcTextScreen systemScreen = getTextScreenManager().getSystemScreen(); final JComponent screen = systemScreen.getScreenComponent(); initializeKeyboard(systemScreen.getKeyboardDevice()); addPointerDevice(systemScreen.getPoi...
FontMetrics metrics = view.getContainer().getFontMetrics(font);
FontMetrics metrics = Toolkit.getDefaultToolkit().getFontMetrics(font);
public float getHeight(GlyphView view) { Font font = view.getFont(); FontMetrics metrics = view.getContainer().getFontMetrics(font); float height = metrics.getHeight(); return height; }
FontMetrics fm = view.getContainer().getFontMetrics(font);
FontMetrics fm = Toolkit.getDefaultToolkit().getFontMetrics(font);
public float getSpan(GlyphView view, int p0, int p1, TabExpander te, float x) { Element el = view.getElement(); Font font = view.getFont(); FontMetrics fm = view.getContainer().getFontMetrics(font); Segment txt = view.getText(p0, p1); int span = Utilities.getTabbe...
boolean moved_permanently = false;
private void p_invoke() throws SystemException { binaryReply response = submit(); ReplyHeader rh = response.header.create_reply_header(); cdrBufInput input = response.getStream(); input.setOrb(orb); rh.read(input); // The stream must be aligned sinve v1.2, but only once. boolean ...
throw new MARSHAL(ex + " while reading the forwarding info");
new MARSHAL("Cant read forwarding info", 5103, CompletionStatus.COMPLETED_NO );
private void p_invoke() throws SystemException { binaryReply response = submit(); ReplyHeader rh = response.header.create_reply_header(); cdrBufInput input = response.getStream(); input.setOrb(orb); rh.read(input); // The stream must be aligned sinve v1.2, but only once. boolean ...
throw new MARSHAL("Unknow reply status: " + rh.reply_status);
throw new MARSHAL("Unknow reply status", 8100 + rh.reply_status, CompletionStatus.COMPLETED_NO );
private void p_invoke() throws SystemException { binaryReply response = submit(); ReplyHeader rh = response.header.create_reply_header(); cdrBufInput input = response.getStream(); input.setOrb(orb); rh.read(input); // The stream must be aligned sinve v1.2, but only once. boolean ...
ior.Internet.port
ior.Internet.port, 10000 + ior.Internet.port, CompletionStatus.COMPLETED_NO
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); header.setBigEndian(Big_endian); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.ve...
private void write_parameter_buffer(MessageHeader header,
protected void write_parameter_buffer(MessageHeader header,
private void write_parameter_buffer(MessageHeader header, cdrBufOutput request_part ) throws MARSHAL { try { if (header.version.since_inclusive(1, 2)) { request_part.align(8); ...
private void write_parameters(MessageHeader header, cdrBufOutput request_part)
protected void write_parameters(MessageHeader header, cdrBufOutput request_part )
private void write_parameters(MessageHeader header, cdrBufOutput request_part) throws MARSHAL { // Align after 1.2, but only once. boolean align = header.version.since_inclusive(1, 2); NamedValue para; try { // Write parameters now. for (int i = 0; i < m_args.co...
throw new MARSHAL("Unable to write method arguments to CDR output.");
InternalError ierr = new InternalError(); ierr.initCause(ex); throw ierr;
private void write_parameters(MessageHeader header, cdrBufOutput request_part) throws MARSHAL { // Align after 1.2, but only once. boolean align = header.version.since_inclusive(1, 2); NamedValue para; try { // Write parameters now. for (int i = 0; i < m_args.co...
return null;
private TTFFontData getFontData(Font font) { if (font instanceof TTFFont) { return ((TTFFont) font).getFontData(); } return null; }
return null;
FontMetrics fm = (FontMetrics) metrics.get(font); if (fm == null) { try { fm = new TTFFontMetrics(font, getFontData(font)); metrics.put(font, fm); } catch (IOException ex) { log.error("Cannot create font metrics for " + font, ex); } } return fm;
public FontMetrics getFontMetrics(Font font) { return null; }
try { return (TransformerFactory) ClassStuff.createFactory ( "javax.xml.transform.TransformerFactory", "com.icl.saxon.TransformerFactoryImpl" ); } catch (ClassCastException e) {
ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { loader = TransformerFactory.class.getClassLoader(); } String className = null; int count = 0; do { className = getFactoryClassName(loader, count++); if (className != null) { try { Class t = (loader != null) ? loader.loadClass(cla...
public static TransformerFactory newInstance() throws TransformerFactoryConfigurationError { try { return (TransformerFactory) ClassStuff.createFactory ( "javax.xml.transform.TransformerFactory", "com.icl.saxon.TransformerFactoryImpl" // "gnu.xml.util.SAXNullTransformerFactory" // "org.apache.xalan.proce...
public String getAttributeName(int index)
public QName getAttributeName(int index)
public String getAttributeName(int index) { if (current != null) { NamedNodeMap attrs = current.getAttributes(); if (attrs == null) return null; Node attr = attrs.item(index); return attr.getLocalName(); } return super.getAttributeName(index); }
return attr.getLocalName();
String localName = attr.getLocalName(); String uri = attr.getNamespaceURI(); String prefix = attr.getPrefix(); return new QName(uri, localName, prefix);
public String getAttributeName(int index) { if (current != null) { NamedNodeMap attrs = current.getAttributes(); if (attrs == null) return null; Node attr = attrs.item(index); return attr.getLocalName(); } return super.getAttributeName(index); }
public abstract Object getProperty (String id) throws SAXNotRecognizedException, SAXNotSupportedException;
public abstract Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException;
public abstract Object getProperty (String id) throws SAXNotRecognizedException, SAXNotSupportedException;
public void parse(InputStream stream, HandlerBase handler)
public void parse(InputStream is, HandlerBase hb)
public void parse(InputStream stream, HandlerBase handler) throws SAXException, IOException { parse (new InputSource (stream), handler); }
{ parse (new InputSource (stream), handler); }
{ if (is == null) { throw new IllegalArgumentException("input stream is null"); } parse(new InputSource(is), hb); }
public void parse(InputStream stream, HandlerBase handler) throws SAXException, IOException { parse (new InputSource (stream), handler); }
public abstract void setProperty (String id, Object value) throws SAXNotRecognizedException, SAXNotSupportedException;
public abstract void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException;
public abstract void setProperty (String id, Object value) throws SAXNotRecognizedException, SAXNotSupportedException;
void addListSelectionListener(ListSelectionListener listener) { sel_model.addListSelectionListener(listener); }
public void addListSelectionListener (ListSelectionListener listener) { sel_model.addListSelectionListener (listener); }
void addListSelectionListener(ListSelectionListener listener) { sel_model.addListSelectionListener(listener); }
public String getUIClassID() { return "JList"; }
public String getUIClassID() { return "ListUI"; }
public String getUIClassID() { return "JList"; }
void init() { render = new DefaultCellRenderer();
void init() { render = new DefaultCellRenderer(); sel_model = new DefaultListSelectionModel(); setModel(new DefaultListModel());
void init() { render = new DefaultCellRenderer(); sel_model = new DefaultListSelectionModel(); setModel(new DefaultListModel()); select_back = new Color(0, 0, 255); select_fore = new Color(255, 255, 255); updateUI(); }
sel_model = new DefaultListSelectionModel(); setModel(new DefaultListModel());
select_back = new Color(0,0,255); select_fore = new Color(255,255,255);
void init() { render = new DefaultCellRenderer(); sel_model = new DefaultListSelectionModel(); setModel(new DefaultListModel()); select_back = new Color(0, 0, 255); select_fore = new Color(255, 255, 255); updateUI(); }
select_back = new Color(0, 0, 255); select_fore = new Color(255, 255, 255); updateUI(); }
updateUI(); }
void init() { render = new DefaultCellRenderer(); sel_model = new DefaultListSelectionModel(); setModel(new DefaultListModel()); select_back = new Color(0, 0, 255); select_fore = new Color(255, 255, 255); updateUI(); }
void removeListSelectionListener(ListSelectionListener listener) { sel_model.removeListSelectionListener(listener); }
public void removeListSelectionListener (ListSelectionListener listener) { sel_model.removeListSelectionListener (listener); }
void removeListSelectionListener(ListSelectionListener listener) { sel_model.removeListSelectionListener(listener); }
public void setListData(final Object[] listData) { class AL extends AbstractListModel { public int getSize() { return listData.length; } public Object getElementAt(int i) { return listData[i]; } } setModel(new AL()); }
public void setListData(final Object[] listData) { class AL extends AbstractListModel { public int getSize() { return listData.length; } public Object getElementAt(int i) { return listData[i]; } }; setModel (new AL()); }
public void setListData(final Object[] listData) { class AL extends AbstractListModel { public int getSize() { return listData.length; } public Object getElementAt(int i) { return listData[i]; } } setModel(new AL()); }
public Object getElementAt(int i) { return listData[i]; }
public Object getElementAt(int i) { return listData.elementAt(i); }
public Object getElementAt(int i) { return listData[i]; }
public int getSize() { return listData.length; }
public int getSize() { return listData.size(); }
public int getSize() { return listData.length; }
this.noFocusBorder = new EmptyBorder(0, 0, 0, 0);
public DefaultTableCellRenderer() { super(); this.noFocusBorder = new EmptyBorder(0, 0, 0, 0); }
public final static VmNormalClass getPrimitiveClass(char type) {
public final static VmNormalClass<?> getPrimitiveClass(char type) {
public final static VmNormalClass getPrimitiveClass(char type) { switch (type) { case 'Z': return BooleanClass; case 'B': return ByteClass; case 'C': return CharClass; case 'S': return ShortClass; case 'I': return IntClass; case 'F': return FloatClass; case 'J': return LongClass; case 'D': ret...
private final synchronized int decRefCount(boolean forceClose) { refCount--; log.debug("refCount.dec=" + refCount); if ((refCount == 0) || forceClose) {
private final int decRefCount(boolean forceClose) { final int rc; synchronized (initCloseLock) { refCount--; rc = refCount; } log.debug("refCount.dec=" + rc); if ((rc == 0) || forceClose) {
private final synchronized int decRefCount(boolean forceClose) { refCount--; log.debug("refCount.dec=" + refCount); if ((refCount == 0) || forceClose) { onClose(); if (keyboardHandler != null) { this.keyboardHandler.close(); } if (mouseHandler != null) { this.mouseHandler.close(); } if (graphics !...
this.keyboardHandler.close();
keyboardHandler.close();
private final synchronized int decRefCount(boolean forceClose) { refCount--; log.debug("refCount.dec=" + refCount); if ((refCount == 0) || forceClose) { onClose(); if (keyboardHandler != null) { this.keyboardHandler.close(); } if (mouseHandler != null) { this.mouseHandler.close(); } if (graphics !...
this.mouseHandler.close();
mouseHandler.close();
private final synchronized int decRefCount(boolean forceClose) { refCount--; log.debug("refCount.dec=" + refCount); if ((refCount == 0) || forceClose) { onClose(); if (keyboardHandler != null) { this.keyboardHandler.close(); } if (mouseHandler != null) { this.mouseHandler.close(); } if (graphics !...
this.graphics.close();
graphics.close();
private final synchronized int decRefCount(boolean forceClose) { refCount--; log.debug("refCount.dec=" + refCount); if ((refCount == 0) || forceClose) { onClose(); if (keyboardHandler != null) { this.keyboardHandler.close(); } if (mouseHandler != null) { this.mouseHandler.close(); } if (graphics !...
this.refCount = 0; notifyAll(); } return refCount;
synchronized (initCloseLock) { this.refCount = 0; initCloseLock.notifyAll(); } return 0; } else { return rc; }
private final synchronized int decRefCount(boolean forceClose) { refCount--; log.debug("refCount.dec=" + refCount); if ((refCount == 0) || forceClose) { onClose(); if (keyboardHandler != null) { this.keyboardHandler.close(); } if (mouseHandler != null) { this.mouseHandler.close(); } if (graphics !...
private final synchronized void doWaitUntilStopped() { while (graphics != null) { try { wait(); } catch (InterruptedException ex) { } }
private final void doWaitUntilStopped() { synchronized (initCloseLock) { while (graphics != null) { try { initCloseLock.wait(); } catch (InterruptedException ex) { } } }
private final synchronized void doWaitUntilStopped() { while (graphics != null) { try { wait(); } catch (InterruptedException ex) { // Ignore } } }
synchronized (this) {
synchronized (initCloseLock) {
private final int incRefCount() { final boolean initialize; final int rc; synchronized (this) { refCount++; rc = refCount; initialize = (refCount == 1); } log.debug("refCount.inc=" + rc); if (initialize) { final JNodeFrameBufferDevice dev = (JNodeFrameBufferDevice) GraphicsEnvironment .getLocalGraphi...
if (block) { this.waitingNativeQueue = locked; synchronized (locked) { try { locked.wait(); } catch (InterruptedException e) { } this.waitingNativeQueue = null; } }
public void iterateNativeQueue(EventQueue locked, boolean block) { // TODO Auto-generated method stub }
final EventQueue q = this.waitingNativeQueue; if (q != null) { synchronized (q) { q.notifyAll(); } }
public void wakeNativeQueue() { // Do nothing }
return null;
if (accessibleContext == null) { if (getEditorKit() instanceof HTMLEditorKit) accessibleContext = new AccessibleJEditorPaneHTML(); else accessibleContext = new AccessibleJEditorPane(); } return accessibleContext;
public AccessibleContext getAccessibleContext() { return null; }
accessibleContext = null;
public void setEditorKit(EditorKit newValue) { if (editorKit == newValue) return; if (editorKit != null) editorKit.deinstall(this); EditorKit oldValue = editorKit; editorKit = newValue; if (editorKit != null) { editorKit.install(this); setDocument(editorKit.crea...
if (DEBUG && debuglevel > 8)
if (Configuration.DEBUG)
private static final int decode4to3(final byte[] src, final int sOffset, final byte[] dest, final int dOffset) { if (src[sOffset + 2] == EQUALS_SIGN) { // Example: Dk== final int outBuff = ((DECODABET[src[sOffset]] & 0xFF) << 18) | ((DECO...
debug("" + src[sOffset] + ": " + (DECODABET[src[sOffset]])); debug("" + src[sOffset + 1] + ": " + (DECODABET[src[sOffset + 1]])); debug("" + src[sOffset + 2] + ": " + (DECODABET[src[sOffset + 2]])); debug("" + src[sOffset + 3] + ": " + (DECODABET[src[sOffset + 3]]));
log.fine("" + src[sOffset ] + ": " + (DECODABET[src[sOffset ]])); log.fine("" + src[sOffset + 1] + ": " + (DECODABET[src[sOffset + 1]])); log.fine("" + src[sOffset + 2] + ": " + (DECODABET[src[sOffset + 2]])); log.fine("" + src[sOffset + 3] + ": " + (DECODABET[src[sOffset + 3]]));
private static final int decode4to3(final byte[] src, final int sOffset, final byte[] dest, final int dOffset) { if (src[sOffset + 2] == EQUALS_SIGN) { // Example: Dk== final int outBuff = ((DECODABET[src[sOffset]] & 0xFF) << 18) | ((DECO...
PersistenceDelegate pd = out.getPersistenceDelegate( oldInstance.getClass().getSuperclass());
PersistenceDelegate pd = out.getPersistenceDelegate(type);
protected void initialize(Class type, Object oldInstance, Object newInstance, Encoder out) { if (type != Object.class) { type = type.getSuperclass(); PersistenceDelegate pd = out.getPersistenceDelegate( oldInstance.getClass().getSuperclass()); pd.initi...
public ULongSeqHolder(int[] initial_value)
public ULongSeqHolder()
public ULongSeqHolder(int[] initial_value) { value = initial_value; typecode.setLength(value.length); }
value = initial_value; typecode.setLength(value.length);
public ULongSeqHolder(int[] initial_value) { value = initial_value; typecode.setLength(value.length); }
if (jarFile == null) { connect(); }
public InputStream getInputStream() throws IOException { return jarFile.getResourceAsStream(path); }
MenuPeer peer = (MenuPeer) getPeer(); if (peer == null) return;
insert(MenuItem item, int index){ if (index < 0) throw new IllegalArgumentException("Index is less than zero"); MenuPeer peer = (MenuPeer) getPeer(); if (peer == null) return; int count = getItemCount (); if (index >= count) peer.addItem (item); else { for (int i = count - 1; i >= index; i--) ...
peer.addItem (item);
add(item);
insert(MenuItem item, int index){ if (index < 0) throw new IllegalArgumentException("Index is less than zero"); MenuPeer peer = (MenuPeer) getPeer(); if (peer == null) return; int count = getItemCount (); if (index >= count) peer.addItem (item); else { for (int i = count - 1; i >= index; i--) ...
peer.addItem (item);
item.addNotify(); peer.addItem(item);
insert(MenuItem item, int index){ if (index < 0) throw new IllegalArgumentException("Index is less than zero"); MenuPeer peer = (MenuPeer) getPeer(); if (peer == null) return; int count = getItemCount (); if (index >= count) peer.addItem (item); else { for (int i = count - 1; i >= index; i--) ...
items.insertElementAt(item, index);
insert(MenuItem item, int index){ if (index < 0) throw new IllegalArgumentException("Index is less than zero"); MenuPeer peer = (MenuPeer) getPeer(); if (peer == null) return; int count = getItemCount (); if (index >= count) peer.addItem (item); else { for (int i = count - 1; i >= index; i--) ...
items.removeElementAt(index);
MenuItem item = (MenuItem) items.remove(index);
remove(int index){ items.removeElementAt(index); MenuPeer mp = (MenuPeer)getPeer(); if (mp != null) mp.delItem(index);}
item.removeNotify(); } item.setParent(null);
remove(int index){ items.removeElementAt(index); MenuPeer mp = (MenuPeer)getPeer(); if (mp != null) mp.delItem(index);}
return new CommentNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet));
TemplateNode ret = new CommentNode(); if (children != null) { ret.children = children.clone(stylesheet);
TemplateNode clone(Stylesheet stylesheet) { return new CommentNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet)); }
if (next != null) { ret.next = next.clone(stylesheet); } return ret; }
TemplateNode clone(Stylesheet stylesheet) { return new CommentNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet)); }
System.out.println("Listed " + entries.length + " entries on File(\"" + name + "\")");
System.out.println("Listed " + ((entries != null) ? ""+entries.length : "#null#") + " entries on File(\"" + name + "\")");
public static void main(String[] args) { final String name = (args.length > 0) ? args[0] : ""; System.out.println("Creating File(\"" + name + "\")"); final File f = new File(name); System.out.println("Created File(\"" + name + "\")"); System.out.println("List entri...
+ insets.right,
+ insets.right + b.getHorizontalAlignment(),
public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap) { Rectangle contentRect; Rectangle viewRect; Rectangle iconRect = new Rectangle(); Rectangle textRect = new Rectangle(); Insets insets = b.getInsets(); viewRect = ne...
public LineMetrics getLineMetrics(String str, FontRenderContext frc) { return getLineMetrics (str, 0, str.length () - 1, frc); }
public LineMetrics getLineMetrics(String text, int begin, int limit, FontRenderContext rc) { return peer.getLineMetrics (this, new StringCharacterIterator (text), begin, limit, rc); }
public LineMetrics getLineMetrics(String str, FontRenderContext frc) { return getLineMetrics (str, 0, str.length () - 1, frc); }
{ AttributedString as = new AttributedString (string); as.addAttribute (TextAttribute.FONT, font); ClasspathToolkit tk = (ClasspathToolkit)(Toolkit.getDefaultToolkit ()); peer = tk.getClasspathTextLayoutPeer(as, frc);
{ this.font = font; this.frc = frc; this.string = string; lm = font.getLineMetrics(string, frc); getStringProperties(); if( Bidi.requiresBidi( string.toCharArray(), 0, string.length() ) ) { Bidi bidi = new Bidi( string, leftToRight ? Bidi.DIRECTION_LEFT_TO_RIGHT : Bidi.DIRECTION_RIGHT_TO_LEFT ); int rc = bidi.getRun...
public TextLayout (String string, Font font, FontRenderContext frc) { AttributedString as = new AttributedString (string); as.addAttribute (TextAttribute.FONT, font); ClasspathToolkit tk = (ClasspathToolkit)(Toolkit.getDefaultToolkit ()); peer = tk.getClasspathTextLayoutPeer(as, frc); }
peer.draw(g2, x, y);
for(int i = 0; i < runs.length; i++) { g2.drawGlyphVector(runs[i], x, y); Rectangle2D r = runs[i].getLogicalBounds(); x += r.getWidth(); }
public void draw (Graphics2D g2, float x, float y) { peer.draw(g2, x, y); }
loc);
loc, ClassLoader.getSystemClassLoader());
private static final NumberFormat computeInstance (Locale loc, String resource, String def) { ResourceBundle res; try { res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", loc); } catch (MissingResourceException x) { res = null; } String f...
int len = sortKeys.size();
int len = sortKeys != null ? sortKeys.size() : 0;
TemplateNode clone(Stylesheet stylesheet) { int len = sortKeys.size(); List sortKeys2 = new ArrayList(len); for (int i = 0; i < len; i++) sortKeys2.add(((Key) sortKeys.get(i)).clone(stylesheet)); TemplateNode ret = new ForEachNode(select.clone(stylesheet), sortKeys2); ...
public boolean implies(Permission perm) { if (allPermission != null) { return true; } final PermissionCollection pc = (PermissionCollection) perms.get(perm .getClass()); if (pc == null) { return false; } else { return pc.implies(perm); }
public boolean implies(Permission perm) { if (allPermission != null) return true; PermissionCollection pc = (PermissionCollection) perms.get(perm.getClass()); return pc == null ? false : pc.implies(perm);
public boolean implies(Permission perm) { if (allPermission != null) { return true; } final PermissionCollection pc = (PermissionCollection) perms.get(perm .getClass()); if (pc == null) { return false; } else { return pc.implies(perm); } }
public final void bootArchitecture(boolean emptyMMap) throws UninterruptiblePragma {
public final void bootArchitecture(boolean emptyMMap) {
public final void bootArchitecture(boolean emptyMMap) throws UninterruptiblePragma { Vm.getArch().boot(emptyMMap); }
VmProcessor.current().enableReschedule();
VmMagic.currentProcessor().enableReschedule(true);
public void restartThreads() { VmProcessor.current().enableReschedule(); }