rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
executeMeMacro(e); }
screen.sendKeys("[field-]"); }
public void actionPerformed(ActionEvent e) { executeMeMacro(e); }
doMeTransfer();
screen.sendKeys("[newline]");
public void actionPerformed(ActionEvent e) { doMeTransfer(); }
sendScreenEMail();
vt.hostPrint(1);
public void actionPerformed(ActionEvent e) { sendScreenEMail(); }
sendMeToFile(); }
vt.systemRequest('4'); }
public void actionPerformed(ActionEvent e) { sendMeToFile(); }
vt.disconnect(); getFocusForMe(); }
showHexMap(); }
public void actionPerformed(ActionEvent e) { vt.disconnect(); getFocusForMe(); }
vt.connect(); getFocusForMe(); }
mapMeKeys(); }
public void actionPerformed(ActionEvent e) { vt.connect(); getFocusForMe(); }
closeSession(); }
doAttributes(); }
public void actionPerformed(ActionEvent e) { closeSession(); }
if (keyProcessed || e.isConsumed())
if (Character.isISOControl(e.getKeyChar()) || keyProcessed || e.isConsumed() )
private void processVTKeyReleased(KeyEvent e){ if (isLinux && e.getKeyCode() == e.VK_ALT_GRAPH) { isAltGr = false; }// displayInfo(e,"Released " + keyProcessed); if (keyProcessed || e.isConsumed()) return; String s = keyMap.getKeyStrokeText(e); if (s != null) { i...
if (Character.isISOControl(kc) || keyProcessed)
if (Character.isISOControl(kc) || keyProcessed) {
private void processVTKeyTyped(KeyEvent e){ char kc = e.getKeyChar();// displayInfo(e,"Typed processed " + keyProcessed); if (Character.isISOControl(kc) || keyProcessed)// if (keyProcessed) return;// displayInfo(e,"Typed "); String s = "";// if (isLinux) {// last...
}
private void processVTKeyTyped(KeyEvent e){ char kc = e.getKeyChar();// displayInfo(e,"Typed processed " + keyProcessed); if (Character.isISOControl(kc) || keyProcessed)// if (keyProcessed) return;// displayInfo(e,"Typed "); String s = "";// if (isLinux) {// last...
return super.getAttributes();
if (attributes == null) { attributes = getStyleSheet().getViewAttributes(this); } return attributes;
public AttributeSet getAttributes() { // FIXME: Implement this multiplexing thing. return super.getAttributes(); }
}
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 13, y); g.drawL...
g.setColor(Color.black);
if (enabled) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getControlDarkShadow());
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 13, y); g.drawL...
g.setColor(focus ? new Color(153, 153, 204) : new Color(204, 204, 204)); g.fillRect(x + 2, y + 2, 12, 7);
if (focus) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControl()); g.fillRect(x + 1, y + 2, 13, 7);
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 13, y); g.drawL...
g.setColor(focus ? new Color(204, 204, 255) : new Color(255, 255, 255));
if (focus) g.setColor(MetalLookAndFeel.getPrimaryControl()); else g.setColor(MetalLookAndFeel.getWhite());
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 13, y); g.drawL...
g.setColor(focus ? new Color(102, 102, 153) : Color.black); g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 11, y + 3, x + 11, y + 3); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 9, y + 5, x + 9, y + 5); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 7...
}
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 13, y); g.drawL...
Color dark = MetalLookAndFeel.getControlDarkShadow(); Color light = MetalLookAndFeel.getWhite(); g.translate(x, y);
Color savedColor = g.getColor(); JRadioButton b = (JRadioButton) c;
public void paintIcon(Component c, Graphics g, int x, int y) { Color dark = MetalLookAndFeel.getControlDarkShadow(); Color light = MetalLookAndFeel.getWhite(); g.translate(x, y); // The light 'circle' g.setColor(light); g.drawLine(4, 1, 10, 1); g.drawLine(2, 2, 3, 2); g.dr...
g.setColor(light); g.drawLine(4, 1, 10, 1); g.drawLine(2, 2, 3, 2); g.drawLine(8, 2, 11, 2); g.drawLine(2, 3, 2, 3); g.drawLine(11, 2, 11, 9); g.drawLine(1, 4, 1, 7); g.drawLine(12, 4, 12, 7); g.drawLine(2, 8, 2, 11); g.drawLine(11, 8, 11, 9); g.drawLine(10, 10, 10, 10); g.drawLine(2, 11, 9, 11); g.drawLine(4, 12, 7, 1...
if (b.isEnabled()) g.setColor(MetalLookAndFeel.getControlDarkShadow()); else g.setColor(MetalLookAndFeel.getControlDisabled()); g.drawLine(x + 2, y + 1, x + 3, y + 1); g.drawLine(x + 4, y, x + 7, y); g.drawLine(x + 8, y + 1, x + 9, y + 1); g.drawLine(x + 10, y + 2, x + 10, y + 3); g.drawLine(x + 11, y + 4, x + 11, y + ...
public void paintIcon(Component c, Graphics g, int x, int y) { Color dark = MetalLookAndFeel.getControlDarkShadow(); Color light = MetalLookAndFeel.getWhite(); g.translate(x, y); // The light 'circle' g.setColor(light); g.drawLine(4, 1, 10, 1); g.drawLine(2, 2, 3, 2); g.dr...
g.setColor(dark); g.drawLine(4, 0, 7, 0); g.drawLine(2, 1, 3, 1); g.drawLine(8, 1, 9, 1); g.drawLine(1, 2, 1, 3); g.drawLine(10, 2, 10, 3); g.drawLine(0, 4, 0, 7); g.drawLine(11, 4, 11, 7); g.drawLine(1, 8, 1, 9); g.drawLine(10, 8, 10, 9); g.drawLine(2, 10, 3, 10); g.drawLine(8, 10, 9, 10); g.drawLine(4, 11, 7, 11);
if (b.getModel().isArmed()) { g.setColor(MetalLookAndFeel.getControlShadow()); g.drawLine(x + 4, y + 1, x + 7, y + 1); g.drawLine(x + 4, y + 10, x + 7, y + 10); g.drawLine(x + 1, y + 4, x + 1, y + 7); g.drawLine(x + 10, y + 4, x + 10, y + 7); g.fillRect(x + 2, y + 2, 8, 8); } else { if (b.isEnabled()) { g.setColor(Met...
public void paintIcon(Component c, Graphics g, int x, int y) { Color dark = MetalLookAndFeel.getControlDarkShadow(); Color light = MetalLookAndFeel.getWhite(); g.translate(x, y); // The light 'circle' g.setColor(light); g.drawLine(4, 1, 10, 1); g.drawLine(2, 2, 3, 2); g.dr...
JRadioButton rb = (JRadioButton) c; if (rb.isSelected()) drawCheck(c, g); g.translate(-x, -y);
if (b.isEnabled()) { g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 10, y + 1, x + 10, y + 1); g.drawLine(x + 11, y + 2, x + 11, y + 3); g.drawLine(x + 12, y + 4, x + 12, y + 7); g.drawLine(x + 11, y + 8, x + 11, y + 9); g.drawLine(x + 10, y + 10, x + 10, y + 10); g.drawLine(x + 8, y + 11, x + 9, y + 11); g....
public void paintIcon(Component c, Graphics g, int x, int y) { Color dark = MetalLookAndFeel.getControlDarkShadow(); Color light = MetalLookAndFeel.getWhite(); g.translate(x, y); // The light 'circle' g.setColor(light); g.drawLine(4, 1, 10, 1); g.drawLine(2, 2, 3, 2); g.dr...
}
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 7, y); g.drawLi...
g.setColor(Color.black);
if (enabled) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getControlDarkShadow());
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 7, y); g.drawLi...
g.setColor(focus ? new Color(153, 153, 204) : new Color(204, 204, 204)); g.fillRect(x + 2, y + 2, 7, 12);
if (focus) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControl()); g.fillRect(x + 2, y + 1, 7, 13);
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 7, y); g.drawLi...
g.setColor(focus ? new Color(204, 204, 255) : new Color(255, 255, 255));
if (focus) g.setColor(MetalLookAndFeel.getPrimaryControl()); else g.setColor(MetalLookAndFeel.getWhite());
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 7, y); g.drawLi...
g.setColor(focus ? new Color(102, 102, 153) : Color.black); g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 3, y + 11, x + 3, y + 11); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 5, y + 9, x + 5, y + 9); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 7...
}
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 7, y); g.drawLi...
throw new BAD_OPERATION("Invalid enumeration code " + code);
BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code); bad.minor = Minor.PolicyType; throw bad;
public static ServantRetentionPolicyValue from_int(int code) { try { return enume [ code ]; } catch (ArrayIndexOutOfBoundsException ex) { throw new BAD_OPERATION("Invalid enumeration code " + code); } }
if (keys == null) return; for (int i = 0; i < keys.length - 1; i+= 2) { Object key = keys[i]; KeyStroke keyStroke; if (key instanceof KeyStroke) keyStroke = (KeyStroke)key; else keyStroke = KeyStroke.getKeyStroke((String)key); retMap.put(keyStroke, keys[i+1]); }
public static void loadKeyBindings(InputMap retMap, Object[] keys) { // TODO: Implement this properly. }
return null;
ComponentInputMap retMap = new ComponentInputMapUIResource(c); loadKeyBindings(retMap, keys); return retMap;
public static ComponentInputMap makeComponentInputMap(JComponent c, Object[] keys) { return null; }
return null;
InputMap retMap = new InputMapUIResource(); loadKeyBindings(retMap, keys); return retMap;
public static InputMap makeInputMap(Object[] keys) { return null; }
return null;
JTextComponent.KeyBinding[] retBindings = new JTextComponent.KeyBinding[keyBindingList.length / 2]; for (int i = 0; i < keyBindingList.length - 1; i+= 2) { KeyStroke stroke; if (keyBindingList[i] instanceof KeyStroke) stroke = (KeyStroke)keyBindingList[i]; else stroke = KeyStroke.getKeyStroke((String)keyBindingList[i])...
public static JTextComponent.KeyBinding[] makeKeyBindings(Object[] keyBindingList) { return null; }
int origin = mymatch.index; int numRepeats = 0;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
REMatch last = null; REMatch current;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
Vector positions = new Vector(); positions.addElement(newMatch); REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { if ((stingy && (numRepeats >= min)) || alwaysEmpty) {
if (alwaysEmpty) {
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
mymatch.empty = (mymatch.index == origin);
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
if (alwaysEmpty) return false;
return false;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
doables = null; doablesLast = null;
int numRepeats = 0;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { doablesLast.next = recurrent; } while (doablesLast.next != null) { doablesLast = doablesLast.n...
REMatch doables; int lastIndex = mymatch.index; boolean emptyMatchFound = false; while (numRepeats < min) { doables = findDoables(token, input, newMatch); if (doables == null) return false;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
positions.addElement(newMatch);
if (newMatch.empty) { numRepeats = min; emptyMatchFound = true; break; } lastIndex = newMatch.index; } Vector positions = new Vector(); while (numRepeats <= max) { if (stopMatchingIfSatisfied && stingy) { REMatch results = matchRest(input, newMatch); if (results != null) { mymatch.assignFrom(results); retur...
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
if (numRepeats < min) numRepeats = min; break;
emptyMatchFound = true;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
if (numRepeats > min) { numRepeats--; positions.remove(positions.size() - 1); break;
if (!stingy) break;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
if (numRepeats == min) break;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
lastIndex = doables.index; } while (numRepeats < max);
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
if (numRepeats < min) return false; int posIndex = positions.size();
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
REMatch allResults = null; REMatch allResultsLast = null;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch);
REMatch.REMatchList allResults = new REMatch.REMatchList(); int posCount = positions.size(); int posIndex = (stingy ? 0 : posCount - 1); while (posCount-- > 0) { REMatch m = (REMatch) positions.elementAt(posIndex); if (stingy) posIndex++; else posIndex--; REMatch results = matchRest(input, m);
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
if (allResults == null) { allResults = results; allResultsLast = results; } else {
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
allResultsLast.next = results;
allResults.addTail(results);
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } }
else {
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
if (allResults != null) { mymatch.assignFrom(allResults); mymatch.empty = (mymatch.index == origin);
} if (allResults.head != null) { mymatch.assignFrom(allResults.head);
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z)...
REMatch doneIndex = null; REMatch doneIndexLast = null;
REMatch.REMatchList doneIndex = new REMatch.REMatchList();
private REMatch matchRest(CharIndexed input, final REMatch newMatch) { REMatch current, single; REMatch doneIndex = null; REMatch doneIndexLast = null; // Test all possible matches for this number of repeats for (current = newMatch; current != null; current = current.next) { // clone() separates a single match ...
if (doneIndex == null) { doneIndex = single; doneIndexLast = single; } else { doneIndexLast.next = single; } while (doneIndexLast.next != null) { doneIndexLast = doneIndexLast.next; }
doneIndex.addTail(single);
private REMatch matchRest(CharIndexed input, final REMatch newMatch) { REMatch current, single; REMatch doneIndex = null; REMatch doneIndexLast = null; // Test all possible matches for this number of repeats for (current = newMatch; current != null; current = current.next) { // clone() separates a single match ...
return doneIndex;
return doneIndex.head;
private REMatch matchRest(CharIndexed input, final REMatch newMatch) { REMatch current, single; REMatch doneIndex = null; REMatch doneIndexLast = null; // Test all possible matches for this number of repeats for (current = newMatch; current != null; current = current.next) { // clone() separates a single match ...
static Frame getOwnerFrame()
static Window getOwnerFrame(Window owner) { Window result = owner; if (result == null)
static Frame getOwnerFrame() { if (ownerFrame == null) ownerFrame = new OwnerFrame(); return ownerFrame; }
return ownerFrame;
result = ownerFrame; } return result;
static Frame getOwnerFrame() { if (ownerFrame == null) ownerFrame = new OwnerFrame(); return ownerFrame; }
synchronized(data) { byte[] newData = new byte[getRecLen()]; System.arraycopy(data, offset, newData, 0, getRecLen()); this.data = newData; setOffset(0); }
public Ext2DirectoryRecord(Ext2FileSystem fs, byte[] data, int offset, int fileOffset) { this.fs=fs; this.data = data; this.offset = offset; this.fileOffset = fileOffset; //make a copy of the data /* byte[] newData = new byte[getRecLen()]; System.arraycopy(data, offset, newData, 0, getRecLen()); this.data =...
protected void expandRecord(long beginning, long end) throws FileSystemException{
protected synchronized void expandRecord(long beginning, long end) throws FileSystemException{
protected void expandRecord(long beginning, long end) throws FileSystemException{ log.debug("expandRecord("+beginning + ", "+ end+")"); if(beginning+getNameLen()+8 < end) { //the record fits in the block setRecLen((int)(end - beginning)); //pad the end of the record with zeroes byte[] newData = new byte[getR...
public int getINodeNr() {
public synchronized int getINodeNr() {
public int getINodeNr() { return (int)Ext2Utils.get32(data, offset); }
public String getName() {
public synchronized String getName() {
public String getName() { StringBuffer name = new StringBuffer(); if(getINodeNr()!=0) { //TODO: character conversion?? for(int i=0; i<getNameLen(); i++) name.append( (char)Ext2Utils.get8(data, offset+8+i) ); log.debug("Ext2DirectoryRecord(): iNode="+getINodeNr()+", name="+name); } return name.toString();...
private int getNameLen() {
private synchronized int getNameLen() {
private int getNameLen() { return Ext2Utils.get8(data, offset+6); }
public int getRecLen() {
public synchronized int getRecLen() {
public int getRecLen() { return Ext2Utils.get16(data, offset+4); }
public int getType() {
public synchronized int getType() {
public int getType() { return Ext2Utils.get8(data, offset+7); }
private void setINodeNr(long nr) {
private synchronized void setINodeNr(long nr) {
private void setINodeNr(long nr) { Ext2Utils.set32(data, offset, nr); }
private void setName(String name) {
private synchronized void setName(String name) {
private void setName(String name) { for(int i=0; i<name.length(); i++) Ext2Utils.set8(data, offset+8+i, name.charAt(i)); }
private void setNameLen(int len) {
private synchronized void setNameLen(int len) {
private void setNameLen(int len) { Ext2Utils.set8(data, offset+6, len); }
private void setRecLen(int len) {
private synchronized void setRecLen(int len) {
private void setRecLen(int len) { Ext2Utils.set16(data, offset+4, len); }
private void setType(int type) {
private synchronized void setType(int type) {
private void setType(int type) { if(!fs.hasIncompatFeature(Ext2Constants.EXT2_FEATURE_INCOMPAT_FILETYPE)) return; Ext2Utils.set8(data, offset+7, type); }
protected void truncateRecord() {
protected synchronized void truncateRecord() {
protected void truncateRecord() { int newLength = getNameLen() + 8; //record length is padded to n*4 bytes if(newLength%4!=0) newLength+=4-newLength%4; setRecLen(newLength); log.debug("truncateRecord(): newLength: "+newLength); }
if (cp.equals("870-sk")) return codePage870sk;
public static final int[] getCodePage(String cp) { if (cp.equals("37")) return codePage37; if (cp.equals("37PT")) return codePage37PT; if (cp.equals("273")) return codePage273; if (cp.equals("277-dk")) return codePage277_DK; if (cp.equals("277-no")) re...
if (e.getPropertyName().equals(JToolBar.ROLLOVER_CHANGED_PROPERTY))
if (e.getPropertyName().equals("rollover"))
public void propertyChange(PropertyChangeEvent e) { // FIXME: need name properties so can change floatFrame title. if (e.getPropertyName().equals(JToolBar.ROLLOVER_CHANGED_PROPERTY)) setRolloverBorders(toolBar.isRollover()); }
nestedToXDF(outputstream, indent, 0, stop);
synchronized (attribHash) { nestedToXDF(outputstream, indent, 0, stop); }
protected void specificIOStyleToXDF( OutputStream outputstream,String indent) { int stop = parentArray.getAxisList().size()-1; nestedToXDF(outputstream, indent, 0, stop); }
d.width = d.width + checkIcon.getIconWidth() + defaultTextIconGap;
d.width += checkIcon.getIconWidth() + defaultTextIconGap;
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Dimension d = BasicGraphicsUtils.getPreferredButtonSize(m, ...
if (!((JMenu) c).isTopLevelMenu()) d.width += arrowIcon.getIconWidth() + m.getParent().getWidth();
int pWidth = m.getParent().getWidth(); if (!((JMenu)c).isTopLevelMenu() && d.width < pWidth) d.width = pWidth - m.getInsets().left - m.getInsets().right;
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Dimension d = BasicGraphicsUtils.getPreferredButtonSize(m, ...
d.width += MenuGap;
d.width += arrowIcon.getIconWidth() + MenuGap;
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Dimension d = BasicGraphicsUtils.getPreferredButtonSize(m, ...
public AccessibleJDialog()
protected AccessibleJDialog()
public AccessibleJDialog() { super(); // Nothing to do here. }
super(toolkit, list, new JList()); this.list = list;
super(toolkit, list, new SwingList(list));
public SwingListPeer(SwingToolkit toolkit, final List list) { super(toolkit, list, new JList()); this.list = list; final JList jList = (JList)jComponent; SwingToolkit.add(list, jList); SwingToolkit.copyAwtProperties(list, jList); final ListModel model = new AbstractListModel() { public Object getEl...
classXDFNodeName = super.getClassXDFNodeName()+ "||" + "string";
parentClassXDFNodeName = super.getClassXDFNodeName(); classXDFNodeName = "string";
private void init() { classXDFNodeName = super.getClassXDFNodeName()+ "||" + "string"; attribOrder.add(0, "length"); //add length as the first attribute; attribHash.put("lessThanValue", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("lessThanOrEqualValue", new XMLAttribute(null, Constants...
frame.show();
frame.setVisible(true);
public void run() { frame.show(); }
if (mark == s.count)
if (mark >= s.count)
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); BreakIterator breaker = Brea...
if (isEncodingAvailable("1141")) {
if (isEncodingAvailable("Cp1141")) {
static final CodePage getCodePage(String cp) { System.err.println("Trying NativeCodePage:" + cp); if (cp.equals("37")) return new NativeCodePage(cp, codePage37); if (cp.equals("37PT")) return new NativeCodePage(cp, codePage37PT); if (cp.equals("273")) return new NativeCo...
if (isEncodingAvailable("1140")) {
if (isEncodingAvailable("Cp1140")) {
static final CodePage getCodePage(String cp) { System.err.println("Trying NativeCodePage:" + cp); if (cp.equals("37")) return new NativeCodePage(cp, codePage37); if (cp.equals("37PT")) return new NativeCodePage(cp, codePage37PT); if (cp.equals("273")) return new NativeCo...
public void propertyChange(PropertyChangeEvent evt)
public void propertyChange(PropertyChangeEvent e)
public void propertyChange(PropertyChangeEvent evt) { }
throw new LinkageError("Failed to compile " + name, ex);
final LinkageError le = new LinkageError("Failed to compile " + name); le.initCause(ex); throw le;
private synchronized void doCompile() { if (isCompiled()) { return; } if (!isCompiling()) { if (loader.isCompileRequired()) { state |= VmTypeState.ST_COMPILING; //BootLog.debug("Compiling " + getName()); // Compile the superclass (if any) ...
setOpaque(true);
setOpaque(false);
public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { if (leaf) setIcon(getLeafIcon()); else if (expanded) setIcon(getOpenIcon()); else setIcon(getClosedIcon()); setText(val.toString()); this.selected ...
setBorder(UIManager.getLookAndFeelDefaults().getBorder("Tree.nonSelectionBorder"));
public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { if (leaf) setIcon(getLeafIcon()); else if (expanded) setIcon(getOpenIcon()); else setIcon(getClosedIcon()); setText(val.toString()); this.selected ...
if (descriptor) { switch (type_code.charAt(0)) { case 'B': return byte.class; case 'C': return char.class; case 'D': return double.class; case 'F': return float.class; case 'I': return int.class; case 'J': return long.class; case 'S': return short.class; case 'V': return void.class; case 'Z': return boolean.class; defa...
return getClassForEncoding(type_code, descriptor, null);
public static Class getClassForEncoding(String type_code, boolean descriptor) throws ClassNotFoundException { if (descriptor) { switch (type_code.charAt(0)) { case 'B': return byte.class; case 'C': return char.class; case 'D': ret...
if (CurrentArray.getDataCube().getHref() != null) return;
if ( !(formatObj instanceof DelimitedXMLDataIOStyle) && CurrentArray.getDataCube().getHref() != null) return;
public void action (SaxDocumentHandler handler) throws SAXException { // we stopped reading datanode, lower count by one DataNodeLevel--; // we might still be nested within a data node // if so, return now to accumulate more data within the DATABLOCK if...
XMLDataIOStyle formatObj = CurrentArray.getXMLDataIOStyle();
public void action (SaxDocumentHandler handler) throws SAXException { // we stopped reading datanode, lower count by one DataNodeLevel--; // we might still be nested within a data node // if so, return now to accumulate more data within the DATABLOCK if...
thisString = thisString.trim();
private void addDataToCurrentArray ( Locator dataLocator, String thisString, DataFormat CurrentDataFormat, int intRadix ) throws SetDataException {/...
else if (readObj instanceof DelimitedXMLDataIOStyle) { String data = getCharacterDataFromInputStream(in); if (!IgnoreWhitespaceOnlyData || stringIsNotAllWhitespace(data) ) { DATABLOCK.append(data); } }
private void loadHrefDataIntoCurrentArray ( Entity hrefObj, XMLDataIOStyle readObj, String compressionType ) throws SAXException { // well, we should be doing some...
Log.debugln("Got Delimited DataCell ("+start+","+termend+") (repeatable):["+valueString+"]");
private ArrayList splitStringIntoStringObjects ( String valueListString, String delimiter, String repeatable, String terminatingDelimiter ...
this.scale = font.getSize() / fontData.getHorizontalHeaderTable().getAscent();
this.fontSize = font.getSize(); final double ascent = fontData.getHorizontalHeaderTable().getAscent(); this.scale = fontSize / ascent;
public TTFFontMetrics(Font font, TTFFontData fontData) throws IOException { super(font); if (font == null) { throw new IllegalArgumentException("font cannot be null"); } if (fontData == null) { throw new IllegalArgumentException("fontData cannot be null"); } this.fontData = fontData; this.scale = font.getSi...
return (int)(fontData.getHorizontalHeaderTable().getAscent() * scale);
final int ascent = (int)(fontData.getHorizontalHeaderTable().getAscent() * scale); return ascent;
public int getAscent() { try { return (int)(fontData.getHorizontalHeaderTable().getAscent() * scale); } catch (IOException ex) { return 0; } }
return Math.abs((int)(fontData.getHorizontalHeaderTable().getDescent() * scale));
final int descent = Math.abs((int)(fontData.getHorizontalHeaderTable().getDescent() * scale)); return descent;
public int getDescent() { try { return Math.abs((int)(fontData.getHorizontalHeaderTable().getDescent() * scale)); } catch (IOException ex) { return 0; } }
SecureRandom rnd = new SecureRandom ();
private static final BigInteger newR(final BigInteger N) { final int upper = (N.bitLength() + 7) / 8; final int lower = upper / 2; final byte[] bl = new byte[1]; SecureRandom rnd = new SecureRandom (); int b; do { rnd.nextBytes(bl); b = bl[0] & 0xFF; } while (b < lower ||...
rnd.nextBytes(bl);
prng.nextBytes(bl);
private static final BigInteger newR(final BigInteger N) { final int upper = (N.bitLength() + 7) / 8; final int lower = upper / 2; final byte[] bl = new byte[1]; SecureRandom rnd = new SecureRandom (); int b; do { rnd.nextBytes(bl); b = bl[0] & 0xFF; } while (b < lower ||...
rnd.nextBytes(buffer);
prng.nextBytes(buffer);
private static final BigInteger newR(final BigInteger N) { final int upper = (N.bitLength() + 7) / 8; final int lower = upper / 2; final byte[] bl = new byte[1]; SecureRandom rnd = new SecureRandom (); int b; do { rnd.nextBytes(bl); b = bl[0] & 0xFF; } while (b < lower ||...
popupLocationX = point.x; popupLocationY = point.y;
popupLocationX += point.x; popupLocationY += point.y;
public void setVisible(final boolean visible) { // Hook up this call so that it gets executed on the event thread in order // to avoid synchronization problems when calling the layout manager. if (! SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeLater(new Runnable() { ...
LastFastAxisCoordinate = -1;
LastFastAxisCoordinate = 0; LastFieldAxisCoordinate = 0;
public Object action (SaxDocumentHandler handler, Attributes attrs) { // we only need to do these things for the first time we enter // a data node if (DataNodeLevel == 0) { // A little 'pre-handling' as href is a specialattribute // that will hold an (Href) ob...
int currentFastAxisCoordinate = TaggedLocatorObj.getAxisIndex(FastestAxis); if ( currentFastAxisCoordinate != LastFastAxisCoordinate )
int currentFieldAxisCoordinate = TaggedLocatorObj.getAxisIndex(CurrentArray.getFieldAxis()); if ( currentFieldAxisCoordinate != LastFieldAxisCoordinate )
public void action (SaxDocumentHandler handler) { if (CurrentDataTagLevel == DataTagLevel) TaggedLocatorObj.next(); // bump up DataFormat appropriately if (MaxDataFormatIndex > 0) { int currentFastAxisCoordinate = TaggedLocatorObj.getAxisIndex(FastestAxis); ...
LastFastAxisCoordinate = currentFastAxisCoordinate;
LastFieldAxisCoordinate = currentFieldAxisCoordinate;
public void action (SaxDocumentHandler handler) { if (CurrentDataTagLevel == DataTagLevel) TaggedLocatorObj.next(); // bump up DataFormat appropriately if (MaxDataFormatIndex > 0) { int currentFastAxisCoordinate = TaggedLocatorObj.getAxisIndex(FastestAxis); ...