rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
Insets insets = frame.getInsets(); | private int sectionOfClick(int x, int y) { Insets insets = frame.getInsets(); Rectangle b = frame.getBounds(); if (x < insets.left && y < insets.top) return NORTH_WEST; else if (x > b.width - insets.right && y < insets.top) return NORTH_EAST; else if (x > b.width - insets.r... | |
if (x < insets.left && y < insets.top) return NORTH_WEST; else if (x > b.width - insets.right && y < insets.top) return NORTH_EAST; else if (x > b.width - insets.right && y > b.height - insets.bottom) return SOUTH_EAST; else if (x < insets.left && y > b.height - insets.bottom) return SOUTH_WEST; else if (y < insets.top... | int corner = InternalFrameBorder.cornerSize; if (x < corner && y < corner) return Cursor.NW_RESIZE_CURSOR; else if (x > b.width - corner && y < corner) return Cursor.NE_RESIZE_CURSOR; else if (x > b.width - corner && y > b.height - corner) return Cursor.SE_RESIZE_CURSOR; else if (x < corner && y > b.height - corner) r... | private int sectionOfClick(int x, int y) { Insets insets = frame.getInsets(); Rectangle b = frame.getBounds(); if (x < insets.left && y < insets.top) return NORTH_WEST; else if (x > b.width - insets.right && y < insets.top) return NORTH_EAST; else if (x > b.width - insets.r... |
return -1; | return Cursor.DEFAULT_CURSOR; | private int sectionOfClick(int x, int y) { Insets insets = frame.getInsets(); Rectangle b = frame.getBounds(); if (x < insets.left && y < insets.top) return NORTH_WEST; else if (x > b.width - insets.right && y < insets.top) return NORTH_EAST; else if (x > b.width - insets.r... |
g.fill3DRect(0, offset, bSize, b.height - 2 * offset, false); g.fill3DRect(offset, 0, b.width - 2 * offset, bSize, false); g.fill3DRect(offset, b.height - bSize, b.width - 2 * offset, bSize, false); g.fill3DRect(b.width - bSize, offset, bSize, b.height - 2 * offset, false); | g.fill3DRect(0, cornerSize, bSize, b.height - 2 * cornerSize, false); g.fill3DRect(cornerSize, 0, b.width - 2 * cornerSize, bSize, false); g.fill3DRect(cornerSize, b.height - bSize, b.width - 2 * cornerSize, bSize, false); g.fill3DRect(b.width - bSize, cornerSize, bSize, b.height - 2 * cornerSize, false); | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { g.translate(x, y); Color saved = g.getColor(); Rectangle b = frame.getBounds(); Color d = c.getBackground(); g.setColor(d); g.fillRect(0, 0, bSize, b.height); g.fi... |
Component contentPane = frame.getContentPane(); if (contentPane != null && contentPane.getBackground() instanceof UIResource) { contentPane.setBackground(null); } | protected void installDefaults() { internalFrameLayout = createLayoutManager(); frame.setLayout(internalFrameLayout); LookAndFeel.installBorder(frame, "InternalFrame.border"); frame.setFrameIcon(UIManager.getIcon("InternalFrame.icon")); } | |
for (pos = p0; pos < s.getEndIndex(); pos++) | for (pos = p0; pos < s.count; pos++) | public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current... |
char nextChar = s.array[pos]; | char nextChar = s.array[s.offset+pos]; | public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current... |
if (nextChar != '\n') | if (nextChar != '\t') | public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current... |
if (currentX >= x) | if (currentX > x) | public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current... |
public FunctionCall(XPathFunctionResolver resolver, String name, List args) | public FunctionCall(XPathFunctionResolver resolver, String name) | public FunctionCall(XPathFunctionResolver resolver, String name, List args) { this.resolver = resolver; this.name = name; this.args = args; } |
this.resolver = resolver; this.name = name; this.args = args; | this(resolver, name, Collections.EMPTY_LIST); | public FunctionCall(XPathFunctionResolver resolver, String name, List args) { this.resolver = resolver; this.name = name; this.args = args; } |
JTextArea comp = (JTextArea)getComponent(); if (comp.getLineWrap()) { if (comp.getWrapStyleWord()) return new WrappedPlainView(elem, true); else return new WrappedPlainView(elem, false); } else | public View create(Element elem) { return new PlainView(elem); } | |
Element elem = textComponent.getDocument().getDefaultRootElement(); | if (factory == null) return; Document doc = textComponent.getDocument(); if (doc == null) return; Element elem = doc.getDefaultRootElement(); if (elem == null) return; | protected void modelChanged() { ViewFactory factory = rootView.getViewFactory(); Element elem = textComponent.getDocument().getDefaultRootElement(); setView(factory.create(elem)); } |
} finally { | public void paintComponent(Graphics graphics, Component c, Container p, int x, int y, int w, int h, boolean shouldValidate) { // reparent c addImpl(c, null, 0); Rectangle oldClip = graphics.getClipBounds(); // translate to (x,y) graphics.translate(x, y); graphics.clipR... | |
} | public void paintComponent(Graphics graphics, Component c, Container p, int x, int y, int w, int h, boolean shouldValidate) { // reparent c addImpl(c, null, 0); Rectangle oldClip = graphics.getClipBounds(); // translate to (x,y) graphics.translate(x, y); graphics.clipR... | |
catch (XMLStreamException e) | catch (Exception e) | public synchronized void parse(InputSource input) throws IOException, SAXException { reset(); String systemId = input.getSystemId(); InputStream in = input.getByteStream(); boolean opened = false; if (in != null) parser = new XMLParser(in, systemId, validating, ... |
reset(); | public synchronized void parse(InputSource input) throws IOException, SAXException { reset(); String systemId = input.getSystemId(); InputStream in = input.getByteStream(); boolean opened = false; if (in != null) parser = new XMLParser(in, systemId, validating, ... | |
Dimension d = super.getPreferredSize(); System.out.println("JFrame.getPrefSize(): " + d + " , comp=" + getComponentCount() + ", layout=" + getLayout()); return d; | return super.getPreferredSize(); | public Dimension getPreferredSize() { Dimension d = super.getPreferredSize(); System.out.println("JFrame.getPrefSize(): " + d + " , comp=" + getComponentCount() + ", layout=" + getLayout()); return d; } |
{ | public byte[] decode(final byte[] EM) { // Separate the encoded message EM into an // octet string PS consisting of nonzero octets and a message M as // // EM = 0x00 || 0x02 || PS || 0x00 || M. // // If the first octet of EM does not have hexadecimal value 0x00, if // the second octet of EM does... | |
} | public byte[] decode(final byte[] EM) { // Separate the encoded message EM into an // octet string PS consisting of nonzero octets and a message M as // // EM = 0x00 || 0x02 || PS || 0x00 || M. // // If the first octet of EM does not have hexadecimal value 0x00, if // the second octet of EM does... | |
{ | public static final EME_PKCS1_V1_5 getInstance(final int k) { if (k < 0) { throw new IllegalArgumentException("k must be a positive integer"); } return new EME_PKCS1_V1_5(k); } | |
} | public static final EME_PKCS1_V1_5 getInstance(final int k) { if (k < 0) { throw new IllegalArgumentException("k must be a positive integer"); } return new EME_PKCS1_V1_5(k); } | |
public gnuServantObject(Servant a_servant, byte[] an_id, ORB_1_4 an_orb, gnuPOA a_poa | public gnuServantObject(String[] a_repository_ids, byte[] an_id, gnuPOA a_poa, ORB_1_4 an_orb | public gnuServantObject(Servant a_servant, byte[] an_id, ORB_1_4 an_orb, gnuPOA a_poa ) { Id = an_id; setServant(a_servant); poa = a_poa; if (poa != null) manager = poa.the_POAManager(); else manager = null; repository_ids = null; orb = ... |
setServant(a_servant); | manager = a_poa.the_POAManager(); | public gnuServantObject(Servant a_servant, byte[] an_id, ORB_1_4 an_orb, gnuPOA a_poa ) { Id = an_id; setServant(a_servant); poa = a_poa; if (poa != null) manager = poa.the_POAManager(); else manager = null; repository_ids = null; orb = ... |
if (poa != null) manager = poa.the_POAManager(); else manager = null; repository_ids = null; | public gnuServantObject(Servant a_servant, byte[] an_id, ORB_1_4 an_orb, gnuPOA a_poa ) { Id = an_id; setServant(a_servant); poa = a_poa; if (poa != null) manager = poa.the_POAManager(); else manager = null; repository_ids = null; orb = ... | |
jComponent.setLayout(new SwingContainerLayout(this)); | jComponent.setLayout(new SwingContainerLayout(panel, this)); | public SwingPanelPeer(SwingToolkit toolkit, Panel panel) { super(toolkit, panel, new SwingPanel(panel)); final SwingPanel jPanel = (SwingPanel) jComponent; SwingToolkit.add(panel, jPanel); SwingToolkit.copyAwtProperties(panel, jPanel); jComponent.setLayout(new SwingContainerLayout(this)); } |
URL u = new URL("http:" + name); String filename = u.getFile(); if (filename.charAt(0) == '/') getRegistry(u).bind(filename.substring(1), obj); else getRegistry(u).bind(filename, obj); | URL u = parseURL(name); String serviceName = getName(u); getRegistry(u).bind(serviceName, obj); | public static void bind(String name, Remote obj) throws AlreadyBoundException, MalformedURLException, RemoteException { URL u = new URL("http:" + name); String filename = u.getFile(); // If the filename begins with a slash we must cut it for // name resolution. if (filename.charAt(0) == '/') getRegistry(u).bind(filena... |
return (getRegistry(new URL("http:" + name)).list()); | return (getRegistry(parseURL(name)).list()); | public static String[] list(String name) throws RemoteException, MalformedURLException { return (getRegistry(new URL("http:" + name)).list());} |
if(name.startsWith("rmi:")){ name = name.substring(4); } URL u = new URL("http:" + name); String filename = u.getFile(); if (filename.charAt(0) == '/') return (getRegistry(u).lookup(filename.substring(1))); else return (getRegistry(u).lookup(filename)); | URL u = parseURL(name); String serviceName = getName(u); return (getRegistry(u).lookup(serviceName)); | public static Remote lookup(String name) throws NotBoundException, MalformedURLException, RemoteException { // hack to accept "rmi://host:port/service" strings if(name.startsWith("rmi:")){ name = name.substring(4); } URL u = new URL("http:" + name); String filename = u.getFile(); // If the filename begins with a slash ... |
URL u = new URL("http:" + name); String filename = u.getFile(); if (filename.charAt(0) == '/') getRegistry(u).rebind(filename.substring(1), obj); else getRegistry(u).rebind(filename, obj); | URL u = parseURL(name); String serviceName = getName(u); getRegistry(u).rebind(serviceName, obj); | public static void rebind(String name, Remote obj) throws RemoteException, MalformedURLException { URL u = new URL("http:" + name); String filename = u.getFile(); // If the filename begins with a slash we must cut it for // name resolution. if (filename.charAt(0) == '/') getRegistry(u).rebind(filename.substring(1), ob... |
URL u = new URL("http:" + name); String filename = u.getFile(); if (filename.charAt(0) == '/') getRegistry(u).unbind(filename.substring(1)); else getRegistry(u).unbind(filename); | URL u = parseURL(name); String serviceName = getName(u); getRegistry(u).unbind(serviceName); | public static void unbind(String name) throws RemoteException, NotBoundException, MalformedURLException { URL u = new URL("http:" + name); String filename = u.getFile(); // If the filename begins with a slash we must cut it for // name resolution. if (filename.charAt(0) == '/') getRegistry(u).unbind(filename.substring... |
protected InitialContext (boolean lazy) throws NamingException | public InitialContext(Hashtable environment) throws NamingException | protected InitialContext (boolean lazy) throws NamingException { if (! lazy) init (null); } |
if (! lazy) init (null); | init(environment); | protected InitialContext (boolean lazy) throws NamingException { if (! lazy) init (null); } |
if ((oldstate & SELECTED) == 0 && (newstate & SELECTED) == SELECTED) | if ((oldstate & SELECTED) == 0 && (newstate & SELECTED) == SELECTED) { | protected void changeState(int stateflag, boolean b) { int oldstate = stateMask; int newstate; if (b) newstate = oldstate | stateflag; else newstate = oldstate & ~stateflag; if (oldstate == newstate) return; if ((stateflag != SELECTED) && (stateflag != ENABLED) && (s... |
else if ((oldstate & SELECTED) == SELECTED && (newstate & SELECTED) == 0) | else if ((oldstate & SELECTED) == SELECTED && (newstate & SELECTED) == 0) { | protected void changeState(int stateflag, boolean b) { int oldstate = stateMask; int newstate; if (b) newstate = oldstate | stateflag; else newstate = oldstate & ~stateflag; if (oldstate == newstate) return; if ((stateflag != SELECTED) && (stateflag != ENABLED) && (s... |
&& ((newstate & ARMED) == ARMED && (newstate & PRESSED) == 0)) { | && ((newstate & ARMED) == ARMED && (newstate & PRESSED) == 0)) | protected void changeState(int stateflag, boolean b) { int oldstate = stateMask; int newstate; if (b) newstate = oldstate | stateflag; else newstate = oldstate & ~stateflag; if (oldstate == newstate) return; if ((stateflag != SELECTED) && (stateflag != ENABLED) && (s... |
} | protected void changeState(int stateflag, boolean b) { int oldstate = stateMask; int newstate; if (b) newstate = oldstate | stateflag; else newstate = oldstate & ~stateflag; if (oldstate == newstate) return; if ((stateflag != SELECTED) && (stateflag != ENABLED) && (s... | |
if (leadIndex < 0) { if (anchorSelectionIndex < 0) leadSelectionIndex = -1; else return; } if (anchorSelectionIndex < 0) return; | public void setLeadSelectionIndex(int leadIndex) { if (selectionMode == SINGLE_SELECTION) setSelectionInterval (leadIndex, leadIndex); int oldLeadIndex = leadSelectionIndex; if (oldLeadIndex == -1) oldLeadIndex = leadIndex; if (setLeadCalledFromAdd == false) oldSel = sel.clone(); le... | |
DirectByteBufferImpl.shiftDown(address, 0, pos, count); | VMDirectByteBuffer.shiftDown(address, 0, pos, count); | public ByteBuffer compact () { int pos = position(); if (pos > 0) { int count = remaining(); // Call shiftDown method optimized for direct buffers. DirectByteBufferImpl.shiftDown(address, 0, pos, count); position(count); limit(capacity()); } return this; } |
DirectByteBufferImpl result = new DirectByteBufferImpl (this, address, capacity (), limit (), pos, readOnly); | DirectByteBufferImpl result; if (readOnly) result = new DirectByteBufferImpl.ReadOnly(this, address, capacity(), limit(), pos); else result = new DirectByteBufferImpl.ReadWrite(this, address, capacity(), limit(), pos); | private ByteBuffer duplicate (boolean readOnly) { int pos = position(); reset(); int mark = position(); position(pos); DirectByteBufferImpl result = new DirectByteBufferImpl (this, address, capacity (), limit (), pos, readOnly); if (mark != pos) { result.position(mark); result.mark()... |
byte result = DirectByteBufferImpl.getImpl(address, pos); position (pos + 1); | byte result = VMDirectByteBuffer.get(address, pos); position(pos + 1); | public byte get () { checkForUnderflow(); int pos = position(); byte result = DirectByteBufferImpl.getImpl(address, pos); position (pos + 1); return result; } |
DirectByteBufferImpl.putImpl(address, pos, value); | VMDirectByteBuffer.put(address, pos, value); | public ByteBuffer put (byte value) { checkIfReadOnly(); checkForOverflow(); int pos = position(); DirectByteBufferImpl.putImpl(address, pos, value); position(pos + 1); return this; } |
return new DirectByteBufferImpl (this, DirectByteBufferImpl .adjustAddress(address, position()), rem, rem, 0, isReadOnly ()); | if (isReadOnly()) return new DirectByteBufferImpl.ReadOnly (this, VMDirectByteBuffer.adjustAddress(address, position()), rem, rem, 0); else return new DirectByteBufferImpl.ReadWrite (this, VMDirectByteBuffer.adjustAddress(address, position()), rem, rem, 0); | public ByteBuffer slice () { int rem = remaining(); return new DirectByteBufferImpl (this, DirectByteBufferImpl .adjustAddress(address, position()), rem, rem, 0, isReadOnly ()); } |
ReferenceTypeId refId = idMan.readReferenceTypeId(bb); | ClassReferenceTypeId refId = (ClassReferenceTypeId) idMan.readReferenceTypeId(bb); | private void executeMethods(ByteBuffer bb, DataOutputStream os) throws JdwpException, IOException { ReferenceTypeId refId = idMan.readReferenceTypeId(bb); Class clazz = refId.getType(); Method[] methods = clazz.getMethods(); os.writeInt(methods.length); for (int i = 0; i < methods.length; i++) ... |
Method[] methods = clazz.getMethods(); os.writeInt(methods.length); | VMMethod[] methods = VMVirtualMachine.getAllClassMethods(clazz); | private void executeMethods(ByteBuffer bb, DataOutputStream os) throws JdwpException, IOException { ReferenceTypeId refId = idMan.readReferenceTypeId(bb); Class clazz = refId.getType(); Method[] methods = clazz.getMethods(); os.writeInt(methods.length); for (int i = 0; i < methods.length; i++) ... |
Method method = methods[i]; idMan.getObjectId(method).write(os); | VMMethod method = methods[i]; method.writeId(os); | private void executeMethods(ByteBuffer bb, DataOutputStream os) throws JdwpException, IOException { ReferenceTypeId refId = idMan.readReferenceTypeId(bb); Class clazz = refId.getType(); Method[] methods = clazz.getMethods(); os.writeInt(methods.length); for (int i = 0; i < methods.length; i++) ... |
JdwpString.writeString(os, Signature.computeMethodSignature(method)); | JdwpString.writeString(os, method.getSignature()); | private void executeMethods(ByteBuffer bb, DataOutputStream os) throws JdwpException, IOException { ReferenceTypeId refId = idMan.readReferenceTypeId(bb); Class clazz = refId.getType(); Method[] methods = clazz.getMethods(); os.writeInt(methods.length); for (int i = 0; i < methods.length; i++) ... |
checkForUnderflow(); | if (pos >= limit) throw new BufferUnderflowException(); | public byte get () { checkForUnderflow(); byte result = backing_buffer [position () + array_offset]; position (position () + 1); return result; } |
byte result = backing_buffer [position () + array_offset]; position (position () + 1); return result; | return backing_buffer [(pos++) + array_offset]; | public byte get () { checkForUnderflow(); byte result = backing_buffer [position () + array_offset]; position (position () + 1); return result; } |
public ByteBuffer put (byte value) | public ByteBuffer put (byte[] src, int offset, int length) | public ByteBuffer put (byte value) { checkIfReadOnly(); checkForOverflow(); int pos = position(); backing_buffer [pos + array_offset] = value; position (pos + 1); return this; } |
checkIfReadOnly(); checkForOverflow(); | if ( (limit - pos) < length) throw new BufferOverflowException(); checkArraySize(src.length, offset, length); | public ByteBuffer put (byte value) { checkIfReadOnly(); checkForOverflow(); int pos = position(); backing_buffer [pos + array_offset] = value; position (pos + 1); return this; } |
int pos = position(); backing_buffer [pos + array_offset] = value; position (pos + 1); | System.arraycopy(src, offset, backing_buffer, pos + array_offset, length); pos += length; | public ByteBuffer put (byte value) { checkIfReadOnly(); checkForOverflow(); int pos = position(); backing_buffer [pos + array_offset] = value; position (pos + 1); return this; } |
ByteBufferHelper.putChar(this, value, order()); | if (readOnly) throw new ReadOnlyBufferException (); if ( (limit-pos) < 2) throw new BufferOverflowException(); if (endian == ByteOrder.LITTLE_ENDIAN) { backing_buffer [(pos++) + array_offset] = (byte)(value&0xFF); backing_buffer [(pos++) + array_offset] = (byte)(value>>8); } else { backing_buffer [(pos++) + array_offs... | public ByteBuffer putChar (char value) { ByteBufferHelper.putChar(this, value, order()); return this; } |
if (componentWithSelection == textComponent) componentWithSelection = 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 ... | |
if (componentWithSelection != null) if (componentWithSelection != textComponent) { Caret c = componentWithSelection.getCaret(); c.setDot(c.getDot()); } componentWithSelection = textComponent; | private void handleHighlight() { Highlighter highlighter = textComponent.getHighlighter(); if (highlighter == null) return; int p0 = Math.min(dot, mark); int p1 = Math.max(dot, mark); if (selectionVisible) { try { if (highlightEntry == null) highlightEntry = highlight... | |
if (count >= 2) | if (event.getButton() == MouseEvent.BUTTON1 && count >= 2) | public void mouseClicked(MouseEvent event) { int count = event.getClickCount(); if (count >= 2) { int newDot = getComponent().viewToModel(event.getPoint()); JTextComponent t = getComponent(); try { if (count == 3) { setDot(Utilities.... |
if (event.getButton() == MouseEvent.BUTTON1) | public void mouseDragged(MouseEvent event) { moveCaret(event); } | |
else if(button == MouseEvent.BUTTON2) if (event.isShiftDown()) event.consume(); else { positionCaret(event); textComponent.paste(); } else event.consume(); | public void mousePressed(MouseEvent event) { if (event.isShiftDown()) moveCaret(event); else positionCaret(event); } | |
adjustVisibility(this); | public void moveDot(int dot) { if (dot >= 0) { Document doc = textComponent.getDocument(); if (doc != null) this.dot = Math.min(dot, doc.getLength()); this.dot = Math.max(this.dot, 0); handleHighlight(); adjustVisibility(this); appear(); } } | |
adjustVisibility(this); | public void moveDot(int dot) { if (dot >= 0) { Document doc = textComponent.getDocument(); if (doc != null) this.dot = Math.min(dot, doc.getLength()); this.dot = Math.max(this.dot, 0); handleHighlight(); adjustVisibility(this); appear(); } } | |
adjustVisibility(this); | public void setDot(int dot) { if (dot >= 0) { Document doc = textComponent.getDocument(); if (doc != null) this.dot = Math.min(dot, doc.getLength()); this.dot = Math.max(this.dot, 0); this.mark = this.dot; clearHighlight(); adjustVisibility(this); ... | |
adjustVisibility(this); | public void setDot(int dot) { if (dot >= 0) { Document doc = textComponent.getDocument(); if (doc != null) this.dot = Math.min(dot, doc.getLength()); this.dot = Math.max(this.dot, 0); this.mark = this.dot; clearHighlight(); adjustVisibility(this); ... | |
public final Class getCategory() | public Class getCategory() | public final Class getCategory() { return JobSheets.class; } |
public final String getName() | public String getName() | public final String getName() { return "job-sheets"; } |
protected AccessibleJScrollBar(JScrollBar value0) | protected AccessibleJScrollBar() | protected AccessibleJScrollBar(JScrollBar value0) { super(value0); } |
super(value0); | super(); | protected AccessibleJScrollBar(JScrollBar value0) { super(value0); } |
accessibleContext = new AccessibleJScrollBar(this); | accessibleContext = new AccessibleJScrollBar(); | public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJScrollBar(this); return accessibleContext; } |
System.err.println("showDocument is not implemented in standalone mode"); | System.err.println (Messages.getString("StandaloneAppletContext.ShowDocumentError")); | public void showDocument(URL url, String target) { System.err.println("showDocument is not implemented in standalone mode"); } |
return new primitiveArrayTypeCode(TCKind.tk_char); | return new ArrayTypeCode(TCKind.tk_char); | public static TypeCode type() { return new primitiveArrayTypeCode(TCKind.tk_char); } |
if (shape == null) return null; | protected Shape adjustAllocation(Shape shape) { Rectangle rectIn = shape.getBounds(); // vertical adjustment int height = (int) getPreferredSpan(Y_AXIS); int y = rectIn.y + (rectIn.height - height) / 2; // horizontal adjustment JTextField textField = (JTextField) getContainer(); int width = (int... | |
int p1 = event.getLength() + p0; | protected void removeUpdate(DefaultDocumentEvent event) { super.removeUpdate(event); int p0 = event.getOffset(); int p1 = event.getLength() + p0; int len = event.getLength(); // check if we must collapse some elements int i1 = rootElement.getElementIndex(p0); int i2 = rootElement.getElementIndex... | |
rootElement.replace(start, end - start, new Element[]{ newEl }); | rootElement.replace(i1, i2 - i1, new Element[]{ newEl }); | protected void removeUpdate(DefaultDocumentEvent event) { super.removeUpdate(event); int p0 = event.getOffset(); int p1 = event.getLength() + p0; int len = event.getLength(); // check if we must collapse some elements int i1 = rootElement.getElementIndex(p0); int i2 = rootElement.getElementIndex... |
return !comboBox.isEditable() && comboBox.isEnabled(); | return false; | public boolean isFocusTraversable() { return !comboBox.isEditable() && comboBox.isEnabled(); } |
if (enabled) { setBackground(comboBox.getBackground()); setForeground(comboBox.getForeground()); } else { setBackground(UIManager.getColor("ComboBox.disabledBackground")); setForeground(UIManager.getColor("ComboBox.disabledForeground")); } | public void setEnabled(boolean enabled) { super.setEnabled(enabled); // TODO: figure out what this might need to be used for // perhaps it has something to do with the button's icon and/or border? } | |
return super.getName(); | return (String) getAttribute(NameAttribute); | public String getName() { //FIXME: this is supposed to do something different from the super class return super.getName(); } |
return null; | return new HTMLReader(pos); | public HTMLEditorKit.ParserCallback getReader(int pos) { // FIXME: Not implemented. return null; } |
styleSheet.setBase(u); | public void setBase(URL u) { baseURL = u; //TODO: also set the base of the StyleSheet } | |
int pos = t.getCaret().getDot(); if (pos < t.getDocument().getEndPosition().getOffset()) { t.getDocument().remove(t.getCaret().getDot(), 1); } | int pos = t.getSelectionStart(); int len = t.getSelectionEnd() - pos; if (len > 0) t.getDocument().remove(pos, len); else if (pos < t.getDocument().getLength()) t.getDocument().remove(pos, 1); t.setCaretPosition(pos); | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { try { int pos = t.getCaret().getDot(); if (pos < t.getDocument().getEndPosition().getOffset()) { ... |
int pos = t.getCaret().getDot(); if (pos > t.getDocument().getStartPosition().getOffset()) | int pos = t.getSelectionStart(); int len = t.getSelectionEnd() - pos; if (len > 0) | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { try { int pos = t.getCaret().getDot(); if (pos > t.getDocument().getStartPosition().getOffset()) { ... |
t.getCaret().setDot(pos - 1); } | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { try { int pos = t.getCaret().getDot(); if (pos > t.getDocument().getStartPosition().getOffset()) { ... | |
return channel().isOpen(); | if (valid) valid = channel().isOpen(); return valid; | public boolean isValid () { return channel().isOpen(); } |
public synchronized void release () throws IOException | public void release() throws IOException | public synchronized void release () throws IOException { ch.unlock(position(), size()); } |
ch.unlock(position(), size()); | if (isValid()) { valid = false; ((FileChannelImpl) channel()).unlock(position(), size()); } | public synchronized void release () throws IOException { ch.unlock(position(), size()); } |
component = c; point = p; | protected DropTargetAutoScroller (Component c, Point p) { } | |
point = newLocn; | protected void updateLocation (Point newLocn) { } | |
this (null, 0, null, true, null); | public DropTarget () { } | |
if (dtl != null) throw new TooManyListenersException (); dropTargetListener = dtl; | public void addDropTargetListener (DropTargetListener dtl) throws TooManyListenersException { } | |
return null; | return new DropTarget.DropTargetAutoScroller (c, p); | protected DropTarget.DropTargetAutoScroller createDropTargetAutoScroller (Component c, Point p) { return null; } |
return null; | return new DropTargetContext (this); | protected DropTargetContext createDropTargetContext() { return null; } |
return 0; | return actions; | public int getDefaultActions () { return 0; } |
return null; | if (dropTargetContext == null) dropTargetContext = createDropTargetContext (); return dropTargetContext; | public DropTargetContext getDropTargetContext() { return null; } |
return this.isActive; | return active; | public boolean isActive() { return this.isActive; } |
dropTargetListener = null; | public void removeDropTargetListener(DropTargetListener dtl) { } | |
public void setActive(boolean isActive) | public void setActive (boolean active) | public void setActive(boolean isActive) { this.isActive = isActive; } |
this.isActive = isActive; | this.active = active; | public void setActive(boolean isActive) { this.isActive = isActive; } |
component = c; | public void setComponent (Component c) { } | |
actions = ops; | public void setDefaultActions (int ops) { } | |
flavorMap = fm; | public void setFlavorMap(FlavorMap fm) { } | |
this.mark = mark; | synchronized (GapContent.this) { int i = binarySearch(positionMarks, mark, numMarks); if (i >= 0) { index = i; } else { index = -i - 1; insertMark(index, mark); } } | GapContentPosition(int mark) { this.mark = mark; } |
if (mark <= gapStart) return mark; else return mark - (gapEnd - gapStart); | int res = mark; if (mark > gapStart) res -= (gapEnd - gapStart); return res; } | public int getOffset() { // Check precondition. assert mark <= gapStart || mark >= gapEnd : "mark: " + mark + ", gapStart: " + gapStart + ", gapEnd: " + gapEnd; if (mark <= gapStart) return mark; ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.