rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
thumbRect.width = getMinimumThumbSize().width; thumbRect.height = trackRect.height;
thumbRect.x = trackRect.x; thumbRect.y = trackRect.y; if (scrollbar.getOrientation() == HORIZONTAL) { thumbRect.width = getMinimumThumbSize().width; thumbRect.height = trackRect.height; } else { thumbRect.width = trackRect.width; thumbRect.height = getMinimumThumbSize().height; } return thumbRect;
protected Rectangle getThumbBounds() { int max = scrollbar.getMaximum(); int min = scrollbar.getMinimum(); int value = scrollbar.getValue(); int extent = scrollbar.getVisibleAmount(); // System.err.println(this + ".getThumbBounds()"); if (max == min) { thumbRect.x = trackRect.x; thumbR...
else { thumbRect.width = trackRect.width; thumbRect.height = getMinimumThumbSize().height; } return thumbRect; }
protected Rectangle getThumbBounds() { int max = scrollbar.getMaximum(); int min = scrollbar.getMinimum(); int value = scrollbar.getValue(); int extent = scrollbar.getVisibleAmount(); // System.err.println(this + ".getThumbBounds()"); if (max == min) { thumbRect.x = trackRect.x; thumbR...
scrollTimer = new Timer(50, null); scrollTimer.setRepeats(true);
scrollTimer = new Timer(300, null);
public void installUI(JComponent c) { super.installUI(c); if (c instanceof JScrollBar) { scrollbar = (JScrollBar) c; trackRect = new Rectangle(); thumbRect = new Rectangle(); scrollTimer = new Timer(50, null); scrollTimer.setRepeats(true); installComponents(); installDefaults(); configureScrollBarColors()...
updateImage(dirty);
updateImage(r);
public void updateDirty() { // update the image updateImage(dirty); // update dirty to show that we have already painted that region of the // screen so do not do it again. dirty.setBounds(dirty.x,dirty.height,dirty.width,(int)(tArea.getHeight() - dirty.height)); }
Element el = view.getElement();
public float getSpan(GlyphView view, int p0, int p1, TabExpander te, float x) { Element el = view.getElement(); Font font = view.getFont(); FontMetrics fm = Toolkit.getDefaultToolkit().getFontMetrics(font); Segment txt = view.getText(p0, p1); int span = Utilities....
int width = fm.charsWidth(txt.array, txt.offset, txt.count);
Rectangle bounds = a instanceof Rectangle ? (Rectangle) a : a.getBounds(); TabExpander expander = view.getTabExpander(); int width = Utilities.getTabbedTextWidth(txt, fm, bounds.x, expander, view.getStartOffset());
public Shape modelToView(GlyphView view, int pos, Position.Bias b, Shape a) throws BadLocationException { Element el = view.getElement(); Font font = view.getFont(); FontMetrics fm = view.getContainer().getFontMetrics(font); Segment txt = view.getText(el.getSt...
Rectangle bounds = a.getBounds();
public Shape modelToView(GlyphView view, int pos, Position.Bias b, Shape a) throws BadLocationException { Element el = view.getElement(); Font font = view.getFont(); FontMetrics fm = view.getContainer().getFontMetrics(font); Segment txt = view.getText(el.getSt...
bounds.x + width, height);
0, height);
public Shape modelToView(GlyphView view, int pos, Position.Bias b, Shape a) throws BadLocationException { Element el = view.getElement(); Font font = view.getFont(); FontMetrics fm = view.getContainer().getFontMetrics(font); Segment txt = view.getText(el.getSt...
if (view.isSuperscript()) Utilities.drawTabbedText(txt, bounds.x, bounds.y + ascent - height / 2, g, tabEx, txt.offset); else if (view.isSubscript()) Utilities.drawTabbedText(txt, bounds.x, bounds.y + ascent + height / 2, g, tabEx, txt.offset); else
public void paint(GlyphView view, Graphics g, Shape a, int p0, int p1) { Color oldColor = g.getColor(); int height = (int) getHeight(view); Segment txt = view.getText(p0, p1); Rectangle bounds = a.getBounds(); TabExpander tabEx = null; View parent = view.getPare...
g.drawLine(bounds.x, bounds.y + strikeHeight, bounds.height + width,
g.drawLine(bounds.x, bounds.y + strikeHeight, bounds.x + width,
public void paint(GlyphView view, Graphics g, Shape a, int p0, int p1) { Color oldColor = g.getColor(); int height = (int) getHeight(view); Segment txt = view.getText(p0, p1); Rectangle bounds = a.getBounds(); TabExpander tabEx = null; View parent = view.getPare...
g.drawLine(bounds.x, bounds.y + lineHeight, bounds.height + width,
g.drawLine(bounds.x, bounds.y + lineHeight, bounds.x + width,
public void paint(GlyphView view, Graphics g, Shape a, int p0, int p1) { Color oldColor = g.getColor(); int height = (int) getHeight(view); Segment txt = view.getText(p0, p1); Rectangle bounds = a.getBounds(); TabExpander tabEx = null; View parent = view.getPare...
GlyphPainter painter = getGlyphPainter();
public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); // Try to find a suitable line break. BreakIterator lineBreaker = BreakIterator.getLineInstance(); Segment txt = new Segment(); try ...
BreakIterator lineBreaker = BreakIterator.getLineInstance();
public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); // Try to find a suitable line break. BreakIterator lineBreaker = BreakIterator.getLineInstance(); Segment txt = new Segment(); try ...
checkPainter();
public float getAlignment(int axis) { float align; if (axis == Y_AXIS) { checkPainter(); GlyphPainter painter = getGlyphPainter(); float height = painter.getHeight(this); float descent = painter.getDescent(this); align = (height - descent) / height; } else ...
align = (height - descent) / height;
float ascent = painter.getAscent(this); if (isSuperscript()) align = 1.0F; else if (isSubscript()) align = height > 0 ? (height - (descent + (ascent / 2))) / height : 0; else align = height > 0 ? (height - descent) / height : 0;
public float getAlignment(int axis) { float align; if (axis == Y_AXIS) { checkPainter(); GlyphPainter painter = getGlyphPainter(); float height = painter.getHeight(this); float descent = painter.getDescent(this); align = (height - descent) / height; } else ...
Element el = getElement(); AttributeSet atts = el.getAttributes(); String family = StyleConstants.getFontFamily(atts); int size = StyleConstants.getFontSize(atts); int style = Font.PLAIN; if (StyleConstants.isBold(atts)) style |= Font.BOLD; if (StyleConstants.isItalic(atts)) style |= Font.ITALIC; Font font = new Font(f...
Document doc = getDocument(); Font font = null; if (doc instanceof StyledDocument) { StyledDocument styledDoc = (StyledDocument) doc; font = styledDoc.getFont(getAttributes()); } else { Container c = getContainer(); if (c != null) font = c.getFont(); }
public Font getFont() { Element el = getElement(); AttributeSet atts = el.getAttributes(); String family = StyleConstants.getFontFamily(atts); int size = StyleConstants.getFontSize(atts); int style = Font.PLAIN; if (StyleConstants.isBold(atts)) style |= Font.BOLD; if (StyleConstants.isIta...
if (axis == X_AXIS)
switch (axis)
public float getPreferredSpan(int axis) { float span = 0; checkPainter(); GlyphPainter painter = getGlyphPainter(); if (axis == X_AXIS) { Element el = getElement(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (T...
Element el = getElement();
case X_AXIS:
public float getPreferredSpan(int axis) { float span = 0; checkPainter(); GlyphPainter painter = getGlyphPainter(); if (axis == X_AXIS) { Element el = getElement(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (T...
else span = painter.getHeight(this);
public float getPreferredSpan(int axis) { float span = 0; checkPainter(); GlyphPainter painter = getGlyphPainter(); if (axis == X_AXIS) { Element el = getElement(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (T...
Element el = getElement();
public void paint(Graphics g, Shape a) { Element el = getElement(); checkPainter(); getGlyphPainter().paint(this, g, a, getStartOffset(), getEndOffset()); }
getGlyphPainter().paint(this, g, a, getStartOffset(), getEndOffset());
int p0 = getStartOffset(); int p1 = getEndOffset(); Container c = getContainer(); if (c instanceof JTextComponent) { JTextComponent tc = (JTextComponent) c; Highlighter h = tc.getHighlighter(); if (h instanceof LayeredHighlighter) { LayeredHighlighter lh = (LayeredHighlighter) h; lh.paintLayeredHighlights(g, p0, p1, ...
public void paint(Graphics g, Shape a) { Element el = getElement(); checkPainter(); getGlyphPainter().paint(this, g, a, getStartOffset(), getEndOffset()); }
{ return 12; }
{ return 13; }
public int getIconHeight() { return 12; }
{ return 12; }
{ return 13; }
public int getIconWidth() { return 12; }
{ g.translate(x, y); Color saved = g.getColor(); g.setColor(Color.BLACK); g.fillPolygon(new Polygon(new int[] { 3, 9, 3 }, new int[] { 2, 6, 10 }, 3)); g.setColor(saved); g.translate(-x, -y); }
{ Color saved = g.getColor(); g.setColor(Color.BLACK); g.drawLine(3 + x, 5 + y, 3 + x, 9 + y); g.drawLine(4 + x, 5 + y, 4 + x, 9 + y); g.drawLine(5 + x, 7 + y, 9 + x, 3 + y); g.drawLine(5 + x, 8 + y, 9 + x, 4 + y); g.setColor(saved); }
public void paintIcon(Component c, Graphics g, int x, int y) { g.translate(x, y); Color saved = g.getColor(); g.setColor(Color.BLACK); g.fillPolygon(new Polygon(new int[] { 3, 9, 3 }, new int[] { 2, 6, 10 }, 3)); g.setColor(saved); g.transla...
BufferedReader br = new BufferedReader(new InputStreamReader(in, "8859_1"));
BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
public void read(InputStream in) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(in, "8859_1")); read_main_section(getMainAttributes(), br); read_individual_sections(getEntries(), br); }
PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(out, "8859_1"))); write_main_section(getMainAttributes(), pw); pw.println(); write_individual_sections(getEntries(), pw); if (pw.checkError()) { throw new JarException("Error while writing manifest"); }
BufferedOutputStream bos = out instanceof BufferedOutputStream ? (BufferedOutputStream) out : new BufferedOutputStream(out, 4096); write_main_section(getMainAttributes(), bos); bos.write(CRLF); write_individual_sections(getEntries(), bos); bos.flush();
public void write(OutputStream out) throws IOException { PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(out, "8859_1"))); write_main_section(getMainAttributes(), pw); pw.println(); write_individual_sections(getEntries(), pw); if (pw.checkError()) { throw new Ja...
private static void write_attribute_entry(Map.Entry entry, PrintWriter pw) throws JarException
private static void write_attribute_entry(Map.Entry entry, OutputStream out) throws IOException
private static void write_attribute_entry(Map.Entry entry, PrintWriter pw) throws JarException { String name = entry.getKey().toString(); String value = entry.getValue().toString(); if (name.equalsIgnoreCase("Name")) { throw new JarException("Attributes cannot be called 'Name'"); } if (name.start...
write_header(name, value, pw);
write_header(name, value, out);
private static void write_attribute_entry(Map.Entry entry, PrintWriter pw) throws JarException { String name = entry.getKey().toString(); String value = entry.getValue().toString(); if (name.equalsIgnoreCase("Name")) { throw new JarException("Attributes cannot be called 'Name'"); } if (name.start...
private static void write_entry_attributes(Attributes attr, PrintWriter pw) throws JarException
private static void write_entry_attributes(Attributes attr, OutputStream out) throws IOException
private static void write_entry_attributes(Attributes attr, PrintWriter pw) throws JarException { Iterator it = attr.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); write_attribute_entry(entry, pw); } }
write_attribute_entry(entry, pw);
write_attribute_entry(entry, out);
private static void write_entry_attributes(Attributes attr, PrintWriter pw) throws JarException { Iterator it = attr.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); write_attribute_entry(entry, pw); } }
private static void write_header(String name, String value, PrintWriter pw) { pw.print(name + ": ");
private static void write_header(String name, String value, OutputStream out) throws IOException { String target = name + ": "; byte[] b = target.getBytes("UTF-8"); if (b.length > 72) throw new IOException("Attribute's name already longer than 70 bytes");
private static void write_header(String name, String value, PrintWriter pw) { pw.print(name + ": "); int last = 68 - name.length(); if (last > value.length()) { pw.println(value); } else { pw.println(value.substring(0, last)); } while (last < value.length()) { pw.print(" "); i...
int last = 68 - name.length(); if (last > value.length())
if (b.length == 72)
private static void write_header(String name, String value, PrintWriter pw) { pw.print(name + ": "); int last = 68 - name.length(); if (last > value.length()) { pw.println(value); } else { pw.println(value.substring(0, last)); } while (last < value.length()) { pw.print(" "); i...
pw.println(value);
out.write(b); out.write(CRLF); target = " " + value;
private static void write_header(String name, String value, PrintWriter pw) { pw.print(name + ": "); int last = 68 - name.length(); if (last > value.length()) { pw.println(value); } else { pw.println(value.substring(0, last)); } while (last < value.length()) { pw.print(" "); i...
pw.println(value.substring(0, last));
b = target.getBytes("UTF-8"); if (b.length < 73) { out.write(b); break; } n = 72; while (true) { b = target.substring(0, n).getBytes("UTF-8"); if (b.length < 73) break; n--; if (n < 1) throw new IOException("Header is unbreakable and longer than 72 bytes"); } out.write(b); out.write(CRLF); target = " " + target.sub...
private static void write_header(String name, String value, PrintWriter pw) { pw.print(name + ": "); int last = 68 - name.length(); if (last > value.length()) { pw.println(value); } else { pw.println(value.substring(0, last)); } while (last < value.length()) { pw.print(" "); i...
while (last < value.length()) { pw.print(" "); int end = (last + 69); if (end > value.length()) { pw.println(value.substring(last)); } else { pw.println(value.substring(last, end)); } last = end; }
out.write(CRLF);
private static void write_header(String name, String value, PrintWriter pw) { pw.print(name + ": "); int last = 68 - name.length(); if (last > value.length()) { pw.println(value); } else { pw.println(value.substring(0, last)); } while (last < value.length()) { pw.print(" "); i...
private static void write_individual_sections(Map entries, PrintWriter pw) throws JarException
private static void write_individual_sections(Map entries, OutputStream out) throws IOException
private static void write_individual_sections(Map entries, PrintWriter pw) throws JarException { Iterator it = entries.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); write_header("Name", entry.getKey().toString(), pw); write_entry_attributes((Attributes) entr...
write_header("Name", entry.getKey().toString(), pw); write_entry_attributes((Attributes) entry.getValue(), pw); pw.println();
write_header("Name", entry.getKey().toString(), out); write_entry_attributes((Attributes) entry.getValue(), out); out.write(CRLF);
private static void write_individual_sections(Map entries, PrintWriter pw) throws JarException { Iterator it = entries.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); write_header("Name", entry.getKey().toString(), pw); write_entry_attributes((Attributes) entr...
private static void write_main_attributes(Attributes attr, PrintWriter pw) throws JarException
private static void write_main_attributes(Attributes attr, OutputStream out) throws IOException
private static void write_main_attributes(Attributes attr, PrintWriter pw) throws JarException { Iterator it = attr.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); // Don't print the manifest version again if (!Attributes.Name.MANIFEST_VERSION.equals(entry.getK...
{ write_attribute_entry(entry, pw); }
write_attribute_entry(entry, out);
private static void write_main_attributes(Attributes attr, PrintWriter pw) throws JarException { Iterator it = attr.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); // Don't print the manifest version again if (!Attributes.Name.MANIFEST_VERSION.equals(entry.getK...
private static void write_main_section(Attributes attr, PrintWriter pw) throws JarException
private static void write_main_section(Attributes attr, OutputStream out) throws IOException
private static void write_main_section(Attributes attr, PrintWriter pw) throws JarException { write_version_info(attr, pw); write_main_attributes(attr, pw); }
write_version_info(attr, pw); write_main_attributes(attr, pw);
write_version_info(attr, out); write_main_attributes(attr, out);
private static void write_main_section(Attributes attr, PrintWriter pw) throws JarException { write_version_info(attr, pw); write_main_attributes(attr, pw); }
private static void write_version_info(Attributes attr, PrintWriter pw)
private static void write_version_info(Attributes attr, OutputStream out) throws IOException
private static void write_version_info(Attributes attr, PrintWriter pw) { // First check if there is already a version attribute set String version = attr.getValue(Attributes.Name.MANIFEST_VERSION); if (version == null) { version = "1.0"; } write_header(Attributes.Name.MANIFEST_VERSION.toString(), vers...
write_header(Attributes.Name.MANIFEST_VERSION.toString(), version, pw);
write_header(Attributes.Name.MANIFEST_VERSION.toString(), version, out);
private static void write_version_info(Attributes attr, PrintWriter pw) { // First check if there is already a version attribute set String version = attr.getValue(Attributes.Name.MANIFEST_VERSION); if (version == null) { version = "1.0"; } write_header(Attributes.Name.MANIFEST_VERSION.toString(), vers...
bad.minor = Minor.Any;
public static UnknownEncoding extract(Any any) { try { EmptyExceptionHolder h = (EmptyExceptionHolder) any.extract_Streamable(); return (UnknownEncoding) h.value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("UnknownEncoding expected"); bad...
public final boolean contains(Class cls) { return contains(cls.getName());
public final boolean contains(String className) { if (exceptions != null) { final int length = exceptions.length; for (int i = 0; i < length; i++) { final String name = exceptions[i].getClassName(); if (name.equals(className)) { return true; } } } return false;
public final boolean contains(Class cls) { return contains(cls.getName()); }
public PointerEvent(int buttons, int x, int y, boolean absolute) { this(buttons, x, y, 0, absolute);
public PointerEvent(int buttons, int x, int y, int z, boolean absolute) { this.buttons = buttons; this.x = x; this.y = y; this.z = z; this.absolute = absolute;
public PointerEvent(int buttons, int x, int y, boolean absolute) { this(buttons, x, y, 0, absolute); }
public void parse(Reader reader, HTMLEditorKit.ParserCallback a_callback,
public void parse(Reader reader, HTMLEditorKit.ParserCallback aCallback,
public void parse(Reader reader, HTMLEditorKit.ParserCallback a_callback, boolean ignoreCharSet ) throws IOException { callBack = a_callback; gnu.parse(reader); callBack.handleEndOfLineString(gnu.getEndOfLineSequence()); try { callBack.flush();...
callBack = a_callback;
callBack = aCallback;
public void parse(Reader reader, HTMLEditorKit.ParserCallback a_callback, boolean ignoreCharSet ) throws IOException { callBack = a_callback; gnu.parse(reader); callBack.handleEndOfLineString(gnu.getEndOfLineSequence()); try { callBack.flush();...
if (i == -1) { done = true; continue; }
public final byte[] readIncoming() throws IOException { boolean done = false; boolean negotiate = false; baosin.reset(); int j = -1; int i = 0; while(!done) { i = bin.read(); // We use the values instead of the static values IAC and EOR // because they ...
loadStream(abyte0, 0);
if (abyte0.length > 0) { loadStream(abyte0, 0); } else { done = true; vt.disconnect(); }
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { System.out.println(" run() " + ioef.getMessage()); } while (!done) { try { ...
int elementIndex = rootElement.getElementIndex(offset);
int oldElementIndex, elementIndex = rootElement.getElementIndex(offset);
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); ...
if (offset > 0)
if (offset > 0 && firstElement.getStartOffset() != offset)
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); ...
String str = content.getString(0, content.length());
String str = content.getString(offset, eventLength);
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); ...
int i = str.indexOf('\n', offset); while (i != -1 && i <= end)
int i = str.indexOf('\n', 0); int contentLength = content.length(); while (i != -1 && i <= eventLength)
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); ...
j, i + 1)); j = i + 1; if (j >= str.length())
j, offset + i + 1)); j = offset + i + 1; if (j >= contentLength)
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); ...
i = str.indexOf('\n', j);
i = str.indexOf('\n', i + 1);
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); ...
for (int k = 0; k < elts.size(); ++k) added[k] = (Element) elts.get(k);
elts.toArray(added);
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); ...
return null;
StringBuilder b = new StringBuilder(); b.append("<["); b.append(minimum); b.append(','); b.append(preferred); b.append(','); b.append(maximum); b.append("]@"); b.append(alignment); b.append('>'); return b.toString();
public String toString() { return null; // TODO }
if (Character.isISOControl(kc) || keyProcessed) { return;
if ((isLinux) && !((Character.isLetter(kc)) && (e.getModifiers() == 0 || e.getModifiers() == Event.SHIFT_MASK))) { if (Character.isISOControl(kc) || keyProcessed) { return; }
private void processVTKeyTyped(KeyEvent e){ char kc = e.getKeyChar();// displayInfo(e,"Typed processed " + keyProcessed); if (Character.isISOControl(kc) || keyProcessed) { return; }// displayInfo(e,"Typed processed " + keyProcessed); String s = "";// if (isLinux) {// ...
"Table.gridColor", getControlShadow(),
"Table.gridColor", getControlDarkShadow(), "Table.selectionBackground", new ColorUIResource(204, 204, 255), "Table.selectionForeground", new ColorUIResource(0, 0, 0),
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", get...
"TextField.border", MetalBorders.getTextFieldBorder(),
"TextField.border", new BorderUIResource(MetalBorders.getTextFieldBorder()),
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", get...
"ToggleButton.border", MetalBorders.getButtonBorder(),
"ToggleButton.border", MetalBorders.getToggleButtonBorder(),
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", get...
"ToggleButton.focus", new ColorUIResource(getFocusColor()),
"ToggleButton.focus", getFocusColor(),
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", get...
"ToggleButton.margin", new Insets(2, 14, 2, 14),
"ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14),
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", get...
testForValidEmit(obj, cls.getName());
try { testForValidEmit(obj, cls.getName()); } catch (JNodeClassNotFoundException ex) { throw new BuildException(ex); }
public final void emitObject(Object obj) throws BuildException, ClassNotFoundException { if (obj == null) { return; } final Class cls = obj.getClass(); testForValidEmit(obj, cls.getName()); if (debugWriter != null) { debugWriter.println("$" + Integer.toHexString(os.getLength())); if (obj instanceof char[]) ...
emitObject(cls, obj);
try { emitObject(cls, obj); } catch (JNodeClassNotFoundException ex) { throw new BuildException(ex); }
public final void emitObject(Object obj) throws BuildException, ClassNotFoundException { if (obj == null) { return; } final Class cls = obj.getClass(); testForValidEmit(obj, cls.getName()); if (debugWriter != null) { debugWriter.println("$" + Integer.toHexString(os.getLength())); if (obj instanceof char[]) ...
public FieldInfo getFieldInfo(Class jdkType) throws ClassNotFoundException {
public FieldInfo getFieldInfo(Class jdkType) throws ClassNotFoundException, JNodeClassNotFoundException {
public FieldInfo getFieldInfo(Class jdkType) throws ClassNotFoundException { final String cname = jdkType.getName(); FieldInfo info = (FieldInfo)fieldInfos.get(cname); if (info == null) { final VmType jnodeType = loaderContext.loadClass(cname, true); info = new FieldInfo(jdkType, jnodeType); ...
final VmType jnodeType = loaderContext.loadClass(cname, true);
VmType jnodeType = null; try { jnodeType = loaderContext.loadClass(cname, true); } catch (ClassNotFoundException ex) { throw new JNodeClassNotFoundException(cname); }
public FieldInfo getFieldInfo(Class jdkType) throws ClassNotFoundException { final String cname = jdkType.getName(); FieldInfo info = (FieldInfo)fieldInfos.get(cname); if (info == null) { final VmType jnodeType = loaderContext.loadClass(cname, true); info = new FieldInfo(jdkType, jnodeType); ...
public final void testForValidEmit(Object object, String location) throws BuildException {
public final void testForValidEmit(Object object, String location) throws BuildException, JNodeClassNotFoundException {
public final void testForValidEmit(Object object, String location) throws BuildException { if (object == null) { return; } else if (object instanceof BootableObject) { return; } else if (object.getClass().isArray()) { return; } else if (object instanceof Class) { return; } else { final String clsName...
for(int i=0; i<nameLen; i++) name.append( (char)Ext2Utils.get8(data, offset+8+i) ); Ext2Debugger.debug("Ext2DirectoryRecord(): iNode="+iNodeNr+", name="+name,3);
for (int i = 0; i < nameLen; i++) name.append((char) Ext2Utils.get8(data, offset + 8 + i)); log.debug("Ext2DirectoryRecord(): iNode=" + iNodeNr + ", name=" + name);
public Ext2DirectoryRecord(byte[] data, int offset) { iNodeNr = (int)Ext2Utils.get32(data, offset); recLen = Ext2Utils.get16(data, offset+4); nameLen = Ext2Utils.get8(data, offset+6); type = Ext2Utils.get8(data, offset+7); name = new StringBuffer(); if(iNodeNr!=0) { //XXX character conversion for(int i=0;...
bad.minor = Minor.Any;
public static NoContext extract(Any any) { try { EmptyExceptionHolder h = (EmptyExceptionHolder) any.extract_Streamable(); return (NoContext) h.value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("NoContext expected"); bad.initCaus...
throw new Error("not implemented");
DefaultDocumentEvent ev = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.CHANGE); buffer.change(offset, length, ev); Element root = getDefaultRootElement(); int paragraphCount = root.getElementCount(); for (int pindex = 0; pindex < paragraphCount; pindex++) { Element paragraph = root.getElement(...
public void setCharacterAttributes(int offset, int length, AttributeSet attributes, boolean replace) { // FIXME: Implement me. throw new Error("not implemented"); }
m.minor = Minor.UserException;
public static UnionMember read(InputStream istream) { try { UnionMember value = new UnionMember(); value.name = istream.read_string(); value.label = istream.read_any(); value.type = TypeCodeHelper.read(istream); value.type_def = IDLTypeHelper.read(istream); return va...
m.minor = Minor.UserException;
public static void write(OutputStream ostream, UnionMember value) { try { ostream.write_string(value.name); ostream.write_any(value.label); TypeCodeHelper.write(ostream, value.type); IDLTypeHelper.write(ostream, value.type_def); } catch (UserException ex) { MAR...
if (inputMap != null)
public KeyStroke[] allKeys() { Set set = new HashSet(); if (parent != null) { Object[] parentKeys = parent.allKeys(); if (parentKeys != null) set.addAll(Arrays.asList(parentKeys)); } set.addAll(inputMap.keySet()); if (set.size() == 0) return null; KeyStroke[] ...
if (inputMap != null)
public void clear() { inputMap.clear(); }
Object result = inputMap.get(keystroke);
Object result = null; if (inputMap != null) result = inputMap.get(keystroke);
public Object get(KeyStroke keystroke) { Object result = inputMap.get(keystroke); if (result == null && parent != null) result = parent.get(keystroke); return result; }
if (size() != 0)
if (inputMap != null)
public KeyStroke[] keys() { if (size() != 0) { KeyStroke[] array = new KeyStroke[size()]; return (KeyStroke[]) inputMap.keySet().toArray(array); } return null; }
if (keystroke == null) return; if (inputMap == null) inputMap = new HashMap();
public void put(KeyStroke keystroke, Object actionMapKey) { if (actionMapKey == null) inputMap.remove(keystroke); else inputMap.put(keystroke, actionMapKey); }
if (inputMap != null)
public void remove(KeyStroke keystroke) { inputMap.remove(keystroke); }
return inputMap.size();
int result = 0; if (inputMap != null) result = inputMap.size(); return result;
public int size() { return inputMap.size(); }
public ConfigurationElementModel(PluginDescriptorModel plugin, XMLElement e) throws PluginException { super(plugin); name = e.getName(); final Enumeration<?> aI = e.enumerateAttributeNames(); if (aI.hasMoreElements()) { final ArrayList<AttributeModel> list = new ArrayList<AttributeModel>(); while (aI.hasMoreElements()...
public ConfigurationElementModel(PluginDescriptorModel plugin, XMLElement e) throws PluginException { super(plugin); name = e.getName();
public ConfigurationElementModel(PluginDescriptorModel plugin, XMLElement e) throws PluginException { super(plugin); name = e.getName(); final Enumeration<?> aI = e.enumerateAttributeNames(); if (aI.hasMoreElements()) { final ArrayList<AttributeModel> list = new ArrayList<AttributeModel>(); while (aI.hasMo...
final ArrayList<ConfigurationElementModel> list = new ArrayList<ConfigurationElementModel>(); for (Iterator<?> i = e.getChildren().iterator(); i.hasNext(); ) { final XMLElement ce = (XMLElement)i.next(); list.add(new ConfigurationElementModel(plugin, ce)); } elements = (ConfigurationElement[])list.toArray(new Configura...
final Enumeration<?> aI = e.enumerateAttributeNames(); if (aI.hasMoreElements()) { final ArrayList<AttributeModel> list = new ArrayList<AttributeModel>(); while (aI.hasMoreElements()) { final String name = (String) aI.nextElement(); final String value = e.getStringAttribute(name); list.add(new AttributeModel(name, valu...
public ConfigurationElementModel(PluginDescriptorModel plugin, XMLElement e) throws PluginException { super(plugin); name = e.getName(); final Enumeration<?> aI = e.enumerateAttributeNames(); if (aI.hasMoreElements()) { final ArrayList<AttributeModel> list = new ArrayList<AttributeModel>(); while (aI.hasMo...
host.repaint(0, repaintRec.y, host.getWidth(), repaintRec.height);
host.repaint();
protected void damageLineRange (int line0, int line1, Shape a, Component host) { if (a == null) return; Rectangle rec0 = lineToRect(a, line0); Rectangle rec1 = lineToRect(a, line1); if (rec0 == null || rec1 == null) // something went wrong, repaint the entire host to be safe host.repaint()...
assert false : "BadLocationException should not be thrown here.";
float determineMaxLineLength() { // if the longest line is cached, return the cached value if (maxLineLength != -1) return maxLineLength; // otherwise we have to go through all the lines and find it Element el = getElement(); Segment seg = getLineBuffer(); float span = 0; for (int i = 0...
assert false : "BadLocationException should not be thrown here.";
protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) { Element el = getElement(); ElementChange ec = changes.getChange(el); // If ec is null then no lines were added or removed, just // repaint the changed line if (ec == null) { int line = getElement().getElement...
checkZipFile();
public ZipFile(String name) throws ZipException, IOException { this.raf = new RandomAccessFile(name, "r"); this.name = name; }
return null;
return EmptyEnumeration.getInstance();
public Enumeration entries() { try { return new ZipEntryEnumeration(getEntries().values().iterator()); } catch (IOException ioe) { return null; } }
checkClosed();
public ZipEntry getEntry(String name) { try { HashMap entries = getEntries(); ZipEntry entry = (ZipEntry) entries.get(name); // If we didn't find it, maybe it's a directory. if (entry == null && !name.endsWith("/")) entry = (ZipEntry) entries.get(name + '/'); return entry != null...
checkClosed();
public InputStream getInputStream(ZipEntry entry) throws IOException { HashMap entries = getEntries(); String name = entry.getName(); ZipEntry zipEntry = (ZipEntry) entries.get(name); if (zipEntry == null) return null; long start = checkLocalHeader(zipEntry); int method = zipEntry.getMethod(); InputStr...
public Manifest(InputStream in) throws IOException { this(); read(in);
public Manifest() { mainAttr = new Attributes(); entries = new Hashtable();
public Manifest(InputStream in) throws IOException { this(); read(in); }
public final void update(byte[]data, int off, int len) throws SignatureException
public final void update(byte b) throws SignatureException
public final void update(byte[]data, int off, int len) throws SignatureException { if (state != UNINITIALIZED) engineUpdate(data, off, len); else throw new SignatureException(); }
engineUpdate(data, off, len);
engineUpdate(b);
public final void update(byte[]data, int off, int len) throws SignatureException { if (state != UNINITIALIZED) engineUpdate(data, off, len); else throw new SignatureException(); }
String[] macrosList = macros.getMacroList();
String[] macrosList = Macronizer.getMacroList();
public static void loadMacros(Session session, Macronizer macros, JMenu menu) { final Session ses = session; Vector mv = new Vector(); Action action; menu.addSeparator(); String[] macrosList = macros.getMacroList(); for (int x = 0; x < macrosList.length; x++) { mv.add(macrosList...
{ return null; }
{ return StyleConstants.getComponent(getElement().getAttributes()); }
protected Component createComponent() { return null; }
int width = container.getWidth() - insets.left - insets.right - 1; int height = container.getHeight() - insets.top - insets.bottom - 1;
int width = container.getWidth() - insets.left - insets.right; int height = container.getHeight() - insets.top - insets.bottom;
public void layoutContainer(Container parent) { // Setup the SizeRequirements for both the X and Y axis. Component[] children = container.getComponents(); SizeRequirements[] hSizeReqs = new SizeRequirements[children.length]; SizeRequirements[] vSizeReqs = new SizeRequirements[children.length]; getSize...
return new Dimension(hReq.preferred, vReq.preferred);
Insets insets = container.getInsets(); return new Dimension(hReq.preferred + insets.left + insets.right, vReq.preferred + insets.top + insets.bottom);
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); // Setup the SizeRequirements for both the X and Y axis. Component[] children = container.getComponents(); SizeRequirements[] hSizeReqs = new SizeRequirements[children.length]; ...
this.index0 = index0; this.index1 = index1;
this.index0 = Math.min(index0, index1); this.index1 = Math.max(index0, index1);
public ListDataEvent(Object source, int type, int index0, int index1) { super(source); this.type = type; this.index0 = index0; this.index1 = index1; }
SessionAttributes sa = new SessionAttributes(propFileName,
SessionAttributes sa = null; if (me == null) sa = new SessionAttributes(propFileName, defaultProps, new JFrame()); else sa = new SessionAttributes(propFileName,
private void doAttributes() { SessionAttributes sa = new SessionAttributes(propFileName, defaultProps, (Frame)me.getParentView((Session)this)); sa.addPropertyChangeListener(screen); sa.addPropertyChangeListener(this); sa....
kc = new KeyConfigure(me.getParentView((Session)this),macrosList,vt.getCodePage());
kc = new KeyConfigure(parent,macrosList,vt.getCodePage());
private void mapMeKeys() { KeyConfigure kc; if (macros.isMacrosExist()) { String[] macrosList = macros.getMacroList(); kc = new KeyConfigure(me.getParentView((Session)this),macrosList,vt.getCodePage()); } else kc = new KeyConfigure(me.getParentView((Session)this),null,vt.g...