rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
m.minor = Minor.Any;
public void read_value(org.omg.CORBA.portable.InputStream input, TypeCode a_type ) throws MARSHAL { try { int kind = a_type.kind().value(); // Fixed needs special handling. if (kind == TCKind._tk_fixed) { ...
if (color == null) g.setColor(t.getSelectionColor()); else g.setColor(color);
Color col = getColor(); if (col == null) col = t.getSelectionColor(); g.setColor(col);
public void paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent t) { if (p0 == p1) return; Rectangle rect = bounds.getBounds(); if (color == null) g.setColor(t.getSelectionColor()); else g.setColor(color); TextUI ui = t.getUI(); try { R...
paintHighlight(g, l1);
g.fillRect(l1.x, l1.y, l1.width, l1.height);
public void paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent t) { if (p0 == p1) return; Rectangle rect = bounds.getBounds(); if (color == null) g.setColor(t.getSelectionColor()); else g.setColor(color); TextUI ui = t.getUI(); try { R...
l0.x -= rect.x; l0.width = rect.width - l0.x - rect.x; paintHighlight(g, l0); int posBelow = Utilities.getPositionBelow(t, p0, l0.x); int p1RowStart = Utilities.getRowStart(t, p1); if (posBelow != -1 && posBelow != p0 && Utilities.getRowStart(t, posBelow) != p1RowStart) { Rectangle grow = ui.modelToView(t, posBelow);...
int firstLineWidth = rect.x + rect.width - l0.x; g.fillRect(l0.x, l0.y, firstLineWidth, l0.height); if (l0.y + l0.height != l1.y) { g.fillRect(rect.x, l0.y + l0.height, rect.width, l1.y - l0.y - l0.height); } g.fillRect(rect.x, l1.y, l1.x - rect.x, l1.height);
public void paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent t) { if (p0 == p1) return; Rectangle rect = bounds.getBounds(); if (color == null) g.setColor(t.getSelectionColor()); else g.setColor(color); TextUI ui = t.getUI(); try { R...
AssertionError err = new AssertionError("Unexpected bad location exception"); err.initCause(ex); throw err;
public void paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent t) { if (p0 == p1) return; Rectangle rect = bounds.getBounds(); if (color == null) g.setColor(t.getSelectionColor()); else g.setColor(color); TextUI ui = t.getUI(); try { R...
throw new InternalError();
Color col = getColor(); if (col == null) col = c.getSelectionColor(); g.setColor(col); Rectangle rect = null; if (p0 == view.getStartOffset() && p1 == view.getEndOffset()) { rect = bounds instanceof Rectangle ? (Rectangle) bounds : bounds.getBounds(); } else { try { Shape s = view.modelToView(p0, Position.Bias.Forwa...
public Shape paintLayer(Graphics g, int p0, int p1, Shape bounds, JTextComponent c, View view) { throw new InternalError(); }
public HighlightEntry(int p0, int p1, Highlighter.HighlightPainter painter)
public HighlightEntry(Position p0, Position p1, Highlighter.HighlightPainter painter)
public HighlightEntry(int p0, int p1, Highlighter.HighlightPainter painter) { this.p0 = p0; this.p1 = p1; this.painter = painter; }
return p1;
return p1.getOffset();
public int getEndOffset() { return p1; }
return p0;
return p0.getOffset();
public int getStartOffset() { return p0; }
HighlightEntry entry = new HighlightEntry(p0, p1, painter);
HighlightEntry entry; Document doc = textComponent.getDocument(); Position pos0 = doc.createPosition(p0); Position pos1 = doc.createPosition(p1); if (getDrawsLayeredHighlights() && painter instanceof LayerPainter) entry = new LayerHighlightEntry(pos0, pos1, painter); else entry = new HighlightEntry(pos0, pos1, painter)...
public Object addHighlight(int p0, int p1, Highlighter.HighlightPainter painter) throws BadLocationException { checkPositions(p0, p1); HighlightEntry entry = new HighlightEntry(p0, p1, painter); highlights.add(entry); textComponent.getUI().damageRange(textComponent, p0, p1); return entry; ...
int o0, o1; checkPositions(n0, n1); HighlightEntry entry = (HighlightEntry) tag; o0 = entry.p0; o1 = entry.p1; if (o0 == n0 && o1 == n1) return; entry.p0 = n0; entry.p1 = n1;
Document doc = textComponent.getDocument();
public void changeHighlight(Object tag, int n0, int n1) throws BadLocationException { int o0, o1; checkPositions(n0, n1); HighlightEntry entry = (HighlightEntry) tag; o0 = entry.p0; o1 = entry.p1; // Prevent useless write & repaint operations. if (o0 == n0 && o1 == n1) return; ...
if (n0 == n1) ui.damageRange(textComponent, o0, o1); else if ((o1 > n0 && o1 <= n1) || (n1 > o0 && n1 <= o1))
if (tag instanceof LayerHighlightEntry) { LayerHighlightEntry le = (LayerHighlightEntry) tag; Rectangle r = le.paintRect; if (r.width > 0 && r.height > 0) textComponent.repaint(r.x, r.y, r.width, r.height); r.width = 0; r.height = 0; le.p0 = doc.createPosition(n0); le.p1 = doc.createPosition(n1); ui.damageRange(textCom...
public void changeHighlight(Object tag, int n0, int n1) throws BadLocationException { int o0, o1; checkPositions(n0, n1); HighlightEntry entry = (HighlightEntry) tag; o0 = entry.p0; o1 = entry.p1; // Prevent useless write & repaint operations. if (o0 == n0 && o1 == n1) return; ...
int fds, sds; int fde, sde; if(o0 < n0)
HighlightEntry e = (HighlightEntry) tag; int p0 = e.getStartOffset(); int p1 = e.getEndOffset(); if (p0 == n0)
public void changeHighlight(Object tag, int n0, int n1) throws BadLocationException { int o0, o1; checkPositions(n0, n1); HighlightEntry entry = (HighlightEntry) tag; o0 = entry.p0; o1 = entry.p1; // Prevent useless write & repaint operations. if (o0 == n0 && o1 == n1) return; ...
fds = o0; fde = n0;
ui.damageRange(textComponent, Math.min(p1, n1), Math.max(p1, n1));
public void changeHighlight(Object tag, int n0, int n1) throws BadLocationException { int o0, o1; checkPositions(n0, n1); HighlightEntry entry = (HighlightEntry) tag; o0 = entry.p0; o1 = entry.p1; // Prevent useless write & repaint operations. if (o0 == n0 && o1 == n1) return; ...
else
else if (n1 == p1)
public void changeHighlight(Object tag, int n0, int n1) throws BadLocationException { int o0, o1; checkPositions(n0, n1); HighlightEntry entry = (HighlightEntry) tag; o0 = entry.p0; o1 = entry.p1; // Prevent useless write & repaint operations. if (o0 == n0 && o1 == n1) return; ...
fds = n0; fde = o0; } if (o1 < n1) { sds = o1; sde = n1; } else { sds = n1; sde = o1; } if (fde == sds) ui.damageRange(textComponent, fds, sde); else { if (fds != fde) ui.damageRange(textComponent, fds, fde); if (sds != sde) ui.damageRange(textComponent, sds, sde); }
ui.damageRange(textComponent, Math.min(p0, n0), Math.max(p0, n0));
public void changeHighlight(Object tag, int n0, int n1) throws BadLocationException { int o0, o1; checkPositions(n0, n1); HighlightEntry entry = (HighlightEntry) tag; o0 = entry.p0; o1 = entry.p1; // Prevent useless write & repaint operations. if (o0 == n0 && o1 == n1) return; ...
ui.damageRange(textComponent, o0, o1);
ui.damageRange(textComponent, p0, p1);
public void changeHighlight(Object tag, int n0, int n1) throws BadLocationException { int o0, o1; checkPositions(n0, n1); HighlightEntry entry = (HighlightEntry) tag; o0 = entry.p0; o1 = entry.p1; // Prevent useless write & repaint operations. if (o0 == n0 && o1 == n1) return; ...
e.p0 = doc.createPosition(n0); e.p1 = doc.createPosition(n1); }
public void changeHighlight(Object tag, int n0, int n1) throws BadLocationException { int o0, o1; checkPositions(n0, n1); HighlightEntry entry = (HighlightEntry) tag; o0 = entry.p0; o1 = entry.p1; // Prevent useless write & repaint operations. if (o0 == n0 && o1 == n1) return; ...
entry.painter.paint(g, entry.p0, entry.p1, bounds, textComponent);
if (! (entry instanceof LayerHighlightEntry)) entry.painter.paint(g, entry.getStartOffset(), entry.getEndOffset(), bounds, textComponent);
public void paint(Graphics g) { int size = highlights.size(); // Check if there are any highlights. if (size == 0) return; // Prepares the rectangle of the inner drawing area. Insets insets = textComponent.getInsets(); Shape bounds = new Rectangle(insets.left, i...
throws NotImplementedException
public void paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view) throws NotImplementedException { // TODO: Implement this properly. }
for (Iterator i = highlights.iterator(); i.hasNext();) { Object o = i.next(); if (o instanceof LayerHighlightEntry) { LayerHighlightEntry entry = (LayerHighlightEntry) o; int start = entry.getStartOffset(); int end = entry.getEndOffset(); if ((p0 < start && p1 > start) || (p0 >= start && p0 < end)) entry.paintLayeredHi...
public void paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view) throws NotImplementedException { // TODO: Implement this properly. }
int minX = 0; int maxX = 0; int minY = 0; int maxY = 0; int p0 = -1; int p1 = -1; for (Iterator i = highlights.iterator(); i.hasNext();) { HighlightEntry e = (HighlightEntry) i.next(); if (e instanceof LayerHighlightEntry) { LayerHighlightEntry le = (LayerHighlightEntry) e; Rectangle r = le.paintRect; minX = Math.min(r...
public void removeAllHighlights() { highlights.clear(); }
HighlightEntry entry = (HighlightEntry) tag; textComponent.getUI().damageRange(textComponent, entry.p0, entry.p1);
public void removeHighlight(Object tag) { highlights.remove(tag); HighlightEntry entry = (HighlightEntry) tag; textComponent.getUI().damageRange(textComponent, entry.p0, entry.p1); }
log.debug("paint from screen");
protected void paintComponent(Graphics g) { log.debug("paint from screen"); if (bi == null) { checkOffScreenImage(); }// screen.paintComponent3(g); Graphics2D g2 = (Graphics2D) g; // Rectangle r = g.getClipBounds(); g2.setColor(bi.colorBg); g2.fillRect(0, 0, getWidth(), getHeight()); bi...
repaint();
screen.repaintScreen();
public void resizeMe() {// screen.setBounds(getDrawingBounds()); //this is from screen5250 screen.setCursorActive(false); Rectangle r = getDrawingBounds(); if (bi != null) bi.resizeScreenArea(r.width, r.height); repaint();// screen.repaintScreen(); screen.setCursorActive(true); }
pattern = applyLocalizedPattern (pattern, localChars, standardChars);
pattern = translateLocalizedPattern(pattern, localChars, standardChars);
public void applyLocalizedPattern(String pattern) { String localChars = formatData.getLocalPatternChars(); pattern = applyLocalizedPattern (pattern, localChars, standardChars); applyPattern(pattern); }
FieldSizePair current = null;
CompiledField current = null;
private void compileFormat(String pattern) { // Any alphabetical characters are treated as pattern characters // unless enclosed in single quotes. char thisChar; int pos; int field; FieldSizePair current = null; for (int i=0; i<pattern.length(); i++) { thisChar = pattern.charAt(i); fi...
field = formatData.getLocalPatternChars().indexOf(thisChar);
field = standardChars.indexOf(thisChar);
private void compileFormat(String pattern) { // Any alphabetical characters are treated as pattern characters // unless enclosed in single quotes. char thisChar; int pos; int field; FieldSizePair current = null; for (int i=0; i<pattern.length(); i++) { thisChar = pattern.charAt(i); fi...
tokens.add(new FieldSizePair(-1,0));
throw new IllegalArgumentException("Invalid letter " + thisChar + "encountered at character " + i + ".");
private void compileFormat(String pattern) { // Any alphabetical characters are treated as pattern characters // unless enclosed in single quotes. char thisChar; int pos; int field; FieldSizePair current = null; for (int i=0; i<pattern.length(); i++) { thisChar = pattern.charAt(i); fi...
tokens.add(new FieldSizePair(-1,0));
throw new IllegalArgumentException("Quotes starting at character " + i + " not closed.");
private void compileFormat(String pattern) { // Any alphabetical characters are treated as pattern characters // unless enclosed in single quotes. char thisChar; int pos; int field; FieldSizePair current = null; for (int i=0; i<pattern.length(); i++) { thisChar = pattern.charAt(i); fi...
current = new FieldSizePair(field,1);
current = new CompiledField(field,1,thisChar);
private void compileFormat(String pattern) { // Any alphabetical characters are treated as pattern characters // unless enclosed in single quotes. char thisChar; int pos; int field; FieldSizePair current = null; for (int i=0; i<pattern.length(); i++) { thisChar = pattern.charAt(i); fi...
if (o instanceof FieldSizePair)
if (o instanceof CompiledField)
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
FieldSizePair p = (FieldSizePair) o;
CompiledField cf = (CompiledField) o;
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
switch (p.field)
switch (cf.getField())
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
if (p.size == 2)
if (cf.getSize() == 2)
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
withLeadingZeros (calendar.get (Calendar.YEAR), p.size, buffer);
withLeadingZeros (calendar.get (Calendar.YEAR), cf.getSize(), buffer);
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
if (p.size < 3) withLeadingZeros (calendar.get (Calendar.MONTH) + 1, p.size, buffer); else if (p.size < 4)
if (cf.getSize() < 3) withLeadingZeros (calendar.get (Calendar.MONTH) + 1, cf.getSize(), buffer); else if (cf.getSize() < 4)
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
withLeadingZeros (calendar.get (Calendar.DATE), p.size, buffer);
withLeadingZeros (calendar.get (Calendar.DATE), cf.getSize(), buffer);
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
p.size, buffer);
cf.getSize(), buffer);
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
withLeadingZeros (calendar.get (Calendar.HOUR_OF_DAY), p.size, buffer);
withLeadingZeros (calendar.get (Calendar.HOUR_OF_DAY), cf.getSize(), buffer);
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
withLeadingZeros (calendar.get (Calendar.MILLISECOND), p.size, buffer);
withLeadingZeros (calendar.get (Calendar.MILLISECOND), cf.getSize(), buffer);
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
if (p.size < 4)
if (cf.getSize() < 4)
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
withLeadingZeros (calendar.get (Calendar.DAY_OF_YEAR), p.size, buffer);
withLeadingZeros (calendar.get (Calendar.DAY_OF_YEAR), cf.getSize(), buffer);
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
withLeadingZeros (((calendar.get (Calendar.HOUR) + 11) % 12) + 1, p.size, buffer);
withLeadingZeros (((calendar.get (Calendar.HOUR) + 11) % 12) + 1, cf.getSize(), buffer);
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
withLeadingZeros (calendar.get (Calendar.HOUR), p.size, buffer);
withLeadingZeros (calendar.get (Calendar.HOUR), cf.getSize(), buffer);
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
String zoneID = zone.getDisplayName (isDST, p.size > 3 ? TimeZone.LONG : TimeZone.SHORT);
String zoneID = zone.getDisplayName (isDST, cf.getSize() > 3 ? TimeZone.LONG : TimeZone.SHORT);
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
throw new IllegalArgumentException ("Illegal pattern character " + p.field);
throw new IllegalArgumentException ("Illegal pattern character " + cf.getCharacter());
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
|| p.field == pos.getField()))
|| cf.getField() == pos.getField()))
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (iter.hasN...
catch (IllegalArgumentException e) { throw new InvalidObjectException("The stream pattern was invalid."); } }
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); if (serialVersionOnStream < 1) { computeCenturyStart (); serialVersionOnStream = 1; } else // Ensure that defaultCentury gets set. set2DigitYearStart(defau...
return applyLocalizedPattern (pattern, standardChars, localChars);
return translateLocalizedPattern(pattern, standardChars, localChars);
public String toLocalizedPattern() { String localChars = formatData.getLocalPatternChars(); return applyLocalizedPattern (pattern, standardChars, localChars); }
StringBuffer output = new StringBuffer(); Iterator i = tokens.iterator(); while (i.hasNext()) { output.append(i.next().toString()); }
StringBuilder output = new StringBuilder(getClass().getName()); output.append("[tokens="); output.append(tokens); output.append(", formatData="); output.append(formatData); output.append(", defaultCenturyStart="); output.append(defaultCenturyStart); output.append(", defaultCentury="); output.append(defaultCentury); out...
public String toString() { StringBuffer output = new StringBuffer(); Iterator i = tokens.iterator(); while (i.hasNext()) { output.append(i.next().toString()); } return output.toString(); }
leadPath = null;
public void clearSelection() { selection = null; }
void setParentImpl(View p)
private void setParentImpl(View p)
void setParentImpl(View p) { if (p != null) { Component c = getComponent(); p.getContainer().add(c); } else { Component c = getComponent(); Container parent = c.getParent(); parent.remove(c); comp = null; } }
super.setParent(p);
void setParentImpl(View p) { if (p != null) { Component c = getComponent(); p.getContainer().add(c); } else { Component c = getComponent(); Container parent = c.getParent(); parent.remove(c); comp = null; } }
log.info("New session Manager initialized");
private void initialize() { sessions = new Sessions(); configs = new Vector(3); }
public boolean canImport (JComponent c, DataFlavor[] flavors)
public boolean canImport(JComponent c, DataFlavor[] flavors) throws NotImplementedException
public boolean canImport (JComponent c, DataFlavor[] flavors) { return false; }
throws NotImplementedException
protected Transferable createTransferable(JComponent c) { return null; }
public void exportAsDrag (JComponent c, InputEvent e, int action)
public void exportAsDrag(JComponent c, InputEvent e, int action) throws NotImplementedException
public void exportAsDrag (JComponent c, InputEvent e, int action) { // TODO: Implement this properly }
protected void exportDone (JComponent c, Transferable data, int action)
protected void exportDone(JComponent c, Transferable data, int action) throws NotImplementedException
protected void exportDone (JComponent c, Transferable data, int action) { // TODO: Implement this properly }
throws NotImplementedException
public void exportToClipboard(JComponent c, Clipboard clip, int action) { // TODO: Implement this properly }
public boolean importData (JComponent c, Transferable t)
public boolean importData(JComponent c, Transferable t) throws NotImplementedException
public boolean importData (JComponent c, Transferable t) { return false; }
if (groupObject != null) { if (groupMemberHash.add(groupObject)) { groupObject.addMemberObject(this); return groupObject; } else { Log.error("Can't add to group. already a member of the group" + groupObject.getName());
if (groupMemberHash.add(groupObject)) { groupObject.addMemberObject(this); return groupObject; } else { Log.errorln("Can't add to group. already a member of the group" + groupObject.getName());
public Group addToGroup(Group groupObject) { if (groupObject != null) { if (groupMemberHash.add(groupObject)) { //add in successful groupObject.addMemberObject(this); return groupObject; // bad, should return based on success of adding } else { Log.error("Can't add to group. alread...
} } else { Log.error("Error: the group object to add to is null"); return null;
public Group addToGroup(Group groupObject) { if (groupObject != null) { if (groupMemberHash.add(groupObject)) { //add in successful groupObject.addMemberObject(this); return groupObject; // bad, should return based on success of adding } else { Log.error("Can't add to group. alread...
return cloneObj;
protected Object clone () throws CloneNotSupportedException{ //shallow copy for fields BaseObject cloneObj = (BaseObject) super.clone(); // deep copy the attriOrder synchronized (this.attribOrder) { synchronized (cloneObj.attribOrder) { cloneObj.attribOrder = Collections.synchronizedList(n...
if (sPrettyXDFOutput) writeOut(outputstream, indent);
if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent);
private String dealWithClosingGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(this.openGroupNodeHash) { Iterator iter = this.openGroupNodeHash.iterator();...
if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE);
if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, Constants.NEW_LINE);
private String dealWithClosingGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(this.openGroupNodeHash) { Iterator iter = this.openGroupNodeHash.iterator();...
indent = indent.substring(0,indent.length() - sPrettyXDFOutputIndentation.length());
indent = indent.substring(0,indent.length() - Specification.getInstance().getPrettyXDFOutputIndentation().length());
private String dealWithClosingGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(this.openGroupNodeHash) { Iterator iter = this.openGroupNodeHash.iterator();...
newIndent.append(sPrettyXDFOutputIndentation);
newIndent.append(Specification.getInstance().getPrettyXDFOutputIndentation());
private String dealWithOpeningGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { StringBuffer newIndent = new StringBuffer(indent); // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(this.openGroupNodeHash) { ...
int size = attribHash.size(); for (int i = 0; i < size; i++) { String attribName = (String) attribOrder.get(i); XMLAttribute obj = (XMLAttribute) attribHash.get(attribName); if (obj != null && obj.attribValue != null) { if ( obj.attribType == Constants.STRING_TYPE) {
synchronized (attribHash) { int size = attribHash.size(); for (int i = 0; i < size; i++) { String attribName = (String) attribOrder.get(i); XMLAttribute obj = (XMLAttribute) attribHash.get(attribName); if (obj != null && obj.attribValue != null) { if ( obj.attribType == Constants.STRING_TYPE) {
protected Hashtable getXMLInfo () { Hashtable xmlInfo = new Hashtable(); ArrayList attribList = new ArrayList(); ArrayList objRefList = new ArrayList(); int size = attribHash.size(); for (int i = 0; i < size; i++) { String attribName = (String) attribOrder.get(i); XMLAttribute obj = (XMLAttri...
if (attribName.equals(sPCDATAAttribute)) { xmlInfo.put("PCDATA", obj.attribValue); } else { Hashtable item = new Hashtable(); item.put("name", attribName); item.put("value", obj.attribValue); attribList.add(item); } } else { if(obj.attribType == Constants.NUMBER_TYPE || obj.attribType == Constants.STRING_OR_NUMBER_TYPE...
if (attribName.equals(Specification.getInstance().getPCDATAAttribute())) { xmlInfo.put("PCDATA", obj.attribValue); }else {
protected Hashtable getXMLInfo () { Hashtable xmlInfo = new Hashtable(); ArrayList attribList = new ArrayList(); ArrayList objRefList = new ArrayList(); int size = attribHash.size(); for (int i = 0; i < size; i++) { String attribName = (String) attribOrder.get(i); XMLAttribute obj = (XMLAttri...
item.put("type", obj.attribType); objRefList.add(item);
attribList.add(item); } } else { if(obj.attribType == Constants.NUMBER_TYPE || obj.attribType == Constants.STRING_OR_NUMBER_TYPE) { Hashtable item = new Hashtable(); item.put("name", attribName); item.put("value", obj.attribValue.toString()); attribList.add(item); } else { if ((obj.attribType !=Constants.LIST_TYPE) || ...
protected Hashtable getXMLInfo () { Hashtable xmlInfo = new Hashtable(); ArrayList attribList = new ArrayList(); ArrayList objRefList = new ArrayList(); int size = attribHash.size(); for (int i = 0; i < size; i++) { String attribName = (String) attribOrder.get(i); XMLAttribute obj = (XMLAttri...
}
protected Hashtable getXMLInfo () { Hashtable xmlInfo = new Hashtable(); ArrayList attribList = new ArrayList(); ArrayList objRefList = new ArrayList(); int size = attribHash.size(); for (int i = 0; i < size; i++) { String attribName = (String) attribOrder.get(i); XMLAttribute obj = (XMLAttri...
xmlInfo.put("attribList", attribList); xmlInfo.put("childObjList", objRefList); return xmlInfo;
xmlInfo.put("attribList", attribList); xmlInfo.put("childObjList", objRefList); } return xmlInfo;
protected Hashtable getXMLInfo () { Hashtable xmlInfo = new Hashtable(); ArrayList attribList = new ArrayList(); ArrayList objRefList = new ArrayList(); int size = attribHash.size(); for (int i = 0; i < size; i++) { String attribName = (String) attribOrder.get(i); XMLAttribute obj = (XMLAttri...
int size = attribOrder.size(); for (int i = 0; i < size; i++) { attribute = attribOrder.get(i); obj = InitAttributeTable.get(attribute);
if (obj != null) { XMLAttribute toRemove = (XMLAttribute) attribHash.remove(attribute); attribHash.put(attribute, new XMLAttribute(obj, toRemove.getAttribType())); }
protected void hashtableInitXDFAttributes (Hashtable InitAttributeTable) { Object attribute; Object obj; int size = attribOrder.size(); for (int i = 0; i < size; i++) { attribute = attribOrder.get(i); obj = InitAttributeTable.get(attribute); // only if object exists if (obj != nu...
if (obj != null) { XMLAttribute toRemove = (XMLAttribute) attribHash.remove(attribute); attribHash.put(attribute, new XMLAttribute(obj, toRemove.getAttribType()));
protected void hashtableInitXDFAttributes (Hashtable InitAttributeTable) { Object attribute; Object obj; int size = attribOrder.size(); for (int i = 0; i < size; i++) { attribute = attribOrder.get(i); obj = InitAttributeTable.get(attribute); // only if object exists if (obj != nu...
if ( (groupObject != null) && groupMemberHash.contains(groupObject))
if ( groupMemberHash.contains(groupObject))
public boolean isGroupMember(Group groupObject) { if ( (groupObject != null) && groupMemberHash.contains(groupObject)) return true; else return false; }
if (groupObject != null) {
public Group removeFromGroup (Group groupObject) { if (groupObject != null) { if (groupMemberHash.contains(groupObject)) { //this object does belong to the indicated Group object groupObject.removeMemberObject((Object) this); groupMemberHash.remove(groupObject); return groupObjec...
Log.error("Can't delete from group. not a member of the group" +
Log.errorln("Can't delete from group. not a member of the group" +
public Group removeFromGroup (Group groupObject) { if (groupObject != null) { if (groupMemberHash.contains(groupObject)) { //this object does belong to the indicated Group object groupObject.removeMemberObject((Object) this); groupMemberHash.remove(groupObject); return groupObjec...
} else { Log.error("Error: The group to add to is null"); return null; }
public Group removeFromGroup (Group groupObject) { if (groupObject != null) { if (groupMemberHash.contains(groupObject)) { //this object does belong to the indicated Group object groupObject.removeMemberObject((Object) this); groupMemberHash.remove(groupObject); return groupObjec...
if (fromList != null) { if ( what != null) { int index = fromList.indexOf(what); if (index !=-1) { fromList.remove(index); return true; } else { Log.warn("warn: can't find object in" + listName +
int index = fromList.indexOf(what); if (index !=-1) { fromList.remove(index); return true; } else { Log.warn("warn: can't find object in" + listName +
protected boolean removeFromList ( Object what, List fromList, String listName ) { if (fromList != null) { if ( what != null) { int index = fromList.indexOf(what); if (index !=-1) { //object to be removed is found in the list fromList.remove(index); return true; } ...
return false; } } else { Log.error("Error: object to remove is null"); return false; } } else { Log.error("Error: Passed list to remove from is null, no object to remove");
protected boolean removeFromList ( Object what, List fromList, String listName ) { if (fromList != null) { if ( what != null) { int index = fromList.indexOf(what); if (index !=-1) { //object to be removed is found in the list fromList.remove(index); return true; } ...
if (attrs != null) { int size = attrs.getLength(); for (int i = 0; i < size; i++) { String name = attrs.getName(i); String value = attrs.getValue(i); if (this.attribHash.containsKey(name)) { ((XMLAttribute) this.attribHash.get(name)).setAttribValue(value); } else Log.errorln("Error: cant set XMLAttribute:["+name+"], d...
synchronized (attribHash) { if (attrs != null) { int size = attrs.getLength(); for (int i = 0; i < size; i++) { String name = attrs.getName(i); String value = attrs.getValue(i); if (name != null && value != null) ((XMLAttribute) this.attribHash.get(name)).setAttribValue(value); } } }
protected void setXMLAttributes (AttributeList attrs) { // set object attributes from an AttributeList if (attrs != null) { // whip thru the list, setting each value int size = attrs.getLength(); for (int i = 0; i < size; i++) { String name = attrs.getName(i); String v...
String nodeNameString = this.classXDFNodeName;
synchronized (attribHash) { String nodeNameString = this.classXDFNodeName;
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
} if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); } Hashtable xmlInfo = getXMLInfo(); ArrayList attribs...
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i);
if (nodeNameString != null) {
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
if (item.get("type") == Constants.LIST_TYPE) {
if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent);
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
List objectList = (List) item.get("value"); synchronized(objectList) { Iterator iter = objectList.iterator(); while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) {
if ( nodeNameString.equals(Specification.getInstance().getXDFStructureNodeName()) && !XMLDeclAttribs.isEmpty() ) nodeNameString = Specification.getInstance().getXDFRootNodeName(); writeOut(outputstream,"<" + nodeNameString); } Hashtable xmlInfo = getXMLInfo(); ArrayList attribs = (ArrayList) xmlInfo.get("attribL...
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
String newindent = indent + sPrettyXDFOutputIndentation;
String newindent = indent + Specification.getInstance().getPrettyXDFOutputIndentation();
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
else if (item.get("type") == Constants.OBJECT_TYPE)
if(pcdata != null) { writeOut(outputstream, pcdata); }; if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null)
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; con...
if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent + Specification.getInstance().getPrettyXDFOutputIndentation()); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, Constants.NEW_LINE); } if (nodeN...
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
Log.errorln("Weird error: unknown XML attribute type for item:"+item);
writeOut(outputstream, "/>");
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
if(pcdata != null) { writeOut(outputstream, pcdata); }; if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(o...
if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, Constants.NEW_LINE); }
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
writeOut(outputstream, " version=\"" + sXMLSpecVersion + "\"");
writeOut(outputstream, " version=\"" + Specification.getInstance().getXMLSpecVersion() + "\"");
private void writeXMLDeclToOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs ) { // initial statement writeOut(outputstream, "<?xml"); writeOut(outputstream, " version=\"" + sXMLSpecVersion + "\""); // pr...
if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE);
if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, Constants.NEW_LINE);
private void writeXMLDeclToOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs ) { // initial statement writeOut(outputstream, "<?xml"); writeOut(outputstream, " version=\"" + sXMLSpecVersion + "\""); // pr...
if(classXDFNodeName != null && classXDFNodeName.equals(sXDFStructureNodeName) ) { writeOut(outputstream, "<!DOCTYPE " + XMLDeclAttribs.get("rootName") + " SYSTEM \""
if(classXDFNodeName != null && classXDFNodeName.equals(Specification.getInstance().getXDFStructureNodeName()) ) { writeOut(outputstream, "<!DOCTYPE " + XMLDeclAttribs.get("rootName") + " SYSTEM \""
private void writeXMLDeclToOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs ) { // initial statement writeOut(outputstream, "<?xml"); writeOut(outputstream, " version=\"" + sXMLSpecVersion + "\""); // pr...
if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } else Log.errorln("Passed XMLDeclAttributes table lacks either dtdName, rootName entries, ignoring DOCTYPE line printout");
if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, Constants.NEW_LINE); } else Log.errorln("Passed XMLDeclAttributes table lacks either dtdName, rootName entries, ignoring DOCTYPE line printout");
private void writeXMLDeclToOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs ) { // initial statement writeOut(outputstream, "<?xml"); writeOut(outputstream, " version=\"" + sXMLSpecVersion + "\""); // pr...
frame = new Gui5250Frame(this);
My5250 () { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) { } frame = new Gui5250Frame(this); loadSessions(); int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.pars...
int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.parseInt(sessions.getProperty("emul.width")); if (sessions.containsKey("emul.height")) height = Integer.parseInt(sessions.getProperty("emul.height")); frame.setSize(width,height); centerFrame(); frame.sessionPane.addChangeLis...
My5250 () { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) { } frame = new Gui5250Frame(this); loadSessions(); int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.pars...
ImageIcon tnicon = createImageIcon("tnicon.jpg"); frame.setIconImage(tnicon.getImage()); sessionsV = new Vector();
tnicon = createImageIcon("tnicon.jpg"); frames = new Vector(); newView();
My5250 () { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) { } frame = new Gui5250Frame(this); loadSessions(); int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.pars...
out.flush(); out.close(); boot.close();
static private boolean checkBootStrapper (String[] args) { try { Socket boot = new Socket("localhost", 3036); PrintWriter out = new PrintWriter(boot.getOutputStream(), true); // parse args into a string to send to the other instance of // tn5250j String opts = null; ...