rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
{ | public Object sign() { if (md == null || privateKey == null) { throw new IllegalStateException(); } return generateSignature(); } | |
} | public Object sign() { if (md == null || privateKey == null) { throw new IllegalStateException(); } return generateSignature(); } | |
{ | public void update(byte b) { if (md == null) { throw new IllegalStateException(); } md.update(b); } | |
} | public void update(byte b) { if (md == null) { throw new IllegalStateException(); } md.update(b); } | |
{ | public boolean verify(Object sig) { if (md == null || publicKey == null) { throw new IllegalStateException(); } return verifySignature(sig); } | |
} | public boolean verify(Object sig) { if (md == null || publicKey == null) { throw new IllegalStateException(); } return verifySignature(sig); } | |
public ActivationID(Activator activator) { this.activator = activator; } | public ActivationID(Activator an_activator) { activator = an_activator; uid = new UID(); } | public ActivationID(Activator activator) { this.activator = activator;} |
public boolean equals(Object obj) { if (obj instanceof ActivationID) { ActivationID that = (ActivationID)obj; if (this.activator.equals(that.activator)) { return (true); } } return (false); } | public boolean equals(Object obj) { if (obj instanceof ActivationID) { ActivationID that = (ActivationID) obj; return eq(uid, that.uid); } else return false; } | public boolean equals(Object obj) { if (obj instanceof ActivationID) { ActivationID that = (ActivationID)obj; if (this.activator.equals(that.activator)) { return (true); } } return (false);} |
public int hashCode() { return (activator.hashCode()); } | public int hashCode() { return uid == null ? 0 : uid.hashCode(); } | public int hashCode() { return (activator.hashCode());} |
public Object get() throws java.io.IOException, java.lang.ClassNotFoundException { if(objBytes == null) | public Object get() throws IOException, ClassNotFoundException { if (objBytes == null) | public Object get() throws java.io.IOException, java.lang.ClassNotFoundException{ if(objBytes == null) return null; RMIMarshalledObjectInputStream stream = new RMIMarshalledObjectInputStream(objBytes, locBytes); return stream.readObject();} |
return (int) (unique ^ time ^ machineId); | return (int) (unique ^ time ^ count); | public int hashCode() { return (int) (unique ^ time ^ machineId); } |
return ("[UID: " + unique + "," + time + "," + count + "]"); | int max = Character.MAX_RADIX; long lc = (count + Short.MIN_VALUE) & 0xFFFF; return Long.toString(time, max) + ":" + Long.toString(unique, max) + ":" + Long.toString(lc, max); | public String toString() { return ("[UID: " + unique + "," + time + "," + count + "]"); } |
commitsOnValidEdit = true; | commitsOnValidEdit = false; | public DefaultFormatter() { commitsOnValidEdit = true; overwriteMode = true; allowsInvalid = true; } |
{ | public PrivateKey decodePrivateKey(byte[] k) { // magic if (k[0] != Registry.MAGIC_RAW_RSA_PRIVATE_KEY[0] || k[1] != Registry.MAGIC_RAW_RSA_PRIVATE_KEY[1] || k[2] != Registry.MAGIC_RAW_RSA_PRIVATE_KEY[2] || k[3] != Registry.MAGIC_RAW_RSA_PRIVATE_KEY[3]) { throw new IllegalArgum... | |
} | public PrivateKey decodePrivateKey(byte[] k) { // magic if (k[0] != Registry.MAGIC_RAW_RSA_PRIVATE_KEY[0] || k[1] != Registry.MAGIC_RAW_RSA_PRIVATE_KEY[1] || k[2] != Registry.MAGIC_RAW_RSA_PRIVATE_KEY[2] || k[3] != Registry.MAGIC_RAW_RSA_PRIVATE_KEY[3]) { throw new IllegalArgum... | |
{ | public PublicKey decodePublicKey(byte[] k) { // magic if (k[0] != Registry.MAGIC_RAW_RSA_PUBLIC_KEY[0] || k[1] != Registry.MAGIC_RAW_RSA_PUBLIC_KEY[1] || k[2] != Registry.MAGIC_RAW_RSA_PUBLIC_KEY[2] || k[3] != Registry.MAGIC_RAW_RSA_PUBLIC_KEY[3]) { throw new IllegalArgumentExc... | |
} | public PublicKey decodePublicKey(byte[] k) { // magic if (k[0] != Registry.MAGIC_RAW_RSA_PUBLIC_KEY[0] || k[1] != Registry.MAGIC_RAW_RSA_PUBLIC_KEY[1] || k[2] != Registry.MAGIC_RAW_RSA_PUBLIC_KEY[2] || k[3] != Registry.MAGIC_RAW_RSA_PUBLIC_KEY[3]) { throw new IllegalArgumentExc... | |
if (!(key instanceof GnuRSAPrivateKey)) { | if (! (key instanceof GnuRSAPrivateKey)) | public byte[] encodePrivateKey(PrivateKey key) { if (!(key instanceof GnuRSAPrivateKey)) { throw new IllegalArgumentException("key"); } GnuRSAPrivateKey rsaKey = (GnuRSAPrivateKey) key; ByteArrayOutputStream baos = new ByteArrayOutputStream(); // magic baos.write(Registry.MAGIC_RAW_RS... |
} | public byte[] encodePrivateKey(PrivateKey key) { if (!(key instanceof GnuRSAPrivateKey)) { throw new IllegalArgumentException("key"); } GnuRSAPrivateKey rsaKey = (GnuRSAPrivateKey) key; ByteArrayOutputStream baos = new ByteArrayOutputStream(); // magic baos.write(Registry.MAGIC_RAW_RS... | |
if (!(key instanceof GnuRSAPublicKey)) { | if (! (key instanceof GnuRSAPublicKey)) | public byte[] encodePublicKey(PublicKey key) { if (!(key instanceof GnuRSAPublicKey)) { throw new IllegalArgumentException("key"); } GnuRSAPublicKey rsaKey = (GnuRSAPublicKey) key; ByteArrayOutputStream baos = new ByteArrayOutputStream(); // magic baos.write(Registry.MAGIC_RAW_RSA_PUB... |
} | public byte[] encodePublicKey(PublicKey key) { if (!(key instanceof GnuRSAPublicKey)) { throw new IllegalArgumentException("key"); } GnuRSAPublicKey rsaKey = (GnuRSAPublicKey) key; ByteArrayOutputStream baos = new ByteArrayOutputStream(); // magic baos.write(Registry.MAGIC_RAW_RSA_PUB... | |
refJava = os.getObjectRef(sbcClass.getMethod("arrayStoreWriteBarrier", "(Ljava/lang/Object;ILjava/lang/Object;)V")); os.getObjectRef(new Label("SoftByteCodes_arrayStoreWriteBarrier")).link(refJava); refJava = os.getObjectRef(sbcClass.getMethod("putfieldWriteBarrier", "(Ljava/lang/Object;ILjava/lang/Object;)V")); os.g... | final VmType vmThreadClass = loadClass(VmThread.class); | protected void linkNativeSymbols(NativeStream os) throws ClassNotFoundException, UnresolvedObjectRefException { NativeStream.ObjectRef refJava; /* Link VmMethod_compile */ VmType vmMethodClass = loadClass(VmMethod.class); refJava = os.getObjectRef(vmMethodClass.getMethod("recompile", "()V")); os.getObjectRef(new ... |
if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) || tag.equals(HTML.Tag.H1) || tag.equals(HTML.Tag.H2) || tag.equals(HTML.Tag.H3) || tag.equals(HTML.Tag.H4) || tag.equals(HTML.Tag.H5) || tag.equals(HTML.Tag.H6) || tag.equals(HTML.Tag.DT)) | if (tag == HTML.Tag.IMPLIED || tag == HTML.Tag.P || tag == HTML.Tag.H1 || tag == HTML.Tag.H2 || tag == HTML.Tag.H3 || tag == HTML.Tag.H4 || tag == HTML.Tag.H5 || tag == HTML.Tag.H6 || tag == HTML.Tag.DT) | public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) ... |
else if (tag.equals(HTML.Tag.LI) || tag.equals(HTML.Tag.DL) || tag.equals(HTML.Tag.DD) || tag.equals(HTML.Tag.BODY) || tag.equals(HTML.Tag.HTML) || tag.equals(HTML.Tag.CENTER) || tag.equals(HTML.Tag.DIV) || tag.equals(HTML.Tag.BLOCKQUOTE) || tag.equals(HTML.Tag.PRE)) | else if (tag == HTML.Tag.LI || tag == HTML.Tag.DL || tag == HTML.Tag.DD || tag == HTML.Tag.BODY || tag == HTML.Tag.HTML || tag == HTML.Tag.CENTER || tag == HTML.Tag.DIV || tag == HTML.Tag.BLOCKQUOTE || tag == HTML.Tag.PRE || tag == HTML.Tag.FORM || tag == HTML.Tag.TD || tag == HTML.Tag.TH) | public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) ... |
else if (tag.equals(HTML.Tag.IMG)) | else if (tag == HTML.Tag.TR) view = new BlockView(element, View.X_AXIS); else if (tag == HTML.Tag.IMG) | public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) ... |
else if (tag.equals(HTML.Tag.CONTENT)) | else if (tag == HTML.Tag.CONTENT) | public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) ... |
else if (tag.equals(HTML.Tag.TABLE)) | else if (tag == HTML.Tag.TABLE) | public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) ... |
else if (tag.equals(HTML.Tag.TD)) view = new ParagraphView(element); else if (tag.equals(HTML.Tag.HR)) | else if (tag == HTML.Tag.HR) | public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) ... |
else if (tag.equals(HTML.Tag.BR)) | else if (tag == HTML.Tag.BR) | public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) ... |
/* else if (tag.equals(HTML.Tag.MENU) || tag.equals(HTML.Tag.DIR) || tag.equals(HTML.Tag.UL) || tag.equals(HTML.Tag.OL)) | else if (tag == HTML.Tag.MENU || tag == HTML.Tag.DIR || tag == HTML.Tag.UL || tag == HTML.Tag.OL) | public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) ... |
else if (tag.equals(HTML.Tag.INPUT) || tag.equals(HTML.Tag.SELECT) || tag.equals(HTML.Tag.TEXTAREA)) view = new FormView(element); else if (tag.equals(HTML.Tag.OBJECT)) | else if (tag == HTML.Tag.FRAMESET) view = new FrameSetView(element); else if (tag == HTML.Tag.FRAME) view = new FrameView(element); else if (tag == HTML.Tag.OBJECT) | public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) ... |
else if (tag.equals(HTML.Tag.FRAMESET)) view = new FrameSetView(element); else if (tag.equals(HTML.Tag.FRAME)) view = new FrameView(element); */ | public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) ... | |
System.err.println("missing tag->view mapping for: " + element); | public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) ... | |
Object source = ae.getSource(); if (source instanceof JEditorPane) | JEditorPane source = getEditor(ae); if (source != null) | public void actionPerformed(ActionEvent ae) { Object source = ae.getSource(); if (source instanceof JEditorPane) { JEditorPane pane = ((JEditorPane) source); Document d = pane.getDocument(); if (d instanceof HTMLDocument) insertHTML(pane, (... |
JEditorPane pane = ((JEditorPane) source); Document d = pane.getDocument(); if (d instanceof HTMLDocument) insertHTML(pane, (HTMLDocument) d, 0, html, 0, 0, addTag); | HTMLDocument d = getHTMLDocument(source); int offset = source.getSelectionStart(); int length = d.getLength(); boolean inserted = true; if (! tryInsert(source, d, offset, parentTag, addTag)) { inserted = tryInsert(source, d, offset, alternateParentTag, alternateAddTag); } if (inserted) adjustSelection(source, d, offset... | public void actionPerformed(ActionEvent ae) { Object source = ae.getSource(); if (source instanceof JEditorPane) { JEditorPane pane = ((JEditorPane) source); Document d = pane.getDocument(); if (d instanceof HTMLDocument) insertHTML(pane, (... |
throws NotImplementedException | protected void insertAtBoundary(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag) thro... | |
insertAtBoundry(editor, doc, offset, insertElement, html, parentTag, addTag); | protected void insertAtBoundary(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag) thro... | |
insertAtBoundary(editor, doc, offset, insertElement, html, parentTag, addTag); | Element parent = insertElement; Element el; if (offset > 0 || insertElement == null) { el = doc.getDefaultRootElement(); while (el != null && el.getStartOffset() != offset && ! el.isLeaf()) el = el.getElement(el.getElementIndex(offset)); parent = el != null ? el.getParentElement() : null; } if (parent != null) { int p... | protected void insertAtBoundry(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag) { in... |
activateLink(pos, editor); | protected void activateLink(int pos, JEditorPane editor) { /* This method creates and fires a HyperlinkEvent if the document is an instance of HTMLDocument and the href tag of the link is not null. */ // FIXME: Not implemented. } | |
JEditorPane editor = (JEditorPane) e.getSource(); if (! editor.isEditable() && SwingUtilities.isLeftMouseButton(e)) { Point loc = e.getPoint(); int pos = editor.viewToModel(loc); if (pos >= 0) activateLink(pos, editor, e.getX(), e.getY()); } | public void mouseClicked(MouseEvent e) { /* These MouseInputAdapter methods generate mouse appropriate events around hyperlinks (entering, exiting, and activating). */ // FIXME: Not implemented. } | |
JEditorPane editor = (JEditorPane) e.getSource(); HTMLEditorKit kit = (HTMLEditorKit) editor.getEditorKit(); if (! editor.isEditable()) { Document doc = editor.getDocument(); if (doc instanceof HTMLDocument) { Cursor newCursor = kit.getDefaultCursor(); HTMLDocument htmlDoc = (HTMLDocument) doc; Point loc = e.getPoint()... | public void mouseMoved(MouseEvent e) { /* These MouseInputAdapter methods generate mouse appropriate events around hyperlinks (entering, exiting, and activating). */ // FIXME: Not implemented. } | |
linkController = new LinkController(); autoFormSubmission = true; | public HTMLEditorKit() { // Nothing to do here. } | |
return (HTMLEditorKit) super.clone(); | HTMLEditorKit copy = (HTMLEditorKit) super.clone(); copy.linkController = new LinkController(); return copy; | public Object clone() { // FIXME: Need to clone all fields return (HTMLEditorKit) super.clone(); } |
HTMLDocument document = new HTMLDocument(getStyleSheet()); | StyleSheet styleSheet = getStyleSheet(); StyleSheet ss = new StyleSheet(); ss.addStyleSheet(styleSheet); HTMLDocument document = new HTMLDocument(ss); | public Document createDefaultDocument() { HTMLDocument document = new HTMLDocument(getStyleSheet()); document.setParser(getParser()); return document; } |
document.setAsynchronousLoadPriority(4); document.setTokenThreshold(100); | public Document createDefaultDocument() { HTMLDocument document = new HTMLDocument(getStyleSheet()); document.setParser(getParser()); return document; } | |
c.removeMouseListener(mouseListener); mouseListener = null; | c.removeMouseListener(linkController); c.removeMouseMotionListener(linkController); | public void deinstall(JEditorPane c) { super.deinstall(c); c.removeMouseListener(mouseListener); mouseListener = null; editorPane = null; } |
parser = new GnuParserDelegator(HTML_401Swing.getInstance()); | parser = new GnuParserDelegator(HTML_401F.getInstance()); | protected Parser getParser() { if (parser == null) { parser = new GnuParserDelegator(HTML_401Swing.getInstance()); } return parser; } |
InputStream in = getClass().getResourceAsStream(DEFAULT_CSS); | Class c = HTMLEditorKit.class; InputStream in = c.getResourceAsStream(DEFAULT_CSS); | public StyleSheet getStyleSheet() { if (styleSheet == null) { try { styleSheet = new StyleSheet(); InputStream in = getClass().getResourceAsStream(DEFAULT_CSS); InputStreamReader r = new InputStreamReader(in); styleSheet.loadRules(r, null); r.... |
mouseListener = new LinkController(); c.addMouseListener(mouseListener); | c.addMouseListener(linkController); c.addMouseMotionListener(linkController); | public void install(JEditorPane c) { super.install(c); mouseListener = new LinkController(); c.addMouseListener(mouseListener); editorPane = c; // FIXME: need to set up hyperlinklistener object } |
out.write(doc.getText(pos, len)); | HTMLWriter writer = new HTMLWriter(out, (HTMLDocument) doc, pos, len); writer.write(); } else if (doc instanceof StyledDocument) { MinimalHTMLWriter writer = new MinimalHTMLWriter(out, (StyledDocument) doc, pos, len); writer.write(); | public void write(Writer out, Document doc, int pos, int len) throws IOException, BadLocationException { if (doc instanceof HTMLDocument) { // FIXME: Not implemented. Use HTMLWriter. out.write(doc.getText(pos, len)); } else super.write(out, doc, pos, len); } |
cssSpans = new Length[2]; positionInfo = new HashMap(); | public BlockView(Element elem, int axis) { super(elem, axis); } | |
spans = new Length[2]; observer = new Observer(); reloadProperties = true; reloadImage = true; loadOnDemand = false; | public ImageView(Element element) { super(element); } | |
void fireHyperlinkUpdate(HyperlinkEvent e) | public void fireHyperlinkUpdate(HyperlinkEvent event) | void fireHyperlinkUpdate(HyperlinkEvent e) { } |
HyperlinkListener[] listeners = getHyperlinkListeners(); for (int index = 0; index < listeners.length; ++index) listeners[index].hyperlinkUpdate(event); | void fireHyperlinkUpdate(HyperlinkEvent e) { } | |
public HyperlinkEvent(Object source, EventType type, URL url, String description, Element element) | public HyperlinkEvent(Object source, EventType type, URL url) | public HyperlinkEvent(Object source, EventType type, URL url, String description, Element element) { super(source); this.type = type; this.url = url; this.description = description; this.element = element; } |
super(source); this.type = type; this.url = url; this.description = description; this.element = element; | this (source, type, url, null, null); | public HyperlinkEvent(Object source, EventType type, URL url, String description, Element element) { super(source); this.type = type; this.url = url; this.description = description; this.element = element; } |
public HTMLDocument(StyleSheet styles) | public HTMLDocument() | public HTMLDocument(StyleSheet styles) { this(new GapContent(BUFFER_SIZE_DEFAULT), styles); } |
this(new GapContent(BUFFER_SIZE_DEFAULT), styles); | this(null); | public HTMLDocument(StyleSheet styles) { this(new GapContent(BUFFER_SIZE_DEFAULT), styles); } |
AttributeSet atts = element.getAttributes(); set.removeAttributes(set); | protected void createInputAttributes(Element element, MutableAttributeSet set) { AttributeSet atts = element.getAttributes(); set.removeAttributes(set); // FIXME: Filter out component, icon and element name attributes. set.addAttributes(atts); } | |
set.addAttributes(atts); | set.addAttributes(element.getAttributes()); | protected void createInputAttributes(Element element, MutableAttributeSet set) { AttributeSet atts = element.getAttributes(); set.removeAttributes(set); // FIXME: Filter out component, icon and element name attributes. set.addAttributes(atts); } |
Action[] myActions = new Action[] { new BoldAction(), new ItalicAction(), new UnderlineAction() }; | Action[] myActions = new Action[] { new FontSizeAction("font-size-8", 8), new FontSizeAction("font-size-10", 10), new FontSizeAction("font-size-12", 12), new FontSizeAction("font-size-14", 14), new FontSizeAction("font-size-16", 16), new FontSizeAction("font-size-18", 18), new FontSizeAction("font-size-24", 24), new Fo... | public Action[] getActions() { Action[] actions1 = super.getActions(); Action[] myActions = new Action[] { new BoldAction(), new ItalicAction(), new UnderlineAction() }; return TextAction.augmentList(actions1, myActions); } |
public void read(Reader in, Document document, int offset) | public void read(InputStream in, Document document, int offset) | public void read(Reader in, Document document, int offset) throws BadLocationException, IOException { BufferedReader reader = new BufferedReader(in); String line; StringBuffer content = new StringBuffer(); while ((line = reader.readLine()) != null) { content.append(line); content.append("\n"); ... |
BufferedReader reader = new BufferedReader(in); String line; StringBuffer content = new StringBuffer(); while ((line = reader.readLine()) != null) { content.append(line); content.append("\n"); } document.insertString(offset, content.substring(0, content.length() - 1), SimpleAttributeSet.EMPTY); | read(new InputStreamReader(in), document, offset); | public void read(Reader in, Document document, int offset) throws BadLocationException, IOException { BufferedReader reader = new BufferedReader(in); String line; StringBuffer content = new StringBuffer(); while ((line = reader.readLine()) != null) { content.append(line); content.append("\n"); ... |
URL getPage() { return page_url; } | public URL getPage() { return page_url; } | URL getPage() { return page_url; } |
public void write(Writer out, Document document, int offset, int len) throws BadLocationException, IOException | public void write(OutputStream out, Document document, int offset, int len) throws BadLocationException, IOException | public void write(Writer out, Document document, int offset, int len) throws BadLocationException, IOException { // Throw a BLE if offset is invalid if (offset < 0 || offset > document.getLength()) throw new BadLocationException("Tried to write to invalid location", ... |
if (offset < 0 || offset > document.getLength()) throw new BadLocationException("Tried to write to invalid location", offset); if (offset + len > document.getLength()) len = document.getLength() - offset; out.write(document.getText(offset, len)); | write(new OutputStreamWriter(out), document, offset, len); | public void write(Writer out, Document document, int offset, int len) throws BadLocationException, IOException { // Throw a BLE if offset is invalid if (offset < 0 || offset > document.getLength()) throw new BadLocationException("Tried to write to invalid location", ... |
if (newName.length() == 0) return; | void addToListenerHash(String name, Method method, int funcType) { String newName; Class type; switch(funcType) { case ADD: type = method.getParameterTypes()[0]; newName = name.substring(3,name.length()-8); break; case REMOVE: type = method.getParameterTypes()[0]; newName = name.substring(6,name.... | |
if (newName.length() == 0) return; | void addToPropertyHash(String name, Method method, int funcType) { String newName; Class type; switch(funcType) { case IS: type = java.lang.Boolean.TYPE; newName = name.substring(2); break; case GET_I: type = method.getReturnType(); newName = name.substring(3); break; case SET_I: type = m... | |
public int getModifiers() { return vmMethod.getModifiers(); } | public int getModifiers() { return getModifiersInternal() & METHOD_MODIFIERS; } | public int getModifiers() { return vmMethod.getModifiers(); } |
return getType(ch) == UPPERCASE_LETTER; | return isUpperCase((int)ch); | public static boolean isUpperCase(char ch) { return getType(ch) == UPPERCASE_LETTER; } |
public PropertyDescriptor( String name, Method readMethod, Method writeMethod) throws IntrospectionException { | PropertyDescriptor(String name) { | public PropertyDescriptor( String name, Method readMethod, Method writeMethod) throws IntrospectionException { setName(name); getMethod = readMethod; setMethod = writeMethod; propertyType = checkMethods(getMethod, setMethod); } |
getMethod = readMethod; setMethod = writeMethod; propertyType = checkMethods(getMethod, setMethod); | public PropertyDescriptor( String name, Method readMethod, Method writeMethod) throws IntrospectionException { setName(name); getMethod = readMethod; setMethod = writeMethod; propertyType = checkMethods(getMethod, setMethod); } | |
public IndexedPropertyDescriptor(String name, Method getMethod, Method setMethod, Method getIndex, Method setIndex) throws IntrospectionException { | public IndexedPropertyDescriptor(String name, Class beanClass) throws IntrospectionException { | public IndexedPropertyDescriptor(String name, Method getMethod, Method setMethod, Method getIndex, Method setIndex) throws IntrospectionException { super(name); if (getMethod != null && getMethod.getParameterTypes().length > 0) { throw new IntrospectionException("get method has parameters"); } if (getMethod != n... |
if (getMethod != null && getMethod.getParameterTypes().length > 0) { throw new IntrospectionException("get method has parameters"); | String capitalized; try { capitalized = Character.toUpperCase(name.charAt(0)) + name.substring(1); } catch(StringIndexOutOfBoundsException e) { capitalized = ""; | public IndexedPropertyDescriptor(String name, Method getMethod, Method setMethod, Method getIndex, Method setIndex) throws IntrospectionException { super(name); if (getMethod != null && getMethod.getParameterTypes().length > 0) { throw new IntrospectionException("get method has parameters"); } if (getMethod != n... |
if (getMethod != null && setMethod.getParameterTypes().length != 1) { throw new IntrospectionException("set method does not have exactly one parameter"); } if (getMethod != null && setMethod != null) { if (!getMethod.getReturnType().equals(setMethod.getParameterTypes()[0])) { throw new IntrospectionException("set and g... | findMethods(beanClass, "get" + capitalized, "set" + capitalized, "get" + capitalized, "set" + capitalized); | public IndexedPropertyDescriptor(String name, Method getMethod, Method setMethod, Method getIndex, Method setIndex) throws IntrospectionException { super(name); if (getMethod != null && getMethod.getParameterTypes().length > 0) { throw new IntrospectionException("get method has parameters"); } if (getMethod != n... |
Enumeration e = properties.elements(); while (e.hasMoreElements()) { Aproperties[i] = (PropertyDescriptor) e.nextElement(); | Iterator it = properties.entrySet().iterator(); while (it.hasNext()) { Aproperties[i] = (PropertyDescriptor) (((Map.Entry)it.next()).getValue()); | public BeanInfo getBeanInfo() { int defaultProperty = -1; int defaultEvent = -1; PropertyDescriptor[] Aproperties = new PropertyDescriptor[properties.size()]; int i = 0; Enumeration e = properties.elements(); while (e.hasMoreElements()) { Aproperties[i] = (PropertyDescriptor) e.nextElement(); if(defaultPrope... |
e = events.elements(); | Enumeration e = events.elements(); | public BeanInfo getBeanInfo() { int defaultProperty = -1; int defaultEvent = -1; PropertyDescriptor[] Aproperties = new PropertyDescriptor[properties.size()]; int i = 0; Enumeration e = properties.elements(); while (e.hasMoreElements()) { Aproperties[i] = (PropertyDescriptor) e.nextElement(); if(defaultPrope... |
jComponent.getContentPane().setLayout(new SwingContainerLayout(this)); | jComponent.getContentPane().setLayout(new SwingContainerLayout(window, this)); | public SwingWindowPeer(SwingToolkit toolkit, Window window) { super(toolkit, window, new SwingWindow(window)); SwingToolkit.copyAwtProperties(window, jComponent); jComponent.getContentPane().setLayout(new SwingContainerLayout(this)); } |
public void setSelectedFrame(JInternalFrame frame) { } | public void setSelectedFrame(JInternalFrame frame) { if (selectedFrame != null) { try { selectedFrame.setSelected(false); } catch (PropertyVetoException e) { } } selectedFrame = null; try { if (frame != null) frame.setSelected(true); selectedFrame = frame; } catch (PropertyVetoException e) { } } | public void setSelectedFrame(JInternalFrame frame) { // TODO } // setSelectedFrame() |
return peerComponent.getGraphics(); | return super.getGraphics(); | public final Graphics getGraphics() { return peerComponent.getGraphics(); } |
public abstract void setIconImage(Image image); | void setIconImage(Image image); | public abstract void setIconImage(Image image); |
public abstract void setMenuBar(MenuBar mb); | void setMenuBar(MenuBar mb); | public abstract void setMenuBar(MenuBar mb); |
if(help_menu != null){ help_menu.addNotify(); jComponent.add(((SwingMenuPeer) help_menu.getPeer()).jComponent); } | public SwingMenuBarPeer(SwingToolkit toolkit, MenuBar menuBar) { super(toolkit, menuBar, new JMenuBar()); int mc = menuBar.getMenuCount(); Menu help_menu = menuBar.getHelpMenu(); if (help_menu != null) { mc--; help_menu.addNotify(); jComponent.setHelpMenu... | |
recordTypeCode r = new recordTypeCode(TCKind.tk_value); | RecordTypeCode r = new RecordTypeCode(TCKind.tk_value); | public static TypeCode type() { recordTypeCode r = new recordTypeCode(TCKind.tk_value); return r; } |
public IdFunction(Expr arg) | IdFunction(List args) | public IdFunction(Expr arg) { this.arg = arg; } |
this.arg = arg; | this((Expr) args.get(0)); | public IdFunction(Expr arg) { this.arg = arg; } |
public final Class getCategory() | public Class getCategory() | public final Class getCategory() { return JobStateReasons.class; } |
public final String getName() | public String getName() | public final String getName() { return "job-state-reasons"; } |
private final void slowRepeat(int rep_start, int len, int dist) | private void slowRepeat(int rep_start, int len, int dist) | private final void slowRepeat(int rep_start, int len, int dist) { while (len-- > 0) { window[window_end++] = window[rep_start++]; window_end &= WINDOW_MASK; rep_start &= WINDOW_MASK; } } |
res.put("gnu.java.io.encoding_scheme_alias.US-ASCII", "ISO8859-1"); | public static Properties getInitProperties() { final String arch; final Vm vm = Vm.getVm(); arch = vm.getArch().getName(); final Properties res = new Properties(); res.put("java.version", "1.1.0"); res.put("java.vendor", "JNode.org"); res.put("java.vendor.url", "http... | |
SecurityManager sm = Runtime.securityManager; | SecurityManager sm = SecurityManager.current; | public static void setOut(PrintStream out) { SecurityManager sm = Runtime.securityManager; // Be thread-safe. if (sm != null) sm.checkPermission(new RuntimePermission("setIO")); VMSystem.setOut(out); } |
SecurityManager sm = Runtime.securityManager; | SecurityManager sm = SecurityManager.current; | public static void setErr(PrintStream err) { SecurityManager sm = Runtime.securityManager; // Be thread-safe. if (sm != null) sm.checkPermission(new RuntimePermission("setIO")); VMSystem.setErr(err); } |
public final Class getCategory() | public Class getCategory() | public final Class getCategory() { return JobPriority.class; } |
public final String getName() | public String getName() | public final String getName() { return "job-priority"; } |
sm.checkPermission(new AWTPermission("replaceKeyboardFocusManager")); current = m == null ? new DefaultKeyboardFocusManager() : m; } | sm.checkPermission (new AWTPermission ("replaceKeyboardFocusManager")); ThreadGroup currentGroup = Thread.currentThread ().getThreadGroup (); KeyboardFocusManager manager; if (m == null) manager = new DefaultKeyboardFocusManager (); else manager = m; currentKeyboardFocusManagers.put (currentGroup, manager); } | public static void setCurrentKeyboardFocusManager(KeyboardFocusManager m) { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPermission(new AWTPermission("replaceKeyboardFocusManager")); // XXX Need a way to divide this into contexts. current = m == null ? new DefaultKeyboar... |
public void addNotify() { if (peer != null) peer = getToolkit().createPopupMenu(this); super.addNotify(); } | addNotify() { if (peer == null) peer = getToolkit ().createPopupMenu (this); super.addNotify (); } | public void addNotify() { if (peer != null) peer = getToolkit().createPopupMenu(this); super.addNotify(); } |
public void setEventMask (long mask); | void setEventMask (long mask); | public void setEventMask (long mask); |
public int checkImage(Image img, int width, int height, | int checkImage(Image img, int width, int height, | public int checkImage(Image img, int width, int height, ImageObserver ob); |
public Image createImage(ImageProducer prod); | Image createImage(ImageProducer prod); | public Image createImage(ImageProducer prod); |
public abstract Image createImage(ImageProducer producer); | public abstract Image createImage(String filename); | public abstract Image createImage(ImageProducer producer); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.