rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
ObjectId oid = idMan.readObjectId(bb); Method method = (Method) oid.getObject(); VariableTable vt = VMVirtualMachine.getVarTable(clazz, method);
VMMethod method = VMMethod.readId(clazz, bb); VariableTable vt = method.getVariableTable();
private void executeVariableTable(ByteBuffer bb, DataOutputStream os) throws JdwpException, IOException { ReferenceTypeId refId = idMan.readReferenceTypeId(bb); Class clazz = refId.getType(); ObjectId oid = idMan.readObjectId(bb); Method method = (Method) oid.getObject(); VariableTable vt = VMVir...
os.writeInt(lines); for (int i = 0; i < lines; i++)
os.writeInt(lineNum.length); for (int i = 0; i < lineNum.length; i++)
public void write(DataOutputStream os) throws IOException { os.writeLong(start); os.writeLong(end); os.writeInt(lines); for (int i = 0; i < lines; i++) { os.writeLong(lineCI[i]); os.writeInt(lineNum[i]); } }
private void formatForOutput(String str, StringBuffer buffer, boolean key)
private void formatForOutput(String str, StringBuilder buffer, boolean key)
private void formatForOutput(String str, StringBuffer buffer, boolean key) { if (key) { buffer.setLength(0); buffer.ensureCapacity(str.length()); } else buffer.ensureCapacity(buffer.length() + str.length()); boolean head = true; int size = str.length(); for (int i = 0; i <...
StringBuffer s = new StringBuffer ();
StringBuilder s = new StringBuilder ();
public void store(OutputStream out, String header) throws IOException { // The spec says that the file must be encoded using ISO-8859-1. PrintWriter writer = new PrintWriter(new OutputStreamWriter(out, "ISO-8859-1")); if (header != null) writer.println("#" + header); writer.println ("#" + Calen...
throws NotImplementedException
public DragSourceContext (DragSourceContextPeer peer, DragGestureEvent trigger, Cursor cursor, Image image, Point offset, Transferable trans, DragSourceListener dsl) throws NotImplementedException { if (peer == null || trig...
|| trigger == null)
|| trigger == null || trans == null || (image != null && offset == null))
public DragSourceContext (DragSourceContextPeer peer, DragGestureEvent trigger, Cursor cursor, Image image, Point offset, Transferable trans, DragSourceListener dsl) throws NotImplementedException { if (peer == null || trig...
throw new Error ("not implemented");
setCursor(cursor); updateCurrentCursor(trigger.getDragAction(), sourceActions, DEFAULT);
public DragSourceContext (DragSourceContextPeer peer, DragGestureEvent trigger, Cursor cursor, Image image, Point offset, Transferable trans, DragSourceListener dsl) throws NotImplementedException { if (peer == null || trig...
throws NotImplementedException
public void dragDropEnd(DragSourceDropEvent e) throws NotImplementedException { }
if (dragSourceListener != null) dragSourceListener.dragDropEnd(e); DragSource ds = getDragSource(); DragSourceListener[] dsl = ds.getDragSourceListeners(); for (int i = 0; i < dsl.length; i++) dsl[i].dragDropEnd(e);
public void dragDropEnd(DragSourceDropEvent e) throws NotImplementedException { }
throws NotImplementedException
public void dragEnter(DragSourceDragEvent e) throws NotImplementedException { }
if (dragSourceListener != null) dragSourceListener.dragEnter(e); DragSource ds = getDragSource(); DragSourceListener[] dsl = ds.getDragSourceListeners(); for (int i = 0; i < dsl.length; i++) dsl[i].dragEnter(e); updateCurrentCursor(e.getDropAction(), e.getTargetActions(), ENTER);
public void dragEnter(DragSourceDragEvent e) throws NotImplementedException { }
throws NotImplementedException
public void dragExit(DragSourceEvent e) throws NotImplementedException { }
if (dragSourceListener != null) dragSourceListener.dragExit(e); DragSource ds = getDragSource(); DragSourceListener[] dsl = ds.getDragSourceListeners(); for (int i = 0; i < dsl.length; i++) dsl[i].dragExit(e); updateCurrentCursor(0, 0, DEFAULT);
public void dragExit(DragSourceEvent e) throws NotImplementedException { }
throws NotImplementedException
public void dragMouseMoved(DragSourceDragEvent e) throws NotImplementedException { }
DragSource ds = getDragSource(); DragSourceMotionListener[] dsml = ds.getDragSourceMotionListeners(); for (int i = 0; i < dsml.length; i++) dsml[i].dragMouseMoved(e);
public void dragMouseMoved(DragSourceDragEvent e) throws NotImplementedException { }
throws NotImplementedException
public void dragOver(DragSourceDragEvent e) throws NotImplementedException { }
if (dragSourceListener != null) dragSourceListener.dragOver(e); DragSource ds = getDragSource(); DragSourceListener[] dsl = ds.getDragSourceListeners(); for (int i = 0; i < dsl.length; i++) dsl[i].dragOver(e); updateCurrentCursor(e.getDropAction(), e.getTargetActions(), OVER);
public void dragOver(DragSourceDragEvent e) throws NotImplementedException { }
throws NotImplementedException
public void dropActionChanged(DragSourceDragEvent e) throws NotImplementedException { }
if (dragSourceListener != null) dragSourceListener.dropActionChanged(e); DragSource ds = getDragSource(); DragSourceListener[] dsl = ds.getDragSourceListeners(); for (int i = 0; i < dsl.length; i++) dsl[i].dropActionChanged(e); updateCurrentCursor(e.getDropAction(), e.getTargetActions(), CHANGED);
public void dropActionChanged(DragSourceDragEvent e) throws NotImplementedException { }
return trigger.getSourceAsDragGestureRecognizer ().getSourceActions ();
if (sourceActions == 0) sourceActions = trigger.getSourceAsDragGestureRecognizer().getSourceActions(); return sourceActions;
public int getSourceActions() { return trigger.getSourceAsDragGestureRecognizer ().getSourceActions (); }
public void setCursor (Cursor cursor) throws NotImplementedException
public void setCursor(Cursor cursor)
public void setCursor (Cursor cursor) throws NotImplementedException { this.cursor = cursor; // FIXME: Check if we need to do more here }
peer.setCursor(cursor);
public void setCursor (Cursor cursor) throws NotImplementedException { this.cursor = cursor; // FIXME: Check if we need to do more here }
throws NotImplementedException
public void transferablesFlavorsChanged() throws NotImplementedException { }
peer.transferablesFlavorsChanged();
public void transferablesFlavorsChanged() throws NotImplementedException { }
if (!useCustomCursor) { Cursor cursor = null; switch (status) { case ENTER: break; case CHANGED: break; case OVER: break; default: break; } this.cursor = cursor; peer.setCursor(cursor); }
protected void updateCurrentCursor(int dropOp, int targetAct, int status) throws NotImplementedException { }
return new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID, n, e, d, p, q, dP, dQ, qInv);
PrivateKey result = new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID, n, e, d, p, q, dP, dQ, qInv); log.exiting(this.getClass().getName(), "decodePrivateKey()", result); return result;
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); DerUtil.checkIsCons...
log.exiting(this.getClass().getName(), "encodePrivateKey()", result);
public byte[] encodePrivateKey(PrivateKey key) { if (! (key instanceof GnuRSAPrivateKey)) throw new InvalidParameterException("Wrong key type"); GnuRSAPrivateKey pk = (GnuRSAPrivateKey) key; BigInteger n = pk.getN(); BigInteger e = pk.getE(); BigInteger d = pk.getPrivateExponent(); BigInteger ...
MenuItemUI mi = ((MenuItemUI) UIManager.getUI(this)); setUI(mi); invalidate();
setUI((MenuItemUI) UIManager.getUI(this));
public void updateUI() { MenuItemUI mi = ((MenuItemUI) UIManager.getUI(this)); setUI(mi); invalidate(); }
byte[] readdata;
int foff = (int)(fileOffset); System.arraycopy(data, foff,dest,off,len); /*byte[] readdata;
public void read(long fileOffset, byte[] dest, int off, int len){ refresh(); byte[] readdata; readdata = data.toString().getBytes(); for (long i=0 ; i < len ; i++ ) { int doff = new Long(off+i).intValue(); int foff = new Long(fileOffset+i).intValue(); dest[doff] = readdata[foff]; } }
int doff = new Long(off+i).intValue(); int foff = new Long(fileOffset+i).intValue();
int doff = (int)(off+i); int foff = (int)(fileOffset+i);
public void read(long fileOffset, byte[] dest, int off, int len){ refresh(); byte[] readdata; readdata = data.toString().getBytes(); for (long i=0 ; i < len ; i++ ) { int doff = new Long(off+i).intValue(); int foff = new Long(fileOffset+i).intValue(); dest[doff] = readdata[foff]; } }
}
}*/
public void read(long fileOffset, byte[] dest, int off, int len){ refresh(); byte[] readdata; readdata = data.toString().getBytes(); for (long i=0 ; i < len ; i++ ) { int doff = new Long(off+i).intValue(); int foff = new Long(fileOffset+i).intValue(); dest[doff] = readdata[foff]; } }
if (hsb != null && hsb.isVisible())
if (hsb != null && viewSize.width > viewportSize.width)
public Dimension preferredLayoutSize(Container parent) { // Sun's implementation simply throws a ClassCastException if // parent is no JScrollPane, so do we. JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getPreferredSize(); int width = viewportSize.width; ...
if (vsb != null && vsb.isVisible())
if (vsb != null && viewSize.height > viewportSize.height)
public Dimension preferredLayoutSize(Container parent) { // Sun's implementation simply throws a ClassCastException if // parent is no JScrollPane, so do we. JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getPreferredSize(); int width = viewportSize.width; ...
public final byte[] doFinal(byte[] input)
public final byte[] doFinal()
public final byte[] doFinal(byte[] input) throws IllegalStateException, IllegalBlockSizeException, BadPaddingException { return doFinal(input, 0, input.length); }
return doFinal(input, 0, input.length);
return doFinal(new byte[0], 0, 0);
public final byte[] doFinal(byte[] input) throws IllegalStateException, IllegalBlockSizeException, BadPaddingException { return doFinal(input, 0, input.length); }
final String[] properties = { Context.DNS_URL, Context.INITIAL_CONTEXT_FACTORY, Context.OBJECT_FACTORIES, Context.PROVIDER_URL, Context.STATE_FACTORIES, Context.URL_PKG_PREFIXES, };
if (environment != null) myProps = environment; else myProps = new Hashtable();
protected void init (Hashtable environment) throws NamingException { // FIXME: Is this enough? final String[] properties = { Context.DNS_URL, Context.INITIAL_CONTEXT_FACTORY, Context.OBJECT_FACTORIES, Context.PROVIDER_URL, Context.STATE_FACTORIES, Context.URL_PKG_PREFIXES, }...
if (environment != null) myProps = (Hashtable) environment.clone (); else myProps = new Hashtable ();
Applet napplet = (Applet) myProps.get(Context.APPLET);
protected void init (Hashtable environment) throws NamingException { // FIXME: Is this enough? final String[] properties = { Context.DNS_URL, Context.INITIAL_CONTEXT_FACTORY, Context.OBJECT_FACTORIES, Context.PROVIDER_URL, Context.STATE_FACTORIES, Context.URL_PKG_PREFIXES, }...
Applet napplet = (Applet) myProps.get (Context.APPLET); for (int i = properties.length - 1; i >= 0; i--) { Object o = myProps.get (properties[i]);
Properties pApplet = null; if (napplet != null) pApplet = new Properties(); Properties pSystem = new Properties(); Object value;
protected void init (Hashtable environment) throws NamingException { // FIXME: Is this enough? final String[] properties = { Context.DNS_URL, Context.INITIAL_CONTEXT_FACTORY, Context.OBJECT_FACTORIES, Context.PROVIDER_URL, Context.STATE_FACTORIES, Context.URL_PKG_PREFIXES, }...
if (o == null)
for (int i = use_properties.length - 1; i >= 0; i--)
protected void init (Hashtable environment) throws NamingException { // FIXME: Is this enough? final String[] properties = { Context.DNS_URL, Context.INITIAL_CONTEXT_FACTORY, Context.OBJECT_FACTORIES, Context.PROVIDER_URL, Context.STATE_FACTORIES, Context.URL_PKG_PREFIXES, }...
o = napplet.getParameter (properties[i]); if (o == null) o = System.getProperty (properties[i]); if (o != null) myProps.put (properties[i], o);
{ value = napplet.getParameter(key); if (value != null) pApplet.put(key, value);
protected void init (Hashtable environment) throws NamingException { // FIXME: Is this enough? final String[] properties = { Context.DNS_URL, Context.INITIAL_CONTEXT_FACTORY, Context.OBJECT_FACTORIES, Context.PROVIDER_URL, Context.STATE_FACTORIES, Context.URL_PKG_PREFIXES, }...
Enumeration ep = Thread.currentThread().getContextClassLoader().getResources("jndi.naming"); while (ep.hasMoreElements ())
Enumeration ep = Thread.currentThread(). getContextClassLoader().getResources("jndi.properties"); while (ep.hasMoreElements())
protected void init (Hashtable environment) throws NamingException { // FIXME: Is this enough? final String[] properties = { Context.DNS_URL, Context.INITIAL_CONTEXT_FACTORY, Context.OBJECT_FACTORIES, Context.PROVIDER_URL, Context.STATE_FACTORIES, Context.URL_PKG_PREFIXES, }...
private static void merge (Hashtable h1, Hashtable h2)
static void merge (Hashtable primary, Hashtable additional)
private static void merge (Hashtable h1, Hashtable h2) { Enumeration e2 = h2.keys(); while (e2.hasMoreElements()) { String key2 = (String) e2.nextElement(); Object value1 = h1.get(key2); if (value1 == null) h1.put(key2, h2.get(key2)); else if (key2.compareTo(colon_list[0]) == 0 || key2.compareTo(c...
Enumeration e2 = h2.keys();
Enumeration en = additional.keys();
private static void merge (Hashtable h1, Hashtable h2) { Enumeration e2 = h2.keys(); while (e2.hasMoreElements()) { String key2 = (String) e2.nextElement(); Object value1 = h1.get(key2); if (value1 == null) h1.put(key2, h2.get(key2)); else if (key2.compareTo(colon_list[0]) == 0 || key2.compareTo(c...
while (e2.hasMoreElements())
while (en.hasMoreElements())
private static void merge (Hashtable h1, Hashtable h2) { Enumeration e2 = h2.keys(); while (e2.hasMoreElements()) { String key2 = (String) e2.nextElement(); Object value1 = h1.get(key2); if (value1 == null) h1.put(key2, h2.get(key2)); else if (key2.compareTo(colon_list[0]) == 0 || key2.compareTo(c...
String key2 = (String) e2.nextElement(); Object value1 = h1.get(key2);
String key2 = (String) en.nextElement(); Object value1 = primary.get(key2);
private static void merge (Hashtable h1, Hashtable h2) { Enumeration e2 = h2.keys(); while (e2.hasMoreElements()) { String key2 = (String) e2.nextElement(); Object value1 = h1.get(key2); if (value1 == null) h1.put(key2, h2.get(key2)); else if (key2.compareTo(colon_list[0]) == 0 || key2.compareTo(c...
h1.put(key2, h2.get(key2)); else if (key2.compareTo(colon_list[0]) == 0 || key2.compareTo(colon_list[1]) == 0 || key2.compareTo(colon_list[2]) == 0 || key2.compareTo(colon_list[3]) == 0)
primary.put(key2, additional.get(key2)); else if (colon_list.contains(key2))
private static void merge (Hashtable h1, Hashtable h2) { Enumeration e2 = h2.keys(); while (e2.hasMoreElements()) { String key2 = (String) e2.nextElement(); Object value1 = h1.get(key2); if (value1 == null) h1.put(key2, h2.get(key2)); else if (key2.compareTo(colon_list[0]) == 0 || key2.compareTo(c...
String value2 = (String) h2.get(key2); h1.put(key2, (String) value1 + ":" + value2);
String value2 = (String) additional.get(key2); primary.put(key2, (String) value1 + ":" + value2);
private static void merge (Hashtable h1, Hashtable h2) { Enumeration e2 = h2.keys(); while (e2.hasMoreElements()) { String key2 = (String) e2.nextElement(); Object value1 = h1.get(key2); if (value1 == null) h1.put(key2, h2.get(key2)); else if (key2.compareTo(colon_list[0]) == 0 || key2.compareTo(c...
public TaggedComponentHolder(TaggedComponent initialValue)
public TaggedComponentHolder()
public TaggedComponentHolder(TaggedComponent initialValue) { value = initialValue; }
value = initialValue;
public TaggedComponentHolder(TaggedComponent initialValue) { value = initialValue; }
Book() { ; }
public Book() { }
Book(){ ;}
append(Printable printable, PageFormat page_format) {
public void append(Printable printable, PageFormat page_format) {
append(Printable printable, PageFormat page_format){ append(printable, page_format, 1);}
getNumberOfPages() { return(printables.size()); }
public int getNumberOfPages() { return printables.size(); }
getNumberOfPages(){ return(printables.size());}
getPageFormat(int page_number) { return((PageFormat)page_formats.elementAt(page_number)); }
public PageFormat getPageFormat(int page_number) { return (PageFormat) page_formats.elementAt(page_number); }
getPageFormat(int page_number){ return((PageFormat)page_formats.elementAt(page_number));}
getPrintable(int page_number) { return((Printable)printables.elementAt(page_number)); }
public Printable getPrintable(int page_number) { return (Printable) printables.elementAt(page_number); }
getPrintable(int page_number){ return((Printable)printables.elementAt(page_number));}
setPage(int page_num, Printable printable, PageFormat page_format) {
public void setPage(int page_num, Printable printable, PageFormat page_format) {
setPage(int page_num, Printable printable, PageFormat page_format){ printables.setElementAt(printable, page_num); page_formats.setElementAt(page_format, page_num);}
public boolean replaceEdit(UndoableEdit anEdit) { return false; }
public boolean replaceEdit(UndoableEdit edit) { return false; }
public boolean replaceEdit(UndoableEdit anEdit) { return false; } // replaceEdit()
public boolean canRedo();
boolean canRedo();
public boolean canRedo();
public boolean canUndo();
boolean canUndo();
public boolean canUndo();
if (portBounds.height >= viewPref.height)
if (portBounds.height >= viewMinimum.height)
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
if (portBounds.width >= viewPref.width)
if (portBounds.width >= viewMinimum.width)
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
viewPref.width = viewMinimum.width;
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
public ColorModel(int bits) { this(bits, nArray(bits / 4, 4), ColorSpace.getInstance(ColorSpace.CS_sRGB), true, false, TRANSLUCENT, Buffers.smallestAppropriateTransferType(bits));
public ColorModel(int bits) { this(bits * 4, nArray(bits, 4), ColorSpace.getInstance(ColorSpace.CS_sRGB), true, false, TRANSLUCENT, Buffers.smallestAppropriateTransferType(bits * 4));
public ColorModel(int bits) { this(bits, nArray(bits / 4, 4), ColorSpace.getInstance(ColorSpace.CS_sRGB), true, false, TRANSLUCENT, Buffers.smallestAppropriateTransferType(bits)); }
DataBuffer data = Buffers.createBufferFromData(transferType, inData, 1);
DataBuffer data = Buffers.createBufferFromData(transferType, inData, 1); Object da = Buffers.getData(data);
final int getPixelFromArray(Object inData) { DataBuffer data = Buffers.createBufferFromData(transferType, inData, 1); //Object da = Buffers.getData(data); return data.getElem(0); }
background = StyleConstants.getBackground(atts);
background = (Color) atts.getAttribute(StyleConstants.Background);
protected void setPropertiesFromAttributes() { Element el = getElement(); AttributeSet atts = el.getAttributes(); background = StyleConstants.getBackground(atts); foreground = StyleConstants.getForeground(atts); strikeThrough = StyleConstants.isStrikeThrough(atts); subscript = StyleConstants.isSubs...
super (cs, 1.0f, 1.0f);
super (cs, 1f, 1f);
Decoder (Charset cs) { super (cs, 1.0f, 1.0f); }
int highNibble = (b1 >> 4) & 0xF;
int highNibble = ((b1 & 0xFF) >> 4) & 0xF;
protected CoderResult decodeLoop (ByteBuffer in, CharBuffer out) { // TODO: Optimize this in the case in.hasArray() / out.hasArray() int inPos = in.position(); try { while (in.hasRemaining ()) { char c; byte b1 = in.get (); int hig...
case 0xF: byte b4; if (in.remaining () < 3) return CoderResult.UNDERFLOW; if((b1&0x0F) > 4) return CoderResult.malformedForLength (4); if (out.remaining () < 2) return CoderResult.OVERFLOW; if (!isContinuation (b2 = in.get ())) return CoderResult.malformedForLength (3); if (!isContinuation (b3 = in.get ())) return Code...
protected CoderResult decodeLoop (ByteBuffer in, CharBuffer out) { // TODO: Optimize this in the case in.hasArray() / out.hasArray() int inPos = in.position(); try { while (in.hasRemaining ()) { char c; byte b1 = in.get (); int hig...
out.put ((byte) (0xF0 | (value >> 18)));
out.put ((byte) (0xF0 | ((value >> 18) & 0x07)));
protected CoderResult encodeLoop (CharBuffer in, ByteBuffer out) { int inPos = in.position(); try { // TODO: Optimize this in the case in.hasArray() / out.hasArray() while (in.hasRemaining ()) { int remaining = out.remaining (); char c = in.get ()...
if (baseURI == null && XmlParser.uriWarnings)
if (baseURI == null) { if (XmlParser.uriWarnings)
String absolutize(String baseURI, String systemId, boolean nice) throws MalformedURLException, SAXException { // FIXME normalize system IDs -- when? // - Convert to UTF-8 // - Map reserved and non-ASCII characters to %HH try { if (baseURI == null && XmlParser.uriWarnings) { warn ("No ba...
}
String absolutize(String baseURI, String systemId, boolean nice) throws MalformedURLException, SAXException { // FIXME normalize system IDs -- when? // - Convert to UTF-8 // - Map reserved and non-ASCII characters to %HH try { if (baseURI == null && XmlParser.uriWarnings) { warn ("No ba...
return assignQuad.propagate(this);
Operand op = assignQuad.propagate(this); return op;
public Operand simplify() { return assignQuad.propagate(this); }
return new primitiveArrayTypeCode(TCKind.tk_any);
return new ArrayTypeCode(TCKind.tk_any);
public static TypeCode type() { return new primitiveArrayTypeCode(TCKind.tk_any); }
int pixelY = y - ascent;
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics();...
int pixelWidth = 0;
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics();...
if (c == '\t')
switch (c)
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics();...
g.drawChars(buffer, pos, len, pixelX, pixelY + ascent); pixelX += pixelWidth; pixelWidth = 0; } pos = offset+1;
g.drawChars(buffer, pos, len, pixelX, y); pixelX += metrics.charsWidth(buffer, pos, len);
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics();...
switch (c) { case '\t':
pos = offset+1;
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics();...
pixelX = (int) e.nextTabStop(pixelX, startOffset + offset - s.offset);
pixelX = (int) e.nextTabStop((float) pixelX, startOffset + offset - s.offset);
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics();...
default: ++len; pixelWidth += metrics.charWidth(buffer[offset]);
case '\n': case '\r': if (len > 0) { g.drawChars(buffer, pos, len, pixelX, y); pixelX += metrics.charsWidth(buffer, pos, len); len = 0; } x = pixelX;
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics();...
g.drawChars(buffer, pos, len, pixelX, pixelY + ascent);
{ g.drawChars(buffer, pos, len, pixelX, y); pixelX += metrics.charsWidth(buffer, pos, len); }
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics();...
return pixelX + pixelWidth;
return pixelX;
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics();...
int mark = Utilities.getTabbedTextOffset(s, metrics, x0, x, e, startOffset, false); BreakIterator breaker = BreakIterator.getWordInstance(); breaker.setText(s); int shift = startOffset - s.offset;
int mark = Utilities.getTabbedTextOffset(s, metrics, x0, x, e, startOffset, false); int breakLoc = mark;
public static final int getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) { int mark = Utilities.getTabbedTextOffset(s, metrics, x0, x, e, startOffset, false); BreakIterator breaker...
if (mark >= shift + s.count) return mark; int preceding = breaker.preceding(mark + 1 + s.offset); if (preceding != 0) return preceding + shift; return mark;
if (mark < s.count - 1) { for (int i = s.offset + mark; i >= s.offset; i--) { char ch = s.array[i]; if (ch < 256) { if (Character.isWhitespace(ch)) { breakLoc = i - s.offset + 1; break; } } else { BreakIterator bi = BreakIterator.getLineInstance(); bi.setText(s); int pos = bi.preceding(i + 1); if (pos > s.offset) { b...
public static final int getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) { int mark = Utilities.getTabbedTextOffset(s, metrics, x0, x, e, startOffset, false); BreakIterator breaker...
if (Character.isLetter(text.charAt(i)))
cp = text.codePointAt(i); if (Character.isLetter(cp) || !Character.isWhitespace(cp))
public static final int getNextWord(JTextComponent c, int offs) throws BadLocationException { if (offs < 0 || offs > (c.getText().length() - 1)) throw new BadLocationException("invalid offset specified", offs); String text = c.getText(); BreakIterator wb = BreakIterator.getWordInstance(); wb.se...
if (Character.isLetter(text.charAt(i)))
cp = text.codePointAt(i); if (Character.isLetter(cp) || !Character.isWhitespace(cp))
public static final int getPreviousWord(JTextComponent c, int offs) throws BadLocationException { String text = c.getText(); if (offs <= 0 || offs > text.length()) throw new BadLocationException("invalid offset specified", offs); BreakIterator wb = BreakIterator.getWordInstance(); wb.se...
int pos;
int found = s.count;
public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current...
int width = 0;
int nextX = currentX;
public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current...
for (pos = 0; pos < s.count; pos++)
int end = s.offset + s.count; for (int pos = s.offset; pos < end && found == s.count; pos++)
public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current...
char nextChar = s.array[s.offset+pos]; if (nextChar == 0) break;
char nextChar = s.array[pos];
public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current...
width = fm.charWidth(nextChar);
nextX += fm.charWidth(nextChar);
public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current...
width = fm.charWidth(' ');
nextX += fm.charWidth(' ');
public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current...
width = ((int) te.nextTabStop(currentX, pos)) - currentX;
nextX += ((int) te.nextTabStop(nextX, p0 + pos - s.offset));
public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current...
if (round)
if (x >= currentX && x < nextX)
public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current...
if (currentX + (width>>1) > x) break;
if ((! round) || ((x - currentX) < (nextX - x))) { found = pos - s.offset;
public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current...
if (currentX + width > x) break;
found = pos + 1 - s.offset;
public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current...
currentX += width;
} currentX = nextX;
public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current...
return pos;
return found;
public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current...
for (int offset = s.offset; offset < (s.offset + s.count); ++offset)
int end = s.offset + s.count; int count = 0; for (int offset = s.offset; offset < end; offset++)
public static final int getTabbedTextWidth(Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x coordinate. int pixe...
pixelX += metrics.charWidth(buffer[offset]); maxWidth = Math.max(maxWidth, pixelX - x); pixelX = x;
pixelX += metrics.charsWidth(buffer, offset - count, count); count = 0;
public static final int getTabbedTextWidth(Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x coordinate. int pixe...
pixelX += metrics.charWidth(buffer[offset]); break;
count++;
public static final int getTabbedTextWidth(Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x coordinate. int pixe...