rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
super(children, next);
LiteralNode(TemplateNode children, TemplateNode next, Node source) { super(children, next); this.source = source; if (source.getNodeType() == Node.ELEMENT_NODE) { NamedNodeMap attrs = source.getAttributes(); Node attr = attrs.getNamedItemNS(Stylesheet.XSL_NS, ...
return new LiteralNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), source);
TemplateNode ret = new LiteralNode(source); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret;
TemplateNode clone(Stylesheet stylesheet) { return new LiteralNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), source); }
result = doc.adoptNode(result); if (result == null)
Node result2 = doc.adoptNode(result); if (result2 == null)
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = sourc...
String msg = "Error adopting node to result tree";
String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")";
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = sourc...
result = result2;
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = sourc...
public String getSystemId() { return baseID; }
public String getSystemId() { return systemId; }
public String getSystemId() { return baseID; } // getSystemId()
public void setSystemId(String systemID) { baseID = systemID; }
public void setSystemId(String systemId) { this.systemId = systemId; }
public void setSystemId(String systemID) { baseID = systemID; } // setSystemId()
return null;
return new BreadthFirstEnumeration(this);
public Enumeration breadthFirstEnumeration() { return null; // TODO: Implement me. }
return null;
return new PostorderEnumeration(this);
public Enumeration postorderEnumeration() { return null; // TODO: Implement me. }
return null;
return new PreorderEnumeration(this);
public Enumeration preorderEnumeration() { return null; // TODO: Implement me. }
parent.remove(this);
public void removeFromParent() { // FIXME: IS this implementation really correct ? parent = null; }
if (content == null) { caret.setDot(dot); return; }
int p0 = Math.min (dot, mark); int p1 = Math.max (dot, mark);
public void replaceSelection(String content) { Caret caret = getCaret(); StyledDocument doc = getStyledDocument(); int dot = caret.getDot(); int mark = caret.getMark(); // If content is empty delete selection. if (content == null) { caret.setDot(dot); return; } try { int start = g...
int start = getSelectionStart(); int end = getSelectionEnd(); int contentLength = content.length();
if (doc instanceof AbstractDocument) ((AbstractDocument)doc).replace(p0, p1 - p0, content, a); else {
public void replaceSelection(String content) { Caret caret = getCaret(); StyledDocument doc = getStyledDocument(); int dot = caret.getDot(); int mark = caret.getMark(); // If content is empty delete selection. if (content == null) { caret.setDot(dot); return; } try { int start = g...
doc.remove(start, end - start);
doc.remove(p0, p1 - p0);
public void replaceSelection(String content) { Caret caret = getCaret(); StyledDocument doc = getStyledDocument(); int dot = caret.getDot(); int mark = caret.getMark(); // If content is empty delete selection. if (content == null) { caret.setDot(dot); return; } try { int start = g...
doc.insertString(start, content, null); doc.setCharacterAttributes(start, contentLength, getInputAttributes(), true);
if (content != null && content.length() > 0) doc.insertString(p0, content, a); }
public void replaceSelection(String content) { Caret caret = getCaret(); StyledDocument doc = getStyledDocument(); int dot = caret.getDot(); int mark = caret.getMark(); // If content is empty delete selection. if (content == null) { caret.setDot(dot); return; } try { int start = g...
public Style addStyle(String nm, Style parent);
Style addStyle(String nm, Style parent);
public Style addStyle(String nm, Style parent);
public Element getCharacterElement(int position);
Element getCharacterElement(int position);
public Element getCharacterElement(int position);
public Style getLogicalStyle(int position);
Style getLogicalStyle(int position);
public Style getLogicalStyle(int position);
public abstract Element getParagraphElement(int position);
Element getParagraphElement(int position);
public abstract Element getParagraphElement(int position);
public Style getStyle(String nm);
Style getStyle(String nm);
public Style getStyle(String nm);
public void removeStyle(String nm);
void removeStyle(String nm);
public void removeStyle(String nm);
public void setCharacterAttributes(int offset, int length,
void setCharacterAttributes(int offset, int length,
public void setCharacterAttributes(int offset, int length, AttributeSet set, boolean replace);
public void setLogicalStyle(int position, Style style);
void setLogicalStyle(int position, Style style);
public void setLogicalStyle(int position, Style style);
sizes[1] = available - sizes[0] - sizes[1];
sizes[1] = available - sizes[0] - sizes[2];
public void layoutContainer(Container container) { if (container instanceof JSplitPane) { JSplitPane split = (JSplitPane) container; distributeExtraSpace(); Insets insets = split.getInsets(); Dimension dims = split.getSize(); int loc = getInitialLocation(insets); int availab...
setDividerLocation(splitPane, getInitialLocation(splitPane.getInsets()) + sizes[0]);
public void resetToPreferredSizes() { for (int i = 0; i < components.length; i++) resetSizeAt(i); }
layoutManager.layoutContainer(splitPane); splitPane.repaint();
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JSplitPane.DIVIDER_SIZE_PROPERTY)) { int newSize = splitPane.getDividerSize(); int[] tmpSizes = layoutManager.getSizes(); dividerSize = tmpSizes[2]; int newSpace = newSize - tmpSizes[2]; tmpSizes[2] = newSize...
nonContinuousLayoutDivider.setBackground(Color.DARK_GRAY);
Color c = UIManager.getColor("SplitPaneDivider.draggingColor"); nonContinuousLayoutDivider.setBackground(c);
protected Component createDefaultNonContinuousLayoutDivider() { if (nonContinuousLayoutDivider == null) { nonContinuousLayoutDivider = new Canvas(); nonContinuousLayoutDivider.setBackground(Color.DARK_GRAY); } return nonContinuousLayoutDivider; }
dragDividerTo(location);
protected void finishDraggingTo(int location) { if (nonContinuousLayoutDivider != null) nonContinuousLayoutDivider.setVisible(false); draggingHW = false; location = validLocation(location); dragDividerTo(location); splitPane.setDividerLocation(location); splitPane.setLastDividerLocation(beginD...
splitPane.repaint();
protected void finishDraggingTo(int location) { if (nonContinuousLayoutDivider != null) nonContinuousLayoutDivider.setVisible(false); draggingHW = false; location = validLocation(location); dragDividerTo(location); splitPane.setDividerLocation(location); splitPane.setLastDividerLocation(beginD...
dividerLocation = validLocation(location);
dividerLocation = location;
public void setDividerLocation(JSplitPane jc, int location) { dividerLocation = validLocation(location); splitPane.revalidate(); splitPane.repaint(); }
splitPane.revalidate(); splitPane.repaint();
protected void startDragging() { Component left = splitPane.getLeftComponent(); Component right = splitPane.getRightComponent(); dividerSize = divider.getDividerSize(); setLastDragLocation(-1); if ((left != null && !left.isLightweight()) || (right != null && !right.isLightweight())) draggi...
this(prefs, new OutputStreamWriter(os));
this.prefs = prefs; Writer w; try { w = new OutputStreamWriter(os, "UTF-8"); } catch (UnsupportedEncodingException uee) { InternalError ie = new InternalError("UTF-8 encoding missing"); ie.initCause(uee); throw ie; } this.bw = new BufferedWriter(w);
public NodeWriter(Preferences prefs, OutputStream os) { this(prefs, new OutputStreamWriter(os)); }
bw.newLine(); bw.write("<!DOCTYPE preferences SYSTEM " + "\"http:
private void writeHeader() throws BackingStoreException, IOException { bw.write("<?xml version=\"1.0\"?>"); bw.newLine(); bw.newLine(); bw.write("<!-- GNU Classpath java.util.prefs Preferences "); if (prefs.isUserNode()) { bw.write("user"); } else { bw...
if (menu.parent != null) menu.parent.remove(menu);
MenuBarPeer myPeer = (MenuBarPeer) getPeer ();
public synchronized Menu add(Menu menu) { if (menu.parent != null) menu.parent.remove(menu); menu.parent = this; menus.addElement(menu); if (peer != null) menu.addNotify(); return menu; }
menu.parent = this;
MenuContainer parent = menu.getParent(); if (parent != null) parent.remove(menu);
public synchronized Menu add(Menu menu) { if (menu.parent != null) menu.parent.remove(menu); menu.parent = this; menus.addElement(menu); if (peer != null) menu.addNotify(); return menu; }
if (peer != null)
if (myPeer != null) {
public synchronized Menu add(Menu menu) { if (menu.parent != null) menu.parent.remove(menu); menu.parent = this; menus.addElement(menu); if (peer != null) menu.addNotify(); return menu; }
myPeer.addMenu(menu); }
public synchronized Menu add(Menu menu) { if (menu.parent != null) menu.parent.remove(menu); menu.parent = this; menus.addElement(menu); if (peer != null) menu.addNotify(); return menu; }
if (getPeer() == null) setPeer(getToolkit().createMenuBar(this));
MenuBarPeer peer = (MenuBarPeer) getPeer(); if (peer == null) { peer = getToolkit().createMenuBar(this); setPeer(peer); }
public void addNotify() { if (getPeer() == null) setPeer(getToolkit().createMenuBar(this)); Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu)e.nextElement(); mi.addNotify(); } if (helpMenu != null) { helpMenu.addNotify(); ((MenuBarPeer) peer).addHelpMenu(helpMen...
((MenuBarPeer) peer).addHelpMenu(helpMenu);
peer.addHelpMenu(helpMenu);
public void addNotify() { if (getPeer() == null) setPeer(getToolkit().createMenuBar(this)); Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu)e.nextElement(); mi.addNotify(); } if (helpMenu != null) { helpMenu.addNotify(); ((MenuBarPeer) peer).addHelpMenu(helpMen...
Menu m = (Menu) menus.get(index); menus.remove(index);
Menu m = (Menu) menus.remove(index); MenuBarPeer mp = (MenuBarPeer) getPeer(); if (mp != null)
public synchronized void remove(int index) { Menu m = (Menu) menus.get(index); menus.remove(index); m.removeNotify(); m.parent = null; if (peer != null) { MenuBarPeer mp = (MenuBarPeer) peer; mp.delMenu(index); } }
m.parent = null;
public synchronized void remove(int index) { Menu m = (Menu) menus.get(index); menus.remove(index); m.removeNotify(); m.parent = null; if (peer != null) { MenuBarPeer mp = (MenuBarPeer) peer; mp.delMenu(index); } }
if (peer != null) { MenuBarPeer mp = (MenuBarPeer) peer;
m.setParent(null); if (mp != null)
public synchronized void remove(int index) { Menu m = (Menu) menus.get(index); menus.remove(index); m.removeNotify(); m.parent = null; if (peer != null) { MenuBarPeer mp = (MenuBarPeer) peer; mp.delMenu(index); } }
}
public synchronized void remove(int index) { Menu m = (Menu) menus.get(index); menus.remove(index); m.removeNotify(); m.parent = null; if (peer != null) { MenuBarPeer mp = (MenuBarPeer) peer; mp.delMenu(index); } }
frame = null;
public void removeNotify() { Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu) e.nextElement(); mi.removeNotify(); } frame = null; super.removeNotify(); }
helpMenu.parent = null;
helpMenu.setParent(null);
public synchronized void setHelpMenu(Menu menu) { if (helpMenu != null) { helpMenu.removeNotify(); helpMenu.parent = null; } helpMenu = menu; if (menu.parent != null) menu.parent.remove(menu); menu.parent = this; MenuBarPeer myPeer = (MenuBarPeer) getPeer (); if (myPeer != null) {...
if (menu.parent != null) menu.parent.remove(menu); menu.parent = this;
MenuContainer parent = menu.getParent(); if (parent != null) parent.remove(menu); menu.setParent(this);
public synchronized void setHelpMenu(Menu menu) { if (helpMenu != null) { helpMenu.removeNotify(); helpMenu.parent = null; } helpMenu = menu; if (menu.parent != null) menu.parent.remove(menu); menu.parent = this; MenuBarPeer myPeer = (MenuBarPeer) getPeer (); if (myPeer != null) {...
MenuBarPeer myPeer = (MenuBarPeer) getPeer ();
public synchronized void setHelpMenu(Menu menu) { if (helpMenu != null) { helpMenu.removeNotify(); helpMenu.parent = null; } helpMenu = menu; if (menu.parent != null) menu.parent.remove(menu); menu.parent = this; MenuBarPeer myPeer = (MenuBarPeer) getPeer (); if (myPeer != null) {...
private void setOffset(int offset)
void setOffset(int offset)
private void setOffset(int offset) { this.offset = this.offset >= 0 ? offset : -1; }
private void checkLocation(int where, int len) throws BadLocationException
void checkLocation(int where, int len) throws BadLocationException
private void checkLocation(int where, int len) throws BadLocationException { if (where < 0) throw new BadLocationException("Invalid location", 1); else if (where > this.count) throw new BadLocationException("Invalid location", this.count); else if ((where + len)>this.count) throw new BadLocat...
public DataBufferByte(int size, int numBanks)
public DataBufferByte(int size)
public DataBufferByte(int size, int numBanks) { super(TYPE_BYTE, size, numBanks); bankData = new byte[numBanks][size]; data = bankData[0]; }
super(TYPE_BYTE, size, numBanks); bankData = new byte[numBanks][size]; data = bankData[0];
super(TYPE_BYTE, size, 1, 0); bankData = new byte[1][]; data = new byte[size]; bankData[0] = data;
public DataBufferByte(int size, int numBanks) { super(TYPE_BYTE, size, numBanks); bankData = new byte[numBanks][size]; data = bankData[0]; }
protected DataBuffer(int dataType, int size, int numBanks, int offset) { this(dataType, size, numBanks); java.util.Arrays.fill(offsets, offset); this.offset = offset;
protected DataBuffer(int dataType, int size) { this.dataType = dataType; this.size = size;
protected DataBuffer(int dataType, int size, int numBanks, int offset) { this(dataType, size, numBanks); java.util.Arrays.fill(offsets, offset); this.offset = offset; }
throw new Error("not implemented");
Point2D xp1 = xform.transform(getPoint1(), null); Point2D xp2 = xform.transform(getPoint2(), null); return new GradientPaintContext((float) xp1.getX(), (float) xp1.getY(), c1, (float) xp2.getX(), (float) xp2.getY(), c2, cyclic);
public PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) { throw new Error("not implemented"); }
throw new Error("not implemented");
if (c1.getAlpha() == 255 && c2.getAlpha() == 255) return Transparency.OPAQUE; else return Transparency.TRANSLUCENT;
public int getTransparency() { throw new Error("not implemented"); }
public abstract int getVisibleChildCount(TreePath value0);
public abstract int getVisibleChildCount(TreePath path);
public abstract int getVisibleChildCount(TreePath value0);
addEdit(par, index, removed, added);
edits.add(new Edit(par, index, removed, added));
protected void changeUpdate() { // Split up the element at the start offset if necessary. Element el = getCharacterElement(offset); Element[] res = split(el, offset, 0); BranchElement par = (BranchElement) el.getParentElement(); if (res[1] != null) { int index = par.getEl...
numEndTags = 0; numStartTags = 0;
public void insert(int offset, int length, ElementSpec[] data, DefaultDocumentEvent ev) { if (length == 0) return; this.offset = offset; this.length = length; this.endOffset = offset + length; documentEvent = ev; // Push the root and the paragraph at off...
int size = edits.size(); for (int i = 0; i < size; i++) { Edit curr = (Edit) edits.get(i); addEdit(curr.e, curr.index, curr.removed, curr.added); }
public void insert(int offset, int length, ElementSpec[] data, DefaultDocumentEvent ev) { if (length == 0) return; this.offset = offset; this.length = length; this.endOffset = offset + length; documentEvent = ev; // Push the root and the paragraph at off...
prepareContentInsertion();
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); AttributeSet tagAtts = tag.getAttributes(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a Jo...
int currentIndex = paragraph.getElementIndex(offset); Element current = paragraph.getElement(currentIndex); Element next = paragraph.getElement(currentIndex + 1); if (next == null) return;
int index = paragraph.getElementIndex(offset); Element target = paragraph.getElement(index); if (target.isLeaf() && paragraph.getElementCount() > (index + 1)) { Element next = paragraph.getElement(index + 1);
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); AttributeSet tagAtts = tag.getAttributes(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a Jo...
current.getAttributes(), current.getStartOffset(),
target.getAttributes(), target.getStartOffset(),
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); AttributeSet tagAtts = tag.getAttributes(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a Jo...
current.getAttributes(), offset,
next.getAttributes(), offset,
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); AttributeSet tagAtts = tag.getAttributes(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a Jo...
Element[] remove = new Element[] { current, next }; paragraph.replace(currentIndex, 2, add); addEdit(paragraph, currentIndex, remove, add);
paragraph.replace (index, 2, add); edits.add(new Edit(paragraph, index, new Element[] { target, next }, add));
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); AttributeSet tagAtts = tag.getAttributes(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a Jo...
else
} else if (dir == ElementSpec.OriginateDirection)
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); AttributeSet tagAtts = tag.getAttributes(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a Jo...
addEdit(paragraph, index, removed, added);
edits.add(new Edit(paragraph, index, removed, added));
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); AttributeSet tagAtts = tag.getAttributes(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a Jo...
addEdit(par, index, removed, added);
edits.add(new Edit(par, index, removed, added));
private Element insertParagraph(BranchElement par, int offset) { Element current = par.getElement(par.getElementIndex(offset)); Element[] res = split(current, offset, 0); int index = par.getElementIndex(offset); Element ret; if (res[1] != null) { Element[] removed; ...
addEdit(par, index, new Element[0], added);
edits.add(new Edit(par, index, new Element[0], added));
private Element insertParagraph(BranchElement par, int offset) { Element current = par.getElement(par.getElementIndex(offset)); Element[] res = split(current, offset, 0); int index = par.getElementIndex(offset); Element ret; if (res[1] != null) { Element[] removed; ...
numStartTags++;
switch (data[i].getDirection()) { case ElementSpec.JoinFractureDirection: insertFracture(data[i]); break; case ElementSpec.JoinNextDirection: int index = paragraph.getElementIndex(offset); elementStack.push(paragraph.getElement(index)); break; case ElementSpec.OriginateDirection: Element current = (Element) elementStac...
protected void insertUpdate(ElementSpec[] data) { for (int i = 0; i < data.length; i++) { switch (data[i].getType()) { case ElementSpec.StartTagType: numStartTags++; break; case ElementSpec.EndTagType: numEndTags++; ...
numEndTags++;
elementStack.pop();
protected void insertUpdate(ElementSpec[] data) { for (int i = 0; i < data.length; i++) { switch (data[i].getType()) { case ElementSpec.StartTagType: numStartTags++; break; case ElementSpec.EndTagType: numEndTags++; ...
default:
case ElementSpec.ContentType:
protected void insertUpdate(ElementSpec[] data) { for (int i = 0; i < data.length; i++) { switch (data[i].getType()) { case ElementSpec.StartTagType: numStartTags++; break; case ElementSpec.EndTagType: numEndTags++; ...
endEdit();
protected void insertUpdate(ElementSpec[] data) { for (int i = 0; i < data.length; i++) { switch (data[i].getType()) { case ElementSpec.StartTagType: numStartTags++; break; case ElementSpec.EndTagType: numEndTags++; ...
addEdit(el, index, removed, added);
edits.add(new Edit(el, index, removed, added));
private Element[] split(Element el, int offset, int space) { // If we are at an element boundary, then return an empty array. if ((offset == el.getStartOffset() || offset == el.getEndOffset()) && space == 0 && el.isLeaf()) return new Element[2]; // If the element is an instance of ...
b.append('<');
public String toString() { StringBuilder b = new StringBuilder(); b.append('<'); switch (type) { case StartTagType: b.append("StartTag"); break; case EndTagType: b.append("EndTag"); break; case ContentType: b.append("Content"...
paragraph.setResolveParent(getStyle(StyleContext.DEFAULT_STYLE));
protected AbstractDocument.AbstractElement createDefaultRoot() { Element[] tmp; // FIXME: Create a SecionElement here instead of a BranchElement. // Use createBranchElement() and createLeafElement instead. SectionElement section = new SectionElement(); BranchElement paragraph = new BranchElement(secti...
for (int i = 0; i < data.length; i++) { ElementSpec spec = data[i]; AttributeSet atts = spec.getAttributes(); if (atts != null) insertUpdate(ev, atts); }
protected void insert(int offset, ElementSpec[] data) throws BadLocationException { try { // writeLock() and writeUnlock() should always be in a try/finally // block so that locking balance is guaranteed even if some // exception is thrown. writeLock(); // First we ...
fireUndoableEditUpdate(new UndoableEditEvent(this, ev));
protected void insert(int offset, ElementSpec[] data) throws BadLocationException { try { // writeLock() and writeUnlock() should always be in a try/finally // block so that locking balance is guaranteed even if some // exception is thrown. writeLock(); // First we ...
ElementSpec finalStartTag = null; short finalStartDirection = ElementSpec.OriginateDirection; boolean prevCharWasNewline = false;
protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs...
ElementSpec spec = new ElementSpec(attr, ElementSpec.ContentType, len); specs.add(spec);
specs.add(new ElementSpec(attr, ElementSpec.ContentType, len));
protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs...
ElementSpec endTag = new ElementSpec(null, ElementSpec.EndTagType); specs.add(endTag); ElementSpec startTag = new ElementSpec(paragraphAttributes,
specs.add(new ElementSpec(null, ElementSpec.EndTagType)); finalStartTag = new ElementSpec(paragraphAttributes,
protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs...
startTag.setDirection(ElementSpec.JoinFractureDirection); specs.add(startTag);
specs.add(finalStartTag);
protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs...
if (next.getAttributes().isEqual(attr))
if (last.getType() == ElementSpec.ContentType) { Element currentRun = prevParagraph.getElement(prevParagraph.getElementIndex(offset)); if (currentRun.getEndOffset() == endOffset) { if (endOffset < getLength() && next.getAttributes().isEqual(attr) && last.getType() == ElementSpec.ContentType)
protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs...
if (prev.getAttributes().isEqual(attr))
if (prev.getAttributes().isEqual(attr) && first.getType() == ElementSpec.ContentType)
protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs...
fireUndoableEditUpdate(new UndoableEditEvent(this, ev));
public void setLogicalStyle(int position, Style style) { Element el = getParagraphElement(position); // getParagraphElement doesn't return null but subclasses might so // we check for null here. if (el == null) return; try { writeLock(); if (el instanceof AbstractElement) { ...
public GapContent(int size)
public GapContent()
public GapContent(int size) { buf.append("\n"); }
buf.append("\n");
this(10);
public GapContent(int size) { buf.append("\n"); }
protected AbstractDocument(Content doc, AttributeContext ctx)
protected AbstractDocument(Content doc)
protected AbstractDocument(Content doc, AttributeContext ctx) { content = doc; context = ctx; }
content = doc; context = ctx;
this(doc, StyleContext.getDefaultStyleContext());
protected AbstractDocument(Content doc, AttributeContext ctx) { content = doc; context = ctx; }
public Color getBackground(AttributeSet set);
Color getBackground(AttributeSet set);
public Color getBackground(AttributeSet set);
public Font getFont(AttributeSet set);
Font getFont(AttributeSet set);
public Font getFont(AttributeSet set);
public Color getForeground(AttributeSet set);
Color getForeground(AttributeSet set);
public Color getForeground(AttributeSet set);
public void getText(int offset, int length, Segment segment) throws BadLocationException { content.getChars(offset, length, segment); }
public String getText(int offset, int length) throws BadLocationException { return content.getString(offset, length); }
public void getText(int offset, int length, Segment segment) throws BadLocationException { content.getChars(offset, length, segment); }
public void setParagraphAttributes(int offset, int length,
void setParagraphAttributes(int offset, int length,
public void setParagraphAttributes(int offset, int length, AttributeSet set, boolean replace);
invalidate(); layout();
protected void addImpl(Component comp, Object constraints, int index) { int left = 0; int right = 1; int div = 2; int place; if (constraints == null) { if (leftComponent == null) constraints = LEFT; else if (rightComponent == null) constraints = RIGHT; } if (constraints instanceof Str...
private void resetSelectedValue()
void resetSelectedValue()
private void resetSelectedValue() { if (inputComponent != null) { Object init = optionPane.getInitialSelectionValue(); if (init == null) return; if (inputComponent instanceof JTextField) ((JTextField) inputComponent).setText((String) init); else if (inputComponent instanceof JComboBox) ((JComboBox) inp...
Object invoke (Remote obj, Method method, Object[] params, long opnum) throws Exception;
void invoke (RemoteCall call) throws Exception;
Object invoke (Remote obj, Method method, Object[] params, long opnum) throws Exception;
public void update (int bval);
void update (int bval);
public void update (int bval);
public DataFormatException(String msg)
public DataFormatException()
public DataFormatException(String msg) { super(msg); }
super(msg);
public DataFormatException(String msg) { super(msg); }
{
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new ParameterNode(name, select.clone(stylesheet), type); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { re...
}
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new ParameterNode(name, select.clone(stylesheet), type); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { re...