rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if (vsb != null)
if (vp != null && event.getSource() == vp)
ChangeListener createScrollListener() { return new ChangeListener() { public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); if (vsb != null) { BoundedRangeModel vmod = vsb.getModel(); if (vmod != null) ypos = vmod.getValue(); } if (hsb != null) { BoundedRangeModel hmod = hsb.getModel(); if (hmod != null) xpos = hmod.getValue(); } if (JScrollPane.this.viewport != null) JScrollPane.this.viewport.setViewPosition(new Point(xpos, ypos)); } }; }
BoundedRangeModel vmod = vsb.getModel(); if (vmod != null) ypos = vmod.getValue();
Rectangle vr = vp.getViewRect(); Dimension vs = vp.getViewSize(); if (vsb != null && (vsb.getMinimum() != 0 || vsb.getMaximum() != vs.height || vsb.getValue() != vr.y || vsb.getVisibleAmount() != vr.height)) { vsb.setValue(vr.y, vr.height, 0, vs.height); } if (hsb != null && (hsb.getMinimum() != 0 || hsb.getMaximum() != vs.width || hsb.getValue() != vr.width || hsb.getVisibleAmount() != vr.height)) hsb.setValue(vr.x, vr.width, 0, vs.width);
ChangeListener createScrollListener() { return new ChangeListener() { public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); if (vsb != null) { BoundedRangeModel vmod = vsb.getModel(); if (vmod != null) ypos = vmod.getValue(); } if (hsb != null) { BoundedRangeModel hmod = hsb.getModel(); if (hmod != null) xpos = hmod.getValue(); } if (JScrollPane.this.viewport != null) JScrollPane.this.viewport.setViewPosition(new Point(xpos, ypos)); } }; }
{ BoundedRangeModel hmod = hsb.getModel(); if (hmod != null) xpos = hmod.getValue();
xpos = hsb.getValue(); Point pt = new Point(xpos, ypos); if (vp != null && vp.getViewPosition() != pt) vp.setViewPosition(pt);
ChangeListener createScrollListener() { return new ChangeListener() { public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); if (vsb != null) { BoundedRangeModel vmod = vsb.getModel(); if (vmod != null) ypos = vmod.getValue(); } if (hsb != null) { BoundedRangeModel hmod = hsb.getModel(); if (hmod != null) xpos = hmod.getValue(); } if (JScrollPane.this.viewport != null) JScrollPane.this.viewport.setViewPosition(new Point(xpos, ypos)); } }; }
if (JScrollPane.this.viewport != null) JScrollPane.this.viewport.setViewPosition(new Point(xpos, ypos));
ChangeListener createScrollListener() { return new ChangeListener() { public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); if (vsb != null) { BoundedRangeModel vmod = vsb.getModel(); if (vmod != null) ypos = vmod.getValue(); } if (hsb != null) { BoundedRangeModel hmod = hsb.getModel(); if (hmod != null) xpos = hmod.getValue(); } if (JScrollPane.this.viewport != null) JScrollPane.this.viewport.setViewPosition(new Point(xpos, ypos)); } }; }
int xpos = 0; int ypos = 0;
public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); if (vsb != null) { BoundedRangeModel vmod = vsb.getModel(); if (vmod != null) ypos = vmod.getValue(); } if (hsb != null) { BoundedRangeModel hmod = hsb.getModel(); if (hmod != null) xpos = hmod.getValue(); } if (JScrollPane.this.viewport != null) JScrollPane.this.viewport.setViewPosition(new Point(xpos, ypos)); }
if (vsb != null)
if (vp != null && event.getSource() == vp)
public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); if (vsb != null) { BoundedRangeModel vmod = vsb.getModel(); if (vmod != null) ypos = vmod.getValue(); } if (hsb != null) { BoundedRangeModel hmod = hsb.getModel(); if (hmod != null) xpos = hmod.getValue(); } if (JScrollPane.this.viewport != null) JScrollPane.this.viewport.setViewPosition(new Point(xpos, ypos)); }
BoundedRangeModel vmod = vsb.getModel(); if (vmod != null) ypos = vmod.getValue();
Rectangle vr = vp.getViewRect(); Dimension vs = vp.getViewSize(); if (vsb != null && (vsb.getMinimum() != 0 || vsb.getMaximum() != vs.height || vsb.getValue() != vr.y || vsb.getVisibleAmount() != vr.height)) { vsb.setValue(vr.y, vr.height, 0, vs.height); } if (hsb != null && (hsb.getMinimum() != 0 || hsb.getMaximum() != vs.width || hsb.getValue() != vr.width || hsb.getVisibleAmount() != vr.height)) hsb.setValue(vr.x, vr.width, 0, vs.width);
public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); if (vsb != null) { BoundedRangeModel vmod = vsb.getModel(); if (vmod != null) ypos = vmod.getValue(); } if (hsb != null) { BoundedRangeModel hmod = hsb.getModel(); if (hmod != null) xpos = hmod.getValue(); } if (JScrollPane.this.viewport != null) JScrollPane.this.viewport.setViewPosition(new Point(xpos, ypos)); }
{ BoundedRangeModel hmod = hsb.getModel(); if (hmod != null) xpos = hmod.getValue();
xpos = hsb.getValue(); Point pt = new Point(xpos, ypos); if (vp != null && vp.getViewPosition() != pt) vp.setViewPosition(pt);
public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); if (vsb != null) { BoundedRangeModel vmod = vsb.getModel(); if (vmod != null) ypos = vmod.getValue(); } if (hsb != null) { BoundedRangeModel hmod = hsb.getModel(); if (hmod != null) xpos = hmod.getValue(); } if (JScrollPane.this.viewport != null) JScrollPane.this.viewport.setViewPosition(new Point(xpos, ypos)); }
if (JScrollPane.this.viewport != null) JScrollPane.this.viewport.setViewPosition(new Point(xpos, ypos));
public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); if (vsb != null) { BoundedRangeModel vmod = vsb.getModel(); if (vmod != null) ypos = vmod.getValue(); } if (hsb != null) { BoundedRangeModel hmod = hsb.getModel(); if (hmod != null) xpos = hmod.getValue(); } if (JScrollPane.this.viewport != null) JScrollPane.this.viewport.setViewPosition(new Point(xpos, ypos)); }
return new JScrollBar(SwingConstants.VERTICAL);
return new ScrollBar(SwingConstants.VERTICAL);
public JScrollBar createVerticalScrollBar() { return new JScrollBar(SwingConstants.VERTICAL); }
if (v != null) v.addChangeListener(scrollListener);
public void setViewport(JViewport v) { JViewport old = viewport; removeNonNull(old); viewport = v; addNonNull(v); revalidate(); repaint(); firePropertyChange(VIEWPORT_CHANGED_PROPERTY, old, v); sync(); }
public void setCoalescing(boolean value) { coalescing = value; }
public void setCoalescing(boolean coalescing) { this.coalescing = coalescing; }
public void setCoalescing(boolean value) { coalescing = value; } // setCoalescing()
public void setIgnoringComments(boolean value) { ignoreComments = value; }
public void setIgnoringComments(boolean ignoreComments) { ignoringComments = ignoreComments; }
public void setIgnoringComments(boolean value) { ignoreComments = value; } // setIgnoringComments()
public void setIgnoringElementContentWhitespace(boolean value) { whitespace = value; }
public void setIgnoringElementContentWhitespace(boolean whitespace) { ignoringElementContentWhitespace = whitespace; }
public void setIgnoringElementContentWhitespace(boolean value) { whitespace = value; } // setIgnoringElementContentWhitespace()
}
processActionEvent(ActionEvent event){ if (action_listeners != null) action_listeners.actionPerformed(event);}
byte[] byteBuf; String charsetName; int oldPosition; charsetName = getCharsetName(platform, language, encoding);
String charsetName = getCharsetName(platform, language, encoding);
private static String decodeName(int platform, int encoding, int language, ByteBuffer buffer, int offset, int len) { byte[] byteBuf; String charsetName; int oldPosition; charsetName = getCharsetName(platform, language, encoding); if (charsetName == null) return null; byteBuf = new byte[len]; oldPosition = buffer.position(); try { buffer.position(offset); buffer.get(byteBuf); try { return new String(byteBuf, charsetName); } catch (UnsupportedEncodingException uex) { } } finally { buffer.position(oldPosition); } return null; }
byteBuf = new byte[len]; oldPosition = buffer.position(); try { buffer.position(offset); buffer.get(byteBuf); try { return new String(byteBuf, charsetName); } catch (UnsupportedEncodingException uex) { } } finally { buffer.position(oldPosition); } return null;
return decodeName(charsetName, buffer, offset, len);
private static String decodeName(int platform, int encoding, int language, ByteBuffer buffer, int offset, int len) { byte[] byteBuf; String charsetName; int oldPosition; charsetName = getCharsetName(platform, language, encoding); if (charsetName == null) return null; byteBuf = new byte[len]; oldPosition = buffer.position(); try { buffer.position(offset); buffer.get(byteBuf); try { return new String(byteBuf, charsetName); } catch (UnsupportedEncodingException uex) { } } finally { buffer.position(oldPosition); } return null; }
&& endTime == zone.endTime);
&& endTime == zone.endTime && endTimeMode == zone.endTimeMode);
public synchronized boolean equals(Object o) { if (this == o) return true; if (!(o instanceof SimpleTimeZone)) return false; SimpleTimeZone zone = (SimpleTimeZone) o; if (zone.hashCode() != hashCode() || !getID().equals(zone.getID()) || rawOffset != zone.rawOffset || useDaylight != zone.useDaylight) return false; if (!useDaylight) return true; return (startYear == zone.startYear && startMonth == zone.startMonth && startDay == zone.startDay && startDayOfWeek == zone.startDayOfWeek && startTime == zone.startTime && endMonth == zone.endMonth && endDay == zone.endDay && endDayOfWeek == zone.endDayOfWeek && endTime == zone.endTime); }
int daysInMonth = getDaysInMonth(month, year); if (day < 1 || day > daysInMonth) throw new IllegalArgumentException("day out of range"); if (dayOfWeek < Calendar.SUNDAY || dayOfWeek > Calendar.SATURDAY) throw new IllegalArgumentException("dayOfWeek out of range"); if (month < Calendar.JANUARY || month > Calendar.DECEMBER) throw new IllegalArgumentException("month out of range");
public int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis) { // This method is called by Calendar, so we mustn't use that class. int daylightSavings = 0; if (useDaylight && era == GregorianCalendar.AD && year >= startYear) { // This does only work for Gregorian calendars :-( // This is mainly because setStartYear doesn't take an era. boolean afterStart = !isBefore(year, month, day, dayOfWeek, millis, startMode, startMonth, startDay, startDayOfWeek, startTime); boolean beforeEnd = isBefore(year, month, day, dayOfWeek, millis, endMode, endMonth, endDay, endDayOfWeek, endTime); if (startMonth < endMonth) { // use daylight savings, if the date is after the start of // savings, and before the end of savings. daylightSavings = afterStart && beforeEnd ? dstSavings : 0; } else { // use daylight savings, if the date is before the end of // savings, or after the start of savings. daylightSavings = beforeEnd || afterStart ? dstSavings : 0; } } return rawOffset + daylightSavings; }
&& endDayOfWeek == zone.endDayOfWeek && endTime == zone.endTime);
&& endDayOfWeek == zone.endDayOfWeek && endTime == zone.endTime && endTimeMode == zone.endTimeMode);
public boolean hasSameRules(TimeZone other) { if (this == other) return true; if (!(other instanceof SimpleTimeZone)) return false; SimpleTimeZone zone = (SimpleTimeZone) other; if (zone.hashCode() != hashCode() || rawOffset != zone.rawOffset || useDaylight != zone.useDaylight) return false; if (!useDaylight) return true; return (startYear == zone.startYear && startMonth == zone.startMonth && startDay == zone.startDay && startDayOfWeek == zone.startDayOfWeek && startTime == zone.startTime && endMonth == zone.endMonth && endDay == zone.endDay && endDayOfWeek == zone.endDayOfWeek && endTime == zone.endTime); }
day -= 6;
day = Math.abs(day) - 6;
private boolean isBefore(int calYear, int calMonth, int calDayOfMonth, int calDayOfWeek, int calMillis, int mode, int month, int day, int dayOfWeek, int millis) { // This method is called by Calendar, so we mustn't use that class. // We have to do all calculations by hand. // check the months: // XXX - this is not correct: // for the DOW_GE_DOM and DOW_LE_DOM modes the change date may // be in a different month. if (calMonth != month) return calMonth < month; // check the day: switch (mode) { case DOM_MODE: if (calDayOfMonth != day) return calDayOfMonth < day; break; case DOW_IN_MONTH_MODE: { // This computes the day of month of the day of type // "dayOfWeek" that lies in the same (sunday based) week as cal. calDayOfMonth += (dayOfWeek - calDayOfWeek); // Now we convert it to 7 based number (to get a one based offset // after dividing by 7). If we count from the end of the // month, we get want a -7 based number counting the days from // the end: if (day < 0) calDayOfMonth -= getDaysInMonth(calMonth, calYear) + 7; else calDayOfMonth += 6; // day > 0 day < 0 // S M T W T F S S M T W T F S // 7 8 9 10 11 12 -36-35-34-33-32-31 // 13 14 15 16 17 18 19 -30-29-28-27-26-25-24 // 20 21 22 23 24 25 26 -23-22-21-20-19-18-17 // 27 28 29 30 31 32 33 -16-15-14-13-12-11-10 // 34 35 36 -9 -8 -7 // Now we calculate the day of week in month: int week = calDayOfMonth / 7; // day > 0 day < 0 // S M T W T F S S M T W T F S // 1 1 1 1 1 1 -5 -5 -4 -4 -4 -4 // 1 2 2 2 2 2 2 -4 -4 -4 -3 -3 -3 -3 // 2 3 3 3 3 3 3 -3 -3 -3 -2 -2 -2 -2 // 3 4 4 4 4 4 4 -2 -2 -2 -1 -1 -1 -1 // 4 5 5 -1 -1 -1 if (week != day) return week < day; if (calDayOfWeek != dayOfWeek) return calDayOfWeek < dayOfWeek; // daylight savings starts/ends on the given day. break; } case DOW_LE_DOM_MODE: // The greatest sunday before or equal December, 12 // is the same as smallest sunday after or equal December, 6. day -= 6; case DOW_GE_DOM_MODE: // Calculate the day of month of the day of type // "dayOfWeek" that lies before (or on) the given date. calDayOfMonth -= (calDayOfWeek < dayOfWeek ? 7 : 0) + calDayOfWeek - dayOfWeek; if (calDayOfMonth < day) return true; if (calDayOfWeek != dayOfWeek || calDayOfMonth >= day + 7) return false; // now we have the same day break; } // the millis decides: return (calMillis < millis); }
serialVersionOnStream = 1; }
startTimeMode = WALL_TIME; endTimeMode = WALL_TIME; serialVersionOnStream = 2; }
private void readObject(java.io.ObjectInputStream input) throws java.io.IOException, ClassNotFoundException { input.defaultReadObject(); if (serialVersionOnStream == 0) { // initialize the new fields to default values. dstSavings = 60 * 60 * 1000; endMode = DOW_IN_MONTH_MODE; startMode = DOW_IN_MONTH_MODE; serialVersionOnStream = 1; } else { int length = input.readInt(); byte[] byteArray = new byte[length]; input.read(byteArray, 0, length); if (length >= 4) { // Lets hope that Sun does extensions to the serialized // form in a sane manner. startDay = byteArray[0]; startDayOfWeek = byteArray[1]; endDay = byteArray[2]; endDayOfWeek = byteArray[3]; } } }
this.endDay = Math.abs(day);
this.endDay = day;
public void setEndRule(int month, int day, int dayOfWeek, int time) { this.endMode = checkRule(month, day, dayOfWeek); this.endMonth = month; // FIXME: XXX: JDK 1.2 allows negative values and has 2 new variations // of this method. this.endDay = Math.abs(day); this.endDayOfWeek = Math.abs(dayOfWeek); this.endTime = time; useDaylight = true; }
else if (this.endTimeMode == STANDARD_TIME) this.endTime = time + this.dstSavings; else this.endTime = time + this.rawOffset + this.dstSavings;
public void setEndRule(int month, int day, int dayOfWeek, int time) { this.endMode = checkRule(month, day, dayOfWeek); this.endMonth = month; // FIXME: XXX: JDK 1.2 allows negative values and has 2 new variations // of this method. this.endDay = Math.abs(day); this.endDayOfWeek = Math.abs(dayOfWeek); this.endTime = time; useDaylight = true; }
this.startDay = Math.abs(day);
this.startDay = day;
public void setStartRule(int month, int day, int dayOfWeek, int time) { this.startMode = checkRule(month, day, dayOfWeek); this.startMonth = month; // FIXME: XXX: JDK 1.2 allows negative values and has 2 new variations // of this method. this.startDay = Math.abs(day); this.startDayOfWeek = Math.abs(dayOfWeek); this.startTime = time; useDaylight = true; }
this.startTime = time;
if (this.startTimeMode == WALL_TIME || this.startTimeMode == STANDARD_TIME) this.startTime = time; else this.startTime = time + this.rawOffset;
public void setStartRule(int month, int day, int dayOfWeek, int time) { this.startMode = checkRule(month, day, dayOfWeek); this.startMonth = month; // FIXME: XXX: JDK 1.2 allows negative values and has 2 new variations // of this method. this.startDay = Math.abs(day); this.startDayOfWeek = Math.abs(dayOfWeek); this.startTime = time; useDaylight = true; }
+ ",endTime=" + endTime : "") + "]";
+ ",endTime=" + endTime + ",endTimeMode=" + endTimeMode : "") + "]";
public String toString() { // the test for useDaylight is an incompatibility to jdk1.2, but // I think this shouldn't hurt. return getClass().getName() + "[" + "id=" + getID() + ",offset=" + rawOffset + ",dstSavings=" + dstSavings + ",useDaylight=" + useDaylight + (useDaylight ? ",startYear=" + startYear + ",startMode=" + startMode + ",startMonth=" + startMonth + ",startDay=" + startDay + ",startDayOfWeek=" + startDayOfWeek + ",startTime=" + startTime + ",endMode=" + endMode + ",endMonth=" + endMonth + ",endDay=" + endDay + ",endDayOfWeek=" + endDayOfWeek + ",endTime=" + endTime : "") + "]"; }
public long write(ByteBuffer[] srcs) throws IOException;
long write(ByteBuffer[] srcs, int offset, int length) throws IOException;
public long write(ByteBuffer[] srcs) throws IOException;
public long read(ByteBuffer[] srcs) throws IOException;
long read(ByteBuffer[] srcs, int offset, int length) throws IOException;
public long read(ByteBuffer[] srcs) throws IOException;
getMaxExpansion(int value) { return(5); }
public int getMaxExpansion(int value) { return 1; }
getMaxExpansion(int value){ //************ Implement me!!!!!!!!! return(5);}
getOffset() { return(pos); }
public int getOffset() { return textIndex; }
getOffset(){ return(pos);}
previous() { --pos; if (pos < 0) return(NULLORDER);
public int previous() { RuleBasedCollator.CollationElement e = previousBlock();
previous(){ --pos; if (pos < 0) return(NULLORDER); String s = str.charAt(pos) + ""; return(rbc.getCollationElementValue(s));}
String s = str.charAt(pos) + ""; return(rbc.getCollationElementValue(s)); }
if (e == null) return NULLORDER; return e.getValue(); }
previous(){ --pos; if (pos < 0) return(NULLORDER); String s = str.charAt(pos) + ""; return(rbc.getCollationElementValue(s));}
setOffset(int offset) {
public void setOffset(int offset) {
setOffset(int offset){ if (offset < 0) throw new IllegalArgumentException("Negative offset: " + offset); if ((str.length() > 0) && (offset > 0)) throw new IllegalArgumentException("Offset too large: " + offset); else if (offset > (str.length() - 1)) throw new IllegalArgumentException("Offset too large: " + offset); pos = offset;}
if ((str.length() > 0) && (offset > 0)) throw new IllegalArgumentException("Offset too large: " + offset); else if (offset > (str.length() - 1))
if (offset > (text.length() - 1))
setOffset(int offset){ if (offset < 0) throw new IllegalArgumentException("Negative offset: " + offset); if ((str.length() > 0) && (offset > 0)) throw new IllegalArgumentException("Offset too large: " + offset); else if (offset > (str.length() - 1)) throw new IllegalArgumentException("Offset too large: " + offset); pos = offset;}
pos = offset; }
for (index = 0; index < text_decomposition.length; index++) { if (offset <= text_indexes[index]) break; } if (text_indexes[index] == offset) textIndex = offset; else textIndex = text_indexes[index-1]; }
setOffset(int offset){ if (offset < 0) throw new IllegalArgumentException("Negative offset: " + offset); if ((str.length() > 0) && (offset > 0)) throw new IllegalArgumentException("Offset too large: " + offset); else if (offset > (str.length() - 1)) throw new IllegalArgumentException("Offset too large: " + offset); pos = offset;}
setText(String str) { this.str = str; pos = 0; }
public void setText(String text) { int idx = 0; int idx_idx = 0; int alreadyExpanded = 0; int idxToMove = 0; this.text = text; this.index = 0; String work_text = text.intern(); Vector v = new Vector(); Vector vi = new Vector(); while (idx < work_text.length()) { String key, key_old; Object object = null; int p = 1; key_old = key = null; do { if (object != null) key_old = key; key = work_text.substring (idx, idx+p); object = collator.prefix_tree.get (key); if (object != null && idx < alreadyExpanded) { RuleBasedCollator.CollationElement prefix = (RuleBasedCollator.CollationElement)object; if (prefix.expansion != null && prefix.expansion.startsWith(work_text.substring(0, idx))) { object = null; key = key_old; } } p++; } while (idx+p <= work_text.length()); if (object == null) key = key_old; RuleBasedCollator.CollationElement prefix = (RuleBasedCollator.CollationElement) collator.prefix_tree.get (key); if (prefix == null) { if (alreadyExpanded > 0) { RuleBasedCollator.CollationElement e = collator.getDefaultAccentedElement (work_text.charAt (idx)); v.add (e); vi.add (new Integer(idx_idx)); idx++; alreadyExpanded--; if (alreadyExpanded == 0) { idx_idx += idxToMove; idxToMove = 0; } else idx_idx++; } else { RuleBasedCollator.CollationElement e = collator.getDefaultElement (work_text.charAt (idx)); Integer i_ref = new Integer(idx_idx); v.add (RuleBasedCollator.SPECIAL_UNKNOWN_SEQ); vi.add (i_ref); v.add (e); vi.add (i_ref); idx_idx++; idx++; } continue; } if (prefix.expansion != null) { work_text = prefix.expansion + work_text.substring (idx+prefix.key.length()); idx = 0; v.add (prefix); vi.add (new Integer(idx_idx)); if (alreadyExpanded == 0) idxToMove = prefix.key.length(); alreadyExpanded += prefix.expansion.length()-prefix.key.length(); } else { v.add (prefix); vi.add (new Integer(idx_idx)); idx += prefix.key.length(); if (alreadyExpanded > 0) { alreadyExpanded -= prefix.key.length(); if (alreadyExpanded == 0) { idx_idx += idxToMove; idxToMove = 0; } } else idx_idx += prefix.key.length(); } } text_decomposition = v.toArray(); text_indexes = new int[vi.size()+1]; for (int i = 0; i < vi.size(); i++) { text_indexes[i] = ((Integer)vi.elementAt(i)).intValue(); } text_indexes[vi.size()] = text.length(); }
setText(String str){ this.str = str; pos = 0;}
WStringSeqHolder h = new WStringSeqHolder(); h._read(input); return h.value;
String[] value = new String[ input.read_long() ]; for (int i = 0; i < value.length; i++) { value [ i ] = input.read_wstring(); } return value;
public static String[] read(InputStream input) { WStringSeqHolder h = new WStringSeqHolder(); h._read(input); return h.value; }
WStringSeqHolder h = new WStringSeqHolder(value); h._write(output);
output.write_long(value.length); for (int i = 0; i < value.length; i++) { output.write_wstring(value [ i ]); }
public static void write(OutputStream output, String[] value) { WStringSeqHolder h = new WStringSeqHolder(value); h._write(output); }
public WStringSeqHolder(String[] initial_value)
public WStringSeqHolder()
public WStringSeqHolder(String[] initial_value) { value = initial_value; typecode.setLength(value.length); }
value = initial_value; typecode.setLength(value.length);
public WStringSeqHolder(String[] initial_value) { value = initial_value; typecode.setLength(value.length); }
public BigDecimal (BigInteger num, int scale) throws NumberFormatException
public BigDecimal (BigInteger num)
public BigDecimal (BigInteger num, int scale) throws NumberFormatException { if (scale < 0) throw new NumberFormatException ("scale of " + scale + " is < 0"); this.intVal = num; this.scale = scale; }
if (scale < 0) throw new NumberFormatException ("scale of " + scale + " is < 0"); this.intVal = num; this.scale = scale;
this (num, 0);
public BigDecimal (BigInteger num, int scale) throws NumberFormatException { if (scale < 0) throw new NumberFormatException ("scale of " + scale + " is < 0"); this.intVal = num; this.scale = scale; }
g.drawString(str, placement.x, placement.y);
g.drawString(str, placement.x, placement.y + fm.getAscent());
protected void paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) { String str = progressBar.getString(); int full = getAmountFull(b, width, height); Point placement = getStringPlacement(g, progressBar.getString(), x + b.left, y + b.top, width - b.left - b.right, height - b.top - b.bottom); Color savedColor = g.getColor(); Shape savedClip = g.getClip(); if (progressBar.getOrientation() == JProgressBar.VERTICAL) { AffineTransform rotate = AffineTransform.getRotateInstance(Math.PI / 2); g.setFont(progressBar.getFont().deriveFont(rotate)); } g.setColor(getSelectionForeground()); g.setClip(0, 0, full + b.left, height); g.drawString(str, placement.x, placement.y); g.setColor(getSelectionBackground()); g.setClip(full + b.left, 0, width - full, height); g.drawString(str, placement.x, placement.y); g.setClip(savedClip); g.setColor(savedColor); }
public Font deriveFont (AffineTransform a)
public Font deriveFont (int style, float size)
public Font deriveFont (AffineTransform a){ if (a == null) throw new IllegalArgumentException ("Affine transformation is null"); return peer.deriveFont (this, a);}
if (a == null) throw new IllegalArgumentException ("Affine transformation is null"); return peer.deriveFont (this, a);
return peer.deriveFont (this, style, size);
public Font deriveFont (AffineTransform a){ if (a == null) throw new IllegalArgumentException ("Affine transformation is null"); return peer.deriveFont (this, a);}
public final SelectableChannel configureBlocking (boolean block)
public final SelectableChannel configureBlocking(boolean blocking)
public final SelectableChannel configureBlocking (boolean block) throws IOException { synchronized (LOCK) { blocking = true; implConfigureBlocking (block); } return this; }
synchronized (LOCK)
synchronized (blockingLock())
public final SelectableChannel configureBlocking (boolean block) throws IOException { synchronized (LOCK) { blocking = true; implConfigureBlocking (block); } return this; }
blocking = true; implConfigureBlocking (block);
if (this.blocking != blocking) { implConfigureBlocking(blocking); this.blocking = blocking; }
public final SelectableChannel configureBlocking (boolean block) throws IOException { synchronized (LOCK) { blocking = true; implConfigureBlocking (block); } return this; }
protected abstract void implConfigureBlocking (boolean block)
protected abstract void implConfigureBlocking(boolean blocking)
protected abstract void implConfigureBlocking (boolean block) throws IOException;
return registered > 0;
return ! keys.isEmpty();
public final boolean isRegistered() { return registered > 0; }
return register (selector, 0, null);
synchronized (blockingLock()) { return locate(selector); }
public final SelectionKey keyFor(Selector selector) { try { return register (selector, 0, null); } catch (Exception e) { return null; } }
if (keys == null) return null;
ListIterator it = keys.listIterator();
private SelectionKey locate (Selector selector) { if (keys == null) return null; SelectionKey k = null; ListIterator it = keys.listIterator (); while (it.hasNext ()) { k = (SelectionKey) it.next (); if (k.selector () == selector) { return k; } } return k; }
SelectionKey k = null; ListIterator it = keys.listIterator (); while (it.hasNext ()) { k = (SelectionKey) it.next (); if (k.selector () == selector)
while (it.hasNext())
private SelectionKey locate (Selector selector) { if (keys == null) return null; SelectionKey k = null; ListIterator it = keys.listIterator (); while (it.hasNext ()) { k = (SelectionKey) it.next (); if (k.selector () == selector) { return k; } } return k; }
return k; }
SelectionKey key = (SelectionKey) it.next(); if (key.selector() == selector) return key;
private SelectionKey locate (Selector selector) { if (keys == null) return null; SelectionKey k = null; ListIterator it = keys.listIterator (); while (it.hasNext ()) { k = (SelectionKey) it.next (); if (k.selector () == selector) { return k; } } return k; }
return k;
return null;
private SelectionKey locate (Selector selector) { if (keys == null) return null; SelectionKey k = null; ListIterator it = keys.listIterator (); while (it.hasNext ()) { k = (SelectionKey) it.next (); if (k.selector () == selector) { return k; } } return k; }
SelectionKey k = null;
if ((ops & ~validOps()) != 0) throw new IllegalArgumentException(); SelectionKey key = null;
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); if (k != null) { k.attach (att); } else { k = selector.register (this, ops, att); if (k != null) add (k); } } return k; }
synchronized (LOCK)
synchronized (blockingLock())
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); if (k != null) { k.attach (att); } else { k = selector.register (this, ops, att); if (k != null) add (k); } } return k; }
k = locate (selector);
key = locate(selector);
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); if (k != null) { k.attach (att); } else { k = selector.register (this, ops, att); if (k != null) add (k); } } return k; }
if (k != null)
if (key != null)
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); if (k != null) { k.attach (att); } else { k = selector.register (this, ops, att); if (k != null) add (k); } } return k; }
k.attach (att);
if (att != null) key.attach(att);
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); if (k != null) { k.attach (att); } else { k = selector.register (this, ops, att); if (k != null) add (k); } } return k; }
k = selector.register (this, ops, att);
key = selector.register(this, ops, att); if (key != null) addSelectionKey(key); } }
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); if (k != null) { k.attach (att); } else { k = selector.register (this, ops, att); if (k != null) add (k); } } return k; }
if (k != null) add (k);
return key;
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); if (k != null) { k.attach (att); } else { k = selector.register (this, ops, att); if (k != null) add (k); } } return k; }
} return k; }
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); if (k != null) { k.attach (att); } else { k = selector.register (this, ops, att); if (k != null) add (k); } } return k; }
return (cal.getTimeInMillis() == getTimeInMillis());
return (cal.gregorianCutover == gregorianCutover && super.equals(o));
public boolean equals(Object o) { if (! (o instanceof GregorianCalendar)) return false; GregorianCalendar cal = (GregorianCalendar) o; return (cal.getTimeInMillis() == getTimeInMillis()); }
focusColor = getFocusColor(); selectColor = getSelectColor(); disabledTextColor = getDisabledTextColor();
UIDefaults def = UIManager.getLookAndFeelDefaults(); focusColor = def.getColor(getPropertyPrefix() + "focus"); selectColor = def.getColor(getPropertyPrefix() + "select"); disabledTextColor = def.getColor(getPropertyPrefix() + "disabledText");
public MetalButtonUI() { super(); focusColor = getFocusColor(); selectColor = getSelectColor(); disabledTextColor = getDisabledTextColor(); }
public static ComponentUI createUI(JComponent component) { if (instance == null) instance = new MetalButtonUI(); return instance;
public static ComponentUI createUI(JComponent c) { return new MetalButtonUI();
public static ComponentUI createUI(JComponent component) { if (instance == null) instance = new MetalButtonUI(); return instance; }
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); button.setFont(defaults.getFont("Button.font")); if (button.getParent() instanceof JToolBar) button.setBorder(MetalBorders.getToolbarButtonBorder());
if (button.isRolloverEnabled()) { if (button.getBorder() instanceof UIResource) button.setBorder(MetalBorders.getRolloverBorder()); }
public void installDefaults(AbstractButton button) { super.installDefaults(button); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); button.setFont(defaults.getFont("Button.font")); if (button.getParent() instanceof JToolBar) button.setBorder(MetalBorders.getToolbarButtonBorder()); }
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); menuBar.setBackground(defaults.getColor("MenuBar.background")); menuBar.setBorder(defaults.getBorder("MenuBar.border")); menuBar.setFont(defaults.getFont("MenuBar.font")); menuBar.setForeground(defaults.getColor("MenuBar.foreground"));
LookAndFeel.installBorder(menuBar, "MenuBar.border"); LookAndFeel.installColorsAndFont(menuBar, "MenuBar.background", "MenuBar.foreground", "MenuBar.font");
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); menuBar.setBackground(defaults.getColor("MenuBar.background")); menuBar.setBorder(defaults.getBorder("MenuBar.border")); menuBar.setFont(defaults.getFont("MenuBar.font")); menuBar.setForeground(defaults.getColor("MenuBar.foreground")); menuBar.setOpaque(true); }
modifyPartition(PARTITION.getValue(cmdLine), api, bs);
modifyPartition(PARTITION.getValue(cmdLine), api, bs, current);
public static void main(String[] args) throws SyntaxErrorException { ParsedArguments cmdLine = HELP_INFO.parse(args); DeviceManager dm; try { dm = InitialNaming.lookup(DeviceManager.NAME); boolean isAction = PARAM_ACTION.isSet(cmdLine); boolean isInitMBR = PARAM_INITMBR.isSet(cmdLine); boolean isDevice = PARAM_DEVICE.isSet(cmdLine); // no parameters if (!isDevice) { listAvailableDevice(dm); return; } // only device is set if (!isAction && !isInitMBR && isDevice) { printTable(ARG_DEVICE.getValue(cmdLine), dm); return; } // initMBR if (isInitMBR) { initMbr(ARG_DEVICE.getValue(cmdLine), dm); return; } // now it is a change on a specific partition so read the table IDEDevice current = (IDEDevice)dm.getDevice(ARG_DEVICE.getValue(cmdLine)); BlockDeviceAPI api = current.getAPI(BlockDeviceAPI.class); ByteBuffer mbr = ByteBuffer.allocate(IDEConstants.SECTOR_SIZE); api.read(0, mbr); if (!IBMPartitionTable.containsPartitionTable(mbr.array())) throw new IOException("This device doesn't contain a valid MBR, use --initmbr."); BootSector bs = new BootSector(mbr.array()); if (ACTION.getValue(cmdLine).intern() == "-m") { modifyPartition(PARTITION.getValue(cmdLine), api, bs); bs.write(api); return; } // it is not a modify so the PARTITION parameter is only a partition // number int partNumber; try { partNumber = Integer.parseInt(PARTITION.getValue(cmdLine)); } catch (NumberFormatException f) { throw new IllegalArgumentException("Partition number is invalid"); } if (partNumber > 3 || partNumber < 0) throw new IllegalArgumentException("Partition number is invalid"); if (ACTION.getValue(cmdLine).intern() == "-d") { deletePartition(bs, partNumber); bs.write(api); return; } if (ACTION.getValue(cmdLine).intern() == "-b") { toggleBootable(bs, partNumber); bs.write(api); } } catch (IOException e) { e.printStackTrace(); } catch (NameNotFoundException e) { e.printStackTrace(); } catch (ApiNotFoundException e) { e.printStackTrace(); } catch (DeviceNotFoundException e) { e.printStackTrace(); } }
private static void modifyPartition(String description, BlockDeviceAPI api, BootSector bs) throws IOException {
private static void modifyPartition(String description, BlockDeviceAPI api, BootSector bs, Device dev) throws IOException {
private static void modifyPartition(String description, BlockDeviceAPI api, BootSector bs) throws IOException { // arg 1 should be in the form id:start:size:fs StringTokenizer st = new StringTokenizer(description, ":"); int id = Integer.parseInt(st.nextToken()); //BUG in long //long start = Long.parseLong(st.nextToken()); //long size = Long.parseLong(st.nextToken()); int start = Integer.parseInt(st.nextToken()); int size = Integer.parseInt(st.nextToken()); int fs = Integer.parseInt(st.nextToken(), 16); System.out.println( "Init " + id + " with start = " + start + ", size = " + size + ", fs = " + Integer.toHexString(fs & 0xff)); IBMPartitionTableEntry entry = bs.getPartition(id); entry.setBootIndicator(false); entry.setSystemIndicator(fs); entry.setStartLba(start); entry.setNrSectors(size); bs.write(api); return; }
DeviceManager dm = null; try { dm = InitialNaming.lookup(DeviceManager.NAME); dm.stop(dev); dm.start(dev); } catch (NameNotFoundException e) { e.printStackTrace(); } catch (DeviceNotFoundException e) { e.printStackTrace(); } catch (DriverException e) { e.printStackTrace(); }
private static void modifyPartition(String description, BlockDeviceAPI api, BootSector bs) throws IOException { // arg 1 should be in the form id:start:size:fs StringTokenizer st = new StringTokenizer(description, ":"); int id = Integer.parseInt(st.nextToken()); //BUG in long //long start = Long.parseLong(st.nextToken()); //long size = Long.parseLong(st.nextToken()); int start = Integer.parseInt(st.nextToken()); int size = Integer.parseInt(st.nextToken()); int fs = Integer.parseInt(st.nextToken(), 16); System.out.println( "Init " + id + " with start = " + start + ", size = " + size + ", fs = " + Integer.toHexString(fs & 0xff)); IBMPartitionTableEntry entry = bs.getPartition(id); entry.setBootIndicator(false); entry.setSystemIndicator(fs); entry.setStartLba(start); entry.setNrSectors(size); bs.write(api); return; }
if (ActivationSystemTransient.debug) System.out.println("Instantiating "+desc.getClassName());
public MarshalledObject newInstance(ActivationID id, ActivationDesc desc) throws ActivationException, RemoteException { try { Remote object; Class objectClass; ClassLoader loader = Thread.currentThread().getContextClassLoader(); objectClass = loader.loadClass(desc.getClassName()); Constructor constructor = objectClass.getConstructor(cConstructorTypes); object = (Remote) constructor.newInstance( new Object[] { id, desc.getData() }); // Make the object accessible and create the stub. ActivatableServerRef ref = UnicastServer.getActivatableRef(id); Remote stub = ref.exportObject(object); MarshalledObject marsh = new MarshalledObject(stub); // Notify the activation monitor. activeObject(id, marsh); // Make call to the hook that may be overridden. activeObject(id, stub); return marsh; } catch (Exception e) { ActivationException acex = new ActivationException( "Unable to activate "+ desc.getClassName() + " from "+ desc.getLocation(), e); throw acex; } }
if (parent == null) { if (this instanceof MenuBar) { MenuBar menuBar = (MenuBar) this; if (menuBar.frame != null) retVal = menuBar.frame.postEvent(event); } } else
if (parent != null)
postEvent(Event event) { boolean retVal = false; MenuContainer parent = getParent(); if (parent == null) { if (this instanceof MenuBar) { MenuBar menuBar = (MenuBar) this; if (menuBar.frame != null) retVal = menuBar.frame.postEvent(event); } } else retVal = parent.postEvent(event); return retVal; }
public float getLSB () throws NotImplementedException
public float getLSB()
public float getLSB () throws NotImplementedException { throw new Error ("not implemented"); }
throw new Error ("not implemented");
if (horizontal) return (float) bounds.getX(); return (float) bounds.getY();
public float getLSB () throws NotImplementedException { throw new Error ("not implemented"); }
public float getRSB () throws NotImplementedException
public float getRSB()
public float getRSB () throws NotImplementedException { throw new Error ("not implemented"); }
throw new Error ("not implemented");
if (horizontal) return (float) (advanceX - (bounds.getX() + bounds.getWidth())); return (float) (advanceY - (bounds.getY() + bounds.getHeight()));
public float getRSB () throws NotImplementedException { throw new Error ("not implemented"); }
for (Iterator i = list.iterator(); i.hasNext(); ) { final Permission p = (Permission)i.next();
for (Permission p : list) {
public boolean implies(Permission perm) { for (Iterator i = list.iterator(); i.hasNext(); ) { final Permission p = (Permission)i.next(); if (p.implies(perm)) { return true; } } return false; }
public ServerSocketChannel(SelectorProvider provider) {
protected ServerSocketChannel(SelectorProvider provider) {
public ServerSocketChannel(SelectorProvider provider) { super(provider); }
if (closed) throw new AsynchronousCloseException();
protected final void end (boolean completed) throws AsynchronousCloseException { }
caret.setVisible(!caret.isVisible());
Caret c = caret; if (c != null) c.setVisible(!c.isVisible());
public void actionPerformed(ActionEvent ev) { caret.setVisible(!caret.isVisible()); }
setDelay(caret.getBlinkRate());
Caret c = caret; if (c != null) { setDelay(c.getBlinkRate());
public void update() { stop(); setDelay(caret.getBlinkRate()); if (editable) start(); else caret.setVisible(false); }
caret.setVisible(false);
c.setVisible(false); }
public void update() { stop(); setDelay(caret.getBlinkRate()); if (editable) start(); else caret.setVisible(false); }
p.close();
public SignedObject(Serializable object, PrivateKey signingKey, Signature signingEngine) throws IOException, InvalidKeyException, SignatureException { thealgorithm = signingEngine.getAlgorithm(); ByteArrayOutputStream ostream = new ByteArrayOutputStream(); ObjectOutputStream p = new ObjectOutputStream(ostream); p.writeObject(object); p.flush(); content = ostream.toByteArray(); signingEngine.initSign(signingKey); signingEngine.update(content); signature = signingEngine.sign(); }
ByteArrayInputStream istream = new ByteArrayInputStream(content);
ByteArrayInputStream bais = new ByteArrayInputStream(content); ObjectInput oi = new ObjectInputStream(bais); Object obj = oi.readObject(); oi.close(); bais.close();
public Object getObject() throws IOException, ClassNotFoundException { ByteArrayInputStream istream = new ByteArrayInputStream(content); return new ObjectInputStream(istream).readObject(); }
return new ObjectInputStream(istream).readObject();
return obj;
public Object getObject() throws IOException, ClassNotFoundException { ByteArrayInputStream istream = new ByteArrayInputStream(content); return new ObjectInputStream(istream).readObject(); }
return signature;
return (byte[]) signature.clone();
public byte[] getSignature() { return signature; }
private Provider ()
Provider ()
private Provider () { extendedLoaded = false; canonicalNames = new HashMap (); charsets = new HashMap (); // US-ASCII aka ISO646-US addCharset (new US_ASCII ()); // ISO-8859-1 aka ISO-LATIN-1 addCharset (new ISO_8859_1 ()); // UTF-8 addCharset (new UTF_8 ()); // UTF-16BE addCharset (new UTF_16BE ()); // UTF-16LE addCharset (new UTF_16LE ()); // UTF-16 addCharset (new UTF_16 ()); // UTF-16LE (marked) addCharset (new UnicodeLittle ()); // Windows-1250 aka cp-1250 (East European) addCharset (new Windows1250 ()); // Windows-1251 (Cyrillic) addCharset (new Windows1251 ()); // Windows-1252 aka cp-1252 (Latin-1) addCharset (new Windows1252 ()); // Windows-1253 (Greek) addCharset (new Windows1253 ()); // Windows-1254 (Turkish) addCharset (new Windows1254 ()); // Windows-1257 (Baltic) addCharset (new Windows1257 ()); // ISO-8859-2 aka ISO-LATIN-2 addCharset (new ISO_8859_2 ()); // ISO-8859-4 aka ISO-LATIN-4 addCharset (new ISO_8859_4 ()); // ISO-8859-5 (Cyrillic) addCharset (new ISO_8859_5 ()); // ISO-8859-7 (Greek) addCharset (new ISO_8859_7 ()); // ISO-8859-9 aka ISO-LATIN-5 addCharset (new ISO_8859_9 ()); // ISO-8859-13 aka ISO-LATIN-7 addCharset (new ISO_8859_13 ()); // ISO-8859-15 aka ISO-LATIN-9 addCharset (new ISO_8859_15 ()); // KOI8 (Cyrillic) addCharset (new KOI_8 ()); }
if(cs == null && !extendedLoaded)
if (cs == null)
public Charset charsetForName (String charsetName) { Charset cs = (Charset) charsets.get(canonicalNames.get(charsetName.toLowerCase())); if(cs == null && !extendedLoaded) { loadExtended(); cs = (Charset) charsets.get(canonicalNames.get(charsetName.toLowerCase())); } return cs; }
private void loadExtended ()
private synchronized void loadExtended ()
private void loadExtended () { if(extendedLoaded) return; addCharset (new ISO_8859_3 ()); // ISO-8859-3 aka ISO-LATIN-3 addCharset (new ISO_8859_6 ()); // ISO-8859-6 (Arabic) addCharset (new ISO_8859_8 ()); // ISO-8859-8 (Hebrew) // Some more codepages addCharset (new Cp855()); // IBM Cyrillic addCharset (new Cp857()); // IBM Turkish addCharset (new Cp860()); // MSDOS Portugese addCharset (new Cp861()); // MSDOS Icelandic addCharset (new Cp862()); // PC Hebrew addCharset (new Cp863()); // MSDOS Can. French addCharset (new Cp864()); // PC Arabic addCharset (new Cp865()); // MSDOS Nordic addCharset (new Cp866()); // MSDOS Russian addCharset (new Cp869()); // IBM modern Greek addCharset (new Cp874()); // IBM Thai extendedLoaded = true; }
addCharset (new MacCentralEurope()); addCharset (new MacCroatian()); addCharset (new MacCyrillic()); addCharset (new MacDingbat()); addCharset (new MacGreek()); addCharset (new MacIceland()); addCharset (new MacRoman()); addCharset (new MacRomania()); addCharset (new MacSymbol()); addCharset (new MacThai()); addCharset (new MacTurkish()); addCharset (new MS874()); addCharset (new Windows1255()); addCharset (new Windows1256()); addCharset (new Windows1258());
private void loadExtended () { if(extendedLoaded) return; addCharset (new ISO_8859_3 ()); // ISO-8859-3 aka ISO-LATIN-3 addCharset (new ISO_8859_6 ()); // ISO-8859-6 (Arabic) addCharset (new ISO_8859_8 ()); // ISO-8859-8 (Hebrew) // Some more codepages addCharset (new Cp855()); // IBM Cyrillic addCharset (new Cp857()); // IBM Turkish addCharset (new Cp860()); // MSDOS Portugese addCharset (new Cp861()); // MSDOS Icelandic addCharset (new Cp862()); // PC Hebrew addCharset (new Cp863()); // MSDOS Can. French addCharset (new Cp864()); // PC Arabic addCharset (new Cp865()); // MSDOS Nordic addCharset (new Cp866()); // MSDOS Russian addCharset (new Cp869()); // IBM modern Greek addCharset (new Cp874()); // IBM Thai extendedLoaded = true; }
super("Windows-1250", new String[] {
super("windows-1250", new String[] {
public Windows1250() { super("Windows-1250", new String[] { "Windows1250", "ibm-5346_P100-1998", "ibm-5346", "cp1250", "cp-1250", "cp_1250", "windows1250", "windows_1250" }); lookupTable = lookup; }
super("Windows-1252", new String[] {
super("windows-1252", new String[] {
public Windows1252() { super("Windows-1252", new String[] { "Windows1252", "ibm-5348_P100-1997", "ibm-5348", "windows-1252", "cp1252", "cp-1252" }); lookupTable = lookup; }
super("Windows-1253", new String[] {
super("windows-1253", new String[] {
public Windows1253() { super("Windows-1253", new String[] { "Windows1253", "cp1253", "cp-1253", "cp_1253", "windows1253", "windows_1253" }); lookupTable = lookup; }
super("Windows-1254", new String[] {
super("windows-1254", new String[] {
public Windows1254() { super("Windows-1254", new String[] { "Windows1254", "cp1254", "cp-1254", "cp_1254", "windows1254", "windows_1254" }); lookupTable = lookup; }
super("Windows-1257", new String[] {
super("windows-1257", new String[] {
public Windows1257() { super("Windows-1257", new String[] { "Windows1257", "cp1257", "cp-1257", "cp_1257", "windows1257", "windows_1257" }); lookupTable = lookup; }
super("Windows-1255", new String[] {
super("windows-1255", new String[] {
public Windows1255() { super("Windows-1255", new String[] { "Windows1255", "cp1255", "cp-1255", "cp_1255", "windows1255", "windows_1255" }); lookupTable = lookup; }
super("Windows-1256", new String[] {
super("windows-1256", new String[] {
public Windows1256() { super("Windows-1256", new String[] { "Windows1256", "cp1256", "cp-1256", "cp_1256", "windows1256", "windows_1256" }); lookupTable = lookup; }
super("Windows-1258", new String[] {
super("windows-1258", new String[] {
public Windows1258() { super("Windows-1258", new String[] { "Windows1258", "cp1258", "cp-1258", "cp_1258", "windows1258", "windows_1258" }); lookupTable = lookup; }