bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException{ try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(className.getClass().getClassLoader().findClass(className)); } catch(Exception e) { ; } try { return(ClassLoader.getSystemClassLoader().findClass(className)); } catch(Exception e) { ; } */ // FIXME: What is the context class loader? /* try { } catch(Exception e) { ; } */ if (classLoader != null) return(classLoader.loadClass(className)); else throw new ClassNotFoundException(className);}
protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException{ try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(className.getClass().getClassLoader().findClass(className)); } catch(Exception e) { ; } try { return(ClassLoader.getSystemClassLoader().findClass(className)); } catch(Exception e) { ; } */ // FIXME: What is the context class loader? /* try { } catch(Exception e) { ; } */ if (classLoader != null) return(classLoader.loadClass(className)); else throw new ClassNotFoundException(className);}
6,134
tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException{ try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(className.getClass().getClassLoader().findClass(className)); } catch(Exception e) { ; } try { return(ClassLoader.getSystemClassLoader().findClass(className)); } catch(Exception e) { ; } */ // FIXME: What is the context class loader? /* try { } catch(Exception e) { ; } */ if (classLoader != null) return(classLoader.loadClass(className)); else throw new ClassNotFoundException(className);}
tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException{ try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(className.getClass().getClassLoader().findClass(className)); } catch(Exception e) { ; } try { return(ClassLoader.getSystemClassLoader().findClass(className)); } catch(Exception e) { ; } */ // FIXME: What is the context class loader? /* try { } catch(Exception e) { ; } */ if (classLoader != null) return(classLoader.loadClass(className)); else throw new ClassNotFoundException(className);}
6,135
tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException{ try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(className.getClass().getClassLoader().findClass(className)); } catch(Exception e) { ; } try { return(ClassLoader.getSystemClassLoader().findClass(className)); } catch(Exception e) { ; } */ // FIXME: What is the context class loader? /* try { } catch(Exception e) { ; } */ if (classLoader != null) return(classLoader.loadClass(className)); else throw new ClassNotFoundException(className);}
tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException{ try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(className.getClass().getClassLoader().findClass(className)); } catch(Exception e) { ; } try { return(ClassLoader.getSystemClassLoader().findClass(className)); } catch(Exception e) { ; } */ // FIXME: What is the context class loader? /* try { } catch(Exception e) { ; } */ if (classLoader != null) return(classLoader.loadClass(className)); else throw new ClassNotFoundException(className);}
6,136
writeExternal(ObjectOutput stream) throws IOException{ // FIXME: Implement me}
writeExternal(ObjectOutput stream) throws IOException{ // FIXME: Implement me}
6,137
writeExternal(ObjectOutput stream) throws IOException{ // FIXME: Implement me}
writeExternal(ObjectOutput stream) throws IOException{ // FIXME: Implement me}
6,138
public final void drawChar(Graphics2D g) { if (attributePlace && s.getShowHex()) { Font f = g.getFont(); Font k = f.deriveFont(f.getSize2D()/2); g.setFont(k); g.setColor(s.colorHexAttr); char[] a = Integer.toHexString(attr).toCharArray(); g.drawChars(a, 0, 1, x, y + (int)(s.fmHeight /2)); g.drawChars(a, 1, 1, x+(int)(s.fmWidth/2), (int)(y + s.fmHeight - (s.lm.getDescent() + s.lm.getLeading())-2)); g.setFont(f); } if(!nonDisplay && !attributePlace) { if (!useGui) { g.setColor(bg); g.fill(cArea); } else { if (bg == s.colorBg && whichGui >= FIELD_LEFT && whichGui <= FIELD_ONE) g.setColor(s.colorGUIField); else g.setColor(bg); g.fill(cArea); } if (useGui && (whichGui < FIELD_LEFT)) { int w = 0; g.setColor(fg); switch (whichGui) { case UPPER_LEFT: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpperLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpperLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case UPPER: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpper(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpper(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case UPPER_RIGHT: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpperRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpperRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LEFT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); g.drawLine(x + s.fmWidth / 2, y, x + s.fmWidth / 2, y + s.fmHeight); } } break; case RIGHT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LOWER_LEFT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLowerLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLowerLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case BOTTOM: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinBottom(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinBottom(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LOWER_RIGHT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLowerRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLowerRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; } } else { if (sChar[0] != 0x0) { // use this until we define colors for gui stuff if ((useGui && whichGui < BUTTON_LEFT) && (fg == s.colorGUIField)) g.setColor(Color.black); else g.setColor(fg); try { if (useGui) g.drawChars(sChar, 0, 1, x+1, cy -2); else g.drawChars(sChar, 0, 1, x, cy -2); } catch (IllegalArgumentException iae) { System.out.println(" ScreenChar iae " + iae.getMessage()); } } if(underLine ) { if (!useGui || s.guiShowUnderline) { g.setColor(fg);// g.drawLine(x, cy -2, (int)(x + s.fmWidth), cy -2); g.drawLine(x, (int)(y + (s.fmHeight - s.lm.getLeading()-5)), (int)(x + s.fmWidth), (int)(y + (s.fmHeight - s.lm.getLeading())-5)); } } if(colSep) { g.setColor(s.colorSep); switch (s.getColSepLine()) { case 1: g.drawLine(x, y + s.fmHeight - (int)s.lm.getLeading()-4, x, y + s.fmHeight); g.drawLine(x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-4, x + s.fmWidth - 1, y + s.fmHeight); break; case 2: g.drawLine(x, y + s.fmHeight - (int)s.lm.getLeading()-3, x, y + s.fmHeight - (int)s.lm.getLeading()-4); g.drawLine(x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-3, x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-4); break; default: g.setColor(fg); g.drawLine(x, y, x, y + s.fmHeight - 1); g.drawLine(x + s.fmWidth - 1, y, x + s.fmWidth - 1, y + s.fmHeight); break; } } } } if (useGui & (whichGui >= FIELD_LEFT)) { int w = 0; switch (whichGui) { case FIELD_LEFT: GUIGraphicsUtils.draw3DLeft(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_MIDDLE: GUIGraphicsUtils.draw3DMiddle(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_RIGHT: GUIGraphicsUtils.draw3DRight(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_ONE: GUIGraphicsUtils.draw3DOne(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_LEFT: case BUTTON_LEFT_UP: case BUTTON_LEFT_DN: case BUTTON_LEFT_EB: GUIGraphicsUtils.draw3DLeft(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_MIDDLE: case BUTTON_MIDDLE_UP: case BUTTON_MIDDLE_DN: case BUTTON_MIDDLE_EB: GUIGraphicsUtils.draw3DMiddle(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_RIGHT: case BUTTON_RIGHT_UP: case BUTTON_RIGHT_DN: case BUTTON_RIGHT_EB: GUIGraphicsUtils.draw3DRight(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; // scroll bar case BUTTON_SB_UP: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.RAISED, 1, x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_DN: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.RAISED, 2, x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_GUIDE: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.INSET, 0,x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_THUMB: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.INSET, 3,x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; } } }
public final void drawChar(Graphics2D g) { if (attributePlace && s.isShowHex()) { Font f = g.getFont(); Font k = f.deriveFont(f.getSize2D()/2); g.setFont(k); g.setColor(s.colorHexAttr); char[] a = Integer.toHexString(attr).toCharArray(); g.drawChars(a, 0, 1, x, y + (int)(s.fmHeight /2)); g.drawChars(a, 1, 1, x+(int)(s.fmWidth/2), (int)(y + s.fmHeight - (s.lm.getDescent() + s.lm.getLeading())-2)); g.setFont(f); } if(!nonDisplay && !attributePlace) { if (!useGui) { g.setColor(bg); g.fill(cArea); } else { if (bg == s.colorBg && whichGui >= FIELD_LEFT && whichGui <= FIELD_ONE) g.setColor(s.colorGUIField); else g.setColor(bg); g.fill(cArea); } if (useGui && (whichGui < FIELD_LEFT)) { int w = 0; g.setColor(fg); switch (whichGui) { case UPPER_LEFT: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpperLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpperLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case UPPER: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpper(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpper(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case UPPER_RIGHT: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpperRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpperRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LEFT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); g.drawLine(x + s.fmWidth / 2, y, x + s.fmWidth / 2, y + s.fmHeight); } } break; case RIGHT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LOWER_LEFT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLowerLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLowerLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case BOTTOM: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinBottom(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinBottom(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LOWER_RIGHT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLowerRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLowerRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; } } else { if (sChar[0] != 0x0) { // use this until we define colors for gui stuff if ((useGui && whichGui < BUTTON_LEFT) && (fg == s.colorGUIField)) g.setColor(Color.black); else g.setColor(fg); try { if (useGui) g.drawChars(sChar, 0, 1, x+1, cy -2); else g.drawChars(sChar, 0, 1, x, cy -2); } catch (IllegalArgumentException iae) { System.out.println(" ScreenChar iae " + iae.getMessage()); } } if(underLine ) { if (!useGui || s.guiShowUnderline) { g.setColor(fg);// g.drawLine(x, cy -2, (int)(x + s.fmWidth), cy -2); g.drawLine(x, (int)(y + (s.fmHeight - s.lm.getLeading()-5)), (int)(x + s.fmWidth), (int)(y + (s.fmHeight - s.lm.getLeading())-5)); } } if(colSep) { g.setColor(s.colorSep); switch (s.getColSepLine()) { case 1: g.drawLine(x, y + s.fmHeight - (int)s.lm.getLeading()-4, x, y + s.fmHeight); g.drawLine(x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-4, x + s.fmWidth - 1, y + s.fmHeight); break; case 2: g.drawLine(x, y + s.fmHeight - (int)s.lm.getLeading()-3, x, y + s.fmHeight - (int)s.lm.getLeading()-4); g.drawLine(x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-3, x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-4); break; default: g.setColor(fg); g.drawLine(x, y, x, y + s.fmHeight - 1); g.drawLine(x + s.fmWidth - 1, y, x + s.fmWidth - 1, y + s.fmHeight); break; } } } } if (useGui & (whichGui >= FIELD_LEFT)) { int w = 0; switch (whichGui) { case FIELD_LEFT: GUIGraphicsUtils.draw3DLeft(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_MIDDLE: GUIGraphicsUtils.draw3DMiddle(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_RIGHT: GUIGraphicsUtils.draw3DRight(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_ONE: GUIGraphicsUtils.draw3DOne(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_LEFT: case BUTTON_LEFT_UP: case BUTTON_LEFT_DN: case BUTTON_LEFT_EB: GUIGraphicsUtils.draw3DLeft(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_MIDDLE: case BUTTON_MIDDLE_UP: case BUTTON_MIDDLE_DN: case BUTTON_MIDDLE_EB: GUIGraphicsUtils.draw3DMiddle(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_RIGHT: case BUTTON_RIGHT_UP: case BUTTON_RIGHT_DN: case BUTTON_RIGHT_EB: GUIGraphicsUtils.draw3DRight(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; // scroll bar case BUTTON_SB_UP: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.RAISED, 1, x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_DN: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.RAISED, 2, x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_GUIDE: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.INSET, 0,x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_THUMB: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.INSET, 3,x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; } } }
6,139
public final void drawChar(Graphics2D g) { if (attributePlace && s.getShowHex()) { Font f = g.getFont(); Font k = f.deriveFont(f.getSize2D()/2); g.setFont(k); g.setColor(s.colorHexAttr); char[] a = Integer.toHexString(attr).toCharArray(); g.drawChars(a, 0, 1, x, y + (int)(s.fmHeight /2)); g.drawChars(a, 1, 1, x+(int)(s.fmWidth/2), (int)(y + s.fmHeight - (s.lm.getDescent() + s.lm.getLeading())-2)); g.setFont(f); } if(!nonDisplay && !attributePlace) { if (!useGui) { g.setColor(bg); g.fill(cArea); } else { if (bg == s.colorBg && whichGui >= FIELD_LEFT && whichGui <= FIELD_ONE) g.setColor(s.colorGUIField); else g.setColor(bg); g.fill(cArea); } if (useGui && (whichGui < FIELD_LEFT)) { int w = 0; g.setColor(fg); switch (whichGui) { case UPPER_LEFT: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpperLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpperLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case UPPER: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpper(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpper(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case UPPER_RIGHT: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpperRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpperRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LEFT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); g.drawLine(x + s.fmWidth / 2, y, x + s.fmWidth / 2, y + s.fmHeight); } } break; case RIGHT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LOWER_LEFT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLowerLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLowerLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case BOTTOM: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinBottom(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinBottom(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LOWER_RIGHT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLowerRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLowerRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; } } else { if (sChar[0] != 0x0) { // use this until we define colors for gui stuff if ((useGui && whichGui < BUTTON_LEFT) && (fg == s.colorGUIField)) g.setColor(Color.black); else g.setColor(fg); try { if (useGui) g.drawChars(sChar, 0, 1, x+1, cy -2); else g.drawChars(sChar, 0, 1, x, cy -2); } catch (IllegalArgumentException iae) { System.out.println(" ScreenChar iae " + iae.getMessage()); } } if(underLine ) { if (!useGui || s.guiShowUnderline) { g.setColor(fg);// g.drawLine(x, cy -2, (int)(x + s.fmWidth), cy -2); g.drawLine(x, (int)(y + (s.fmHeight - s.lm.getLeading()-5)), (int)(x + s.fmWidth), (int)(y + (s.fmHeight - s.lm.getLeading())-5)); } } if(colSep) { g.setColor(s.colorSep); switch (s.getColSepLine()) { case 1: g.drawLine(x, y + s.fmHeight - (int)s.lm.getLeading()-4, x, y + s.fmHeight); g.drawLine(x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-4, x + s.fmWidth - 1, y + s.fmHeight); break; case 2: g.drawLine(x, y + s.fmHeight - (int)s.lm.getLeading()-3, x, y + s.fmHeight - (int)s.lm.getLeading()-4); g.drawLine(x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-3, x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-4); break; default: g.setColor(fg); g.drawLine(x, y, x, y + s.fmHeight - 1); g.drawLine(x + s.fmWidth - 1, y, x + s.fmWidth - 1, y + s.fmHeight); break; } } } } if (useGui & (whichGui >= FIELD_LEFT)) { int w = 0; switch (whichGui) { case FIELD_LEFT: GUIGraphicsUtils.draw3DLeft(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_MIDDLE: GUIGraphicsUtils.draw3DMiddle(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_RIGHT: GUIGraphicsUtils.draw3DRight(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_ONE: GUIGraphicsUtils.draw3DOne(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_LEFT: case BUTTON_LEFT_UP: case BUTTON_LEFT_DN: case BUTTON_LEFT_EB: GUIGraphicsUtils.draw3DLeft(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_MIDDLE: case BUTTON_MIDDLE_UP: case BUTTON_MIDDLE_DN: case BUTTON_MIDDLE_EB: GUIGraphicsUtils.draw3DMiddle(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_RIGHT: case BUTTON_RIGHT_UP: case BUTTON_RIGHT_DN: case BUTTON_RIGHT_EB: GUIGraphicsUtils.draw3DRight(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; // scroll bar case BUTTON_SB_UP: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.RAISED, 1, x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_DN: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.RAISED, 2, x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_GUIDE: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.INSET, 0,x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_THUMB: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.INSET, 3,x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; } } }
public final void drawChar(Graphics2D g) { if (attributePlace && s.getShowHex()) { Font f = g.getFont(); Font k = f.deriveFont(f.getSize2D()/2); g.setFont(k); g.setColor(s.colorHexAttr); char[] a = Integer.toHexString(attr).toCharArray(); g.drawChars(a, 0, 1, x, y + (int)(s.fmHeight /2)); g.drawChars(a, 1, 1, x+(int)(s.fmWidth/2), (int)(y + s.fmHeight - (s.lm.getDescent() + s.lm.getLeading())-2)); g.setFont(f); } if(!nonDisplay && !attributePlace) { if (!useGui) { g.setColor(bg); g.fill(cArea); } else { if (bg == s.colorBg && whichGui >= FIELD_LEFT && whichGui <= FIELD_ONE) g.setColor(s.colorGUIField); else g.setColor(bg); g.fill(cArea); } if (useGui && (whichGui < FIELD_LEFT)) { int w = 0; g.setColor(fg); switch (whichGui) { case UPPER_LEFT: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpperLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpperLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case UPPER: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpper(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpper(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case UPPER_RIGHT: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpperRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpperRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LEFT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); g.drawLine(x + s.fmWidth / 2, y, x + s.fmWidth / 2, y + s.fmHeight); } } break; case RIGHT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LOWER_LEFT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLowerLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLowerLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case BOTTOM: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinBottom(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinBottom(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LOWER_RIGHT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLowerRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLowerRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; } } else { if (sChar[0] != 0x0) { // use this until we define colors for gui stuff if ((useGui && whichGui < BUTTON_LEFT) && (fg == s.colorGUIField)) g.setColor(Color.black); else g.setColor(fg); try { if (useGui) if (sChar[0] == 0x1C) g.drawChars(dupChar, 0, 1, x+1, cy -2); else g.drawChars(sChar, 0, 1, x+1, cy -2); else g.drawChars(sChar, 0, 1, x, cy -2); } catch (IllegalArgumentException iae) { System.out.println(" ScreenChar iae " + iae.getMessage()); } } if(underLine ) { if (!useGui || s.guiShowUnderline) { g.setColor(fg);// g.drawLine(x, cy -2, (int)(x + s.fmWidth), cy -2); g.drawLine(x, (int)(y + (s.fmHeight - s.lm.getLeading()-5)), (int)(x + s.fmWidth), (int)(y + (s.fmHeight - s.lm.getLeading())-5)); } } if(colSep) { g.setColor(s.colorSep); switch (s.getColSepLine()) { case 1: g.drawLine(x, y + s.fmHeight - (int)s.lm.getLeading()-4, x, y + s.fmHeight); g.drawLine(x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-4, x + s.fmWidth - 1, y + s.fmHeight); break; case 2: g.drawLine(x, y + s.fmHeight - (int)s.lm.getLeading()-3, x, y + s.fmHeight - (int)s.lm.getLeading()-4); g.drawLine(x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-3, x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-4); break; default: g.setColor(fg); g.drawLine(x, y, x, y + s.fmHeight - 1); g.drawLine(x + s.fmWidth - 1, y, x + s.fmWidth - 1, y + s.fmHeight); break; } } } } if (useGui & (whichGui >= FIELD_LEFT)) { int w = 0; switch (whichGui) { case FIELD_LEFT: GUIGraphicsUtils.draw3DLeft(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_MIDDLE: GUIGraphicsUtils.draw3DMiddle(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_RIGHT: GUIGraphicsUtils.draw3DRight(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_ONE: GUIGraphicsUtils.draw3DOne(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_LEFT: case BUTTON_LEFT_UP: case BUTTON_LEFT_DN: case BUTTON_LEFT_EB: GUIGraphicsUtils.draw3DLeft(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_MIDDLE: case BUTTON_MIDDLE_UP: case BUTTON_MIDDLE_DN: case BUTTON_MIDDLE_EB: GUIGraphicsUtils.draw3DMiddle(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_RIGHT: case BUTTON_RIGHT_UP: case BUTTON_RIGHT_DN: case BUTTON_RIGHT_EB: GUIGraphicsUtils.draw3DRight(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; // scroll bar case BUTTON_SB_UP: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.RAISED, 1, x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_DN: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.RAISED, 2, x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_GUIDE: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.INSET, 0,x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_THUMB: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.INSET, 3,x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; } } }
6,140
public final void drawChar(Graphics2D g) { if (attributePlace && s.getShowHex()) { Font f = g.getFont(); Font k = f.deriveFont(f.getSize2D()/2); g.setFont(k); g.setColor(s.colorHexAttr); char[] a = Integer.toHexString(attr).toCharArray(); g.drawChars(a, 0, 1, x, y + (int)(s.fmHeight /2)); g.drawChars(a, 1, 1, x+(int)(s.fmWidth/2), (int)(y + s.fmHeight - (s.lm.getDescent() + s.lm.getLeading())-2)); g.setFont(f); } if(!nonDisplay && !attributePlace) { if (!useGui) { g.setColor(bg); g.fill(cArea); } else { if (bg == s.colorBg && whichGui >= FIELD_LEFT && whichGui <= FIELD_ONE) g.setColor(s.colorGUIField); else g.setColor(bg); g.fill(cArea); } if (useGui && (whichGui < FIELD_LEFT)) { int w = 0; g.setColor(fg); switch (whichGui) { case UPPER_LEFT: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpperLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpperLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case UPPER: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpper(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpper(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case UPPER_RIGHT: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpperRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpperRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LEFT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); g.drawLine(x + s.fmWidth / 2, y, x + s.fmWidth / 2, y + s.fmHeight); } } break; case RIGHT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LOWER_LEFT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLowerLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLowerLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case BOTTOM: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinBottom(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinBottom(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LOWER_RIGHT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLowerRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLowerRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; } } else { if (sChar[0] != 0x0) { // use this until we define colors for gui stuff if ((useGui && whichGui < BUTTON_LEFT) && (fg == s.colorGUIField)) g.setColor(Color.black); else g.setColor(fg); try { if (useGui) g.drawChars(sChar, 0, 1, x+1, cy -2); else g.drawChars(sChar, 0, 1, x, cy -2); } catch (IllegalArgumentException iae) { System.out.println(" ScreenChar iae " + iae.getMessage()); } } if(underLine ) { if (!useGui || s.guiShowUnderline) { g.setColor(fg);// g.drawLine(x, cy -2, (int)(x + s.fmWidth), cy -2); g.drawLine(x, (int)(y + (s.fmHeight - s.lm.getLeading()-5)), (int)(x + s.fmWidth), (int)(y + (s.fmHeight - s.lm.getLeading())-5)); } } if(colSep) { g.setColor(s.colorSep); switch (s.getColSepLine()) { case 1: g.drawLine(x, y + s.fmHeight - (int)s.lm.getLeading()-4, x, y + s.fmHeight); g.drawLine(x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-4, x + s.fmWidth - 1, y + s.fmHeight); break; case 2: g.drawLine(x, y + s.fmHeight - (int)s.lm.getLeading()-3, x, y + s.fmHeight - (int)s.lm.getLeading()-4); g.drawLine(x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-3, x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-4); break; default: g.setColor(fg); g.drawLine(x, y, x, y + s.fmHeight - 1); g.drawLine(x + s.fmWidth - 1, y, x + s.fmWidth - 1, y + s.fmHeight); break; } } } } if (useGui & (whichGui >= FIELD_LEFT)) { int w = 0; switch (whichGui) { case FIELD_LEFT: GUIGraphicsUtils.draw3DLeft(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_MIDDLE: GUIGraphicsUtils.draw3DMiddle(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_RIGHT: GUIGraphicsUtils.draw3DRight(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_ONE: GUIGraphicsUtils.draw3DOne(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_LEFT: case BUTTON_LEFT_UP: case BUTTON_LEFT_DN: case BUTTON_LEFT_EB: GUIGraphicsUtils.draw3DLeft(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_MIDDLE: case BUTTON_MIDDLE_UP: case BUTTON_MIDDLE_DN: case BUTTON_MIDDLE_EB: GUIGraphicsUtils.draw3DMiddle(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_RIGHT: case BUTTON_RIGHT_UP: case BUTTON_RIGHT_DN: case BUTTON_RIGHT_EB: GUIGraphicsUtils.draw3DRight(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; // scroll bar case BUTTON_SB_UP: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.RAISED, 1, x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_DN: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.RAISED, 2, x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_GUIDE: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.INSET, 0,x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_THUMB: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.INSET, 3,x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; } } }
public final void drawChar(Graphics2D g) { if (attributePlace && s.getShowHex()) { Font f = g.getFont(); Font k = f.deriveFont(f.getSize2D()/2); g.setFont(k); g.setColor(s.colorHexAttr); char[] a = Integer.toHexString(attr).toCharArray(); g.drawChars(a, 0, 1, x, y + (int)(s.fmHeight /2)); g.drawChars(a, 1, 1, x+(int)(s.fmWidth/2), (int)(y + s.fmHeight - (s.lm.getDescent() + s.lm.getLeading())-2)); g.setFont(f); } if(!nonDisplay && !attributePlace) { if (!useGui) { g.setColor(bg); g.fill(cArea); } else { if (bg == s.colorBg && whichGui >= FIELD_LEFT && whichGui <= FIELD_ONE) g.setColor(s.colorGUIField); else g.setColor(bg); g.fill(cArea); } if (useGui && (whichGui < FIELD_LEFT)) { int w = 0; g.setColor(fg); switch (whichGui) { case UPPER_LEFT: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpperLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpperLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case UPPER: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpper(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpper(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case UPPER_RIGHT: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinUpperRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, s.colorBlue, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinUpperRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LEFT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); g.drawLine(x + s.fmWidth / 2, y, x + s.fmWidth / 2, y + s.fmHeight); } } break; case RIGHT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LOWER_LEFT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLowerLeft(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLowerLeft(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case BOTTOM: if (sChar[0] == '.') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinBottom(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinBottom(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; case LOWER_RIGHT: if (sChar[0] == ':') { if (s.isUsingGuiInterface()) { GUIGraphicsUtils.drawWinLowerRight(g, GUIGraphicsUtils.WINDOW_GRAPHIC, bg, x,y,s.fmWidth,s.fmHeight); } else { GUIGraphicsUtils.drawWinLowerRight(g, GUIGraphicsUtils.WINDOW_NORMAL, fg, x,y,s.fmWidth,s.fmHeight); } } break; } } else { if (sChar[0] != 0x0) { // use this until we define colors for gui stuff if ((useGui && whichGui < BUTTON_LEFT) && (fg == s.colorGUIField)) g.setColor(Color.black); else g.setColor(fg); try { if (useGui) g.drawChars(sChar, 0, 1, x+1, cy -2); else if (sChar[0] == 0x1C) g.drawChars(dupChar, 0, 1, x, cy -2); else g.drawChars(sChar, 0, 1, x, cy -2); } catch (IllegalArgumentException iae) { System.out.println(" ScreenChar iae " + iae.getMessage()); } } if(underLine ) { if (!useGui || s.guiShowUnderline) { g.setColor(fg);// g.drawLine(x, cy -2, (int)(x + s.fmWidth), cy -2); g.drawLine(x, (int)(y + (s.fmHeight - s.lm.getLeading()-5)), (int)(x + s.fmWidth), (int)(y + (s.fmHeight - s.lm.getLeading())-5)); } } if(colSep) { g.setColor(s.colorSep); switch (s.getColSepLine()) { case 1: g.drawLine(x, y + s.fmHeight - (int)s.lm.getLeading()-4, x, y + s.fmHeight); g.drawLine(x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-4, x + s.fmWidth - 1, y + s.fmHeight); break; case 2: g.drawLine(x, y + s.fmHeight - (int)s.lm.getLeading()-3, x, y + s.fmHeight - (int)s.lm.getLeading()-4); g.drawLine(x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-3, x + s.fmWidth - 1, y + s.fmHeight - (int)s.lm.getLeading()-4); break; default: g.setColor(fg); g.drawLine(x, y, x, y + s.fmHeight - 1); g.drawLine(x + s.fmWidth - 1, y, x + s.fmWidth - 1, y + s.fmHeight); break; } } } } if (useGui & (whichGui >= FIELD_LEFT)) { int w = 0; switch (whichGui) { case FIELD_LEFT: GUIGraphicsUtils.draw3DLeft(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_MIDDLE: GUIGraphicsUtils.draw3DMiddle(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_RIGHT: GUIGraphicsUtils.draw3DRight(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case FIELD_ONE: GUIGraphicsUtils.draw3DOne(g, GUIGraphicsUtils.INSET, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_LEFT: case BUTTON_LEFT_UP: case BUTTON_LEFT_DN: case BUTTON_LEFT_EB: GUIGraphicsUtils.draw3DLeft(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_MIDDLE: case BUTTON_MIDDLE_UP: case BUTTON_MIDDLE_DN: case BUTTON_MIDDLE_EB: GUIGraphicsUtils.draw3DMiddle(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; case BUTTON_RIGHT: case BUTTON_RIGHT_UP: case BUTTON_RIGHT_DN: case BUTTON_RIGHT_EB: GUIGraphicsUtils.draw3DRight(g, GUIGraphicsUtils.RAISED, x,y, s.fmWidth,s.fmHeight); break; // scroll bar case BUTTON_SB_UP: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.RAISED, 1, x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_DN: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.RAISED, 2, x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_GUIDE: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.INSET, 0,x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; // scroll bar case BUTTON_SB_THUMB: GUIGraphicsUtils.drawScrollBar(g, GUIGraphicsUtils.INSET, 3,x,y, s.fmWidth,s.fmHeight, s.colorWhite,s.colorBg); break; } } }
6,141
protected void setPrehelpState(boolean setErrorCode) { statusErrorCode = setErrorCode; setKeyboardLocked(setErrorCode); bufferedKeys = null; keysBuffered = false; setKBIndicatorOff(); }
protected void setPrehelpState(boolean setErrorCode, boolean lockKeyboard, boolean unlockIfLocked) { statusErrorCode = setErrorCode; setKeyboardLocked(setErrorCode); bufferedKeys = null; keysBuffered = false; setKBIndicatorOff(); }
6,142
protected void setPrehelpState(boolean setErrorCode) { statusErrorCode = setErrorCode; setKeyboardLocked(setErrorCode); bufferedKeys = null; keysBuffered = false; setKBIndicatorOff(); }
protected void setPrehelpState(boolean setErrorCode) { statusErrorCode = setErrorCode; if (isKeyboardLocked() && unlockIfLocked) setKeyboardLocked(false); else setKeyboardLocked(lockKeyboard); bufferedKeys = null; keysBuffered = false; setKBIndicatorOff(); }
6,143
public void setStatus(byte attr,byte value,String s) { statusString = s; // draw the status information bi.setStatus(attr,value,s, fmWidth, fmHeight, lm, font, colorBg, colorRed, colorWhite); // set environment variables switch (attr) { case STATUS_SYSTEM: if (value == STATUS_VALUE_ON) { statusXSystem =true; } else statusXSystem = false; break; case STATUS_ERROR_CODE: if (value == STATUS_VALUE_ON) { setPrehelpState(true); Toolkit.getDefaultToolkit().beep(); } else { setPrehelpState(false); homePos = saveHomePos; saveHomePos = 0; pendingInsert = false; } break; } updateImage(sArea.getBounds()); }
public void setStatus(byte attr,byte value,String s) { statusString = s; // draw the status information bi.setStatus(attr,value,s, fmWidth, fmHeight, lm, font, colorBg, colorRed, colorWhite); // set environment variables switch (attr) { case STATUS_SYSTEM: if (value == STATUS_VALUE_ON) { statusXSystem =true; } else statusXSystem = false; break; case STATUS_ERROR_CODE: if (value == STATUS_VALUE_ON) { setPrehelpState(true,true,false); Toolkit.getDefaultToolkit().beep(); } else { setPrehelpState(false); homePos = saveHomePos; saveHomePos = 0; pendingInsert = false; } break; } updateImage(sArea.getBounds()); }
6,144
public void setStatus(byte attr,byte value,String s) { statusString = s; // draw the status information bi.setStatus(attr,value,s, fmWidth, fmHeight, lm, font, colorBg, colorRed, colorWhite); // set environment variables switch (attr) { case STATUS_SYSTEM: if (value == STATUS_VALUE_ON) { statusXSystem =true; } else statusXSystem = false; break; case STATUS_ERROR_CODE: if (value == STATUS_VALUE_ON) { setPrehelpState(true); Toolkit.getDefaultToolkit().beep(); } else { setPrehelpState(false); homePos = saveHomePos; saveHomePos = 0; pendingInsert = false; } break; } updateImage(sArea.getBounds()); }
public void setStatus(byte attr,byte value,String s) { statusString = s; // draw the status information bi.setStatus(attr,value,s, fmWidth, fmHeight, lm, font, colorBg, colorRed, colorWhite); // set environment variables switch (attr) { case STATUS_SYSTEM: if (value == STATUS_VALUE_ON) { statusXSystem =true; } else statusXSystem = false; break; case STATUS_ERROR_CODE: if (value == STATUS_VALUE_ON) { setPrehelpState(true); Toolkit.getDefaultToolkit().beep(); } else { setPrehelpState(false,true,true); homePos = saveHomePos; saveHomePos = 0; pendingInsert = false; } break; } updateImage(sArea.getBounds()); }
6,145
protected boolean simulateMnemonic(int mnem){ boolean simulated = false; switch (mnem) { case AID_CLEAR : case AID_ENTER : case AID_PF1 : case AID_PF2 : case AID_PF3 : case AID_PF4 : case AID_PF5 : case AID_PF6 : case AID_PF7 : case AID_PF8 : case AID_PF9 : case AID_PF10 : case AID_PF11 : case AID_PF12 : case AID_PF13 : case AID_PF14 : case AID_PF15 : case AID_PF16 : case AID_PF17 : case AID_PF18 : case AID_PF19 : case AID_PF20 : case AID_PF21 : case AID_PF22 : case AID_PF23 : case AID_PF24 : case AID_ROLL_DOWN : case AID_ROLL_UP : case AID_ROLL_LEFT : case AID_ROLL_RIGHT : sendAid(mnem); simulated = true; break; case AID_HELP : sessionVT.sendHelpRequest(); simulated = true; break; case AID_PRINT : sessionVT.hostPrint(1); simulated = true; break; case BACK_SPACE : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.getCurrentField().startPos() == lastPos) displayError(ERR_CURSOR_PROTECTED); else { setCursorOff(); screenFields.getCurrentField().getKeyPos(lastPos); screenFields.getCurrentField().changePos(-1); resetDirty(screenFields.getCurrentField().getCurrentPos()); shiftLeft(screenFields.getCurrentField().getCurrentPos()); updateDirty(); setCursorOn(); screenFields.setCurrentFieldMDT(); simulated = true; } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BACK_TAB : if (screenFields.getCurrentField() != null && screenFields.isCurrentFieldHighlightedEntry()) { resetDirty(screenFields.getCurrentField().startPos); gotoFieldPrev(); updateDirty(); } else gotoFieldPrev(); if (screenFields.isCurrentFieldContinued()) { do { gotoFieldPrev(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } isInField(lastPos); simulated = true; break; case UP : case MARK_UP : process_XY(lastPos - numCols); simulated = true; break; case DOWN : case MARK_DOWN : process_XY(lastPos + numCols); simulated = true; break; case LEFT : case MARK_LEFT : process_XY(lastPos - 1); simulated = true; break; case RIGHT : case MARK_RIGHT : process_XY(lastPos + 1); simulated = true; break; case NEXTWORD : gotoNextWord(); simulated = true; break; case PREVWORD : gotoPrevWord(); simulated = true; break; case DELETE : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); screenFields.getCurrentField().getKeyPos(lastPos); shiftLeft(screenFields.getCurrentFieldPos()); screenFields.setCurrentFieldMDT(); updateDirty(); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case TAB : if (screenFields.getCurrentField() != null && !screenFields.isCurrentFieldContinued()) { if (screenFields.isCurrentFieldHighlightedEntry()) { resetDirty(screenFields.getCurrentField().startPos); gotoFieldNext(); updateDirty(); } else gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.getCurrentField() != null && (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast())); } isInField(lastPos); simulated = true; break; case EOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = endOfField(screenFields.getCurrentField().startPos(),true); if (where > 0) { goto_XY((where / numCols) + 1,(where % numCols) + 1); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case ERASE_EOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); int where = lastPos; resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); goto_XY(where); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case ERASE_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); int where = lastPos; lastPos = screenFields.getCurrentField().startPos(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); goto_XY(where); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case INSERT : setCursorOff(); // we toggle it insertMode = insertMode ? false : true; setCursorOn(); break; case HOME : // position to the home position set if (lastPos + numCols + 1 != homePos) { goto_XY(homePos - numCols - 1); // now check if we are in a field isInField(lastPos); } else gotoField(1); break; case KEYPAD_0 : simulated = simulateKeyStroke('0'); break; case KEYPAD_1 : simulated = simulateKeyStroke('1'); break; case KEYPAD_2 : simulated = simulateKeyStroke('2'); break; case KEYPAD_3 : simulated = simulateKeyStroke('3'); break; case KEYPAD_4 : simulated = simulateKeyStroke('4'); break; case KEYPAD_5 : simulated = simulateKeyStroke('5'); break; case KEYPAD_6 : simulated = simulateKeyStroke('6'); break; case KEYPAD_7 : simulated = simulateKeyStroke('7'); break; case KEYPAD_8 : simulated = simulateKeyStroke('8'); break; case KEYPAD_9 : simulated = simulateKeyStroke('9'); break; case KEYPAD_PERIOD : simulated = simulateKeyStroke('.'); break; case KEYPAD_COMMA : simulated = simulateKeyStroke(','); break; case KEYPAD_MINUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int s = screenFields.getCurrentField().getFieldShift(); if (s == 3 || s == 5 || s == 7) { screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } simulated = true; updateDirty(); if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_EXIT : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_PLUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_MINUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int s = screenFields.getCurrentField().getFieldShift(); if (s == 3 || s == 5 || s == 7) { setCursorOff(); screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = screenFields.getCurrentField().startPos(); if (where > 0) { goto_XY(where); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case SYSREQ : sessionVT.systemRequest(); simulated = true; break; case RESET : if (isStatusErrorCode()) { restoreErrorLine(); setStatus(STATUS_ERROR_CODE,STATUS_VALUE_OFF,""); isInField(lastPos); updateDirty(); } setKBIndicatorOff(); simulated = true; break; case COPY : copyMe(); break; case PASTE : pasteMe(false); break; case ATTN : sessionVT.sendAttentionKey(); simulated = true; break; case DUP_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.isCurrentFieldDupEnabled()) { setCursorOff(); resetDirty(lastPos); screenFields.getCurrentField().setFieldChar(lastPos,(char)0x1C); screenFields.setCurrentFieldMDT(); gotoFieldNext(); updateDirty(); setCursorOn(); simulated = true; } else { displayError(ERR_DUP_KEY_NOT_ALLOWED); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case NEW_LINE : if (screenFields.getSize() > 0) { int startRow = getRow(lastPos) + 1; int startPos = lastPos; boolean isthere = false; setCursorOff(); if (startRow == getRows()) startRow = 0; goto_XY(++startRow,1); if (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { while (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { // lets keep going advancePos(); // Have we looped the screen? if (lastPos == startPos) { // if so then go back to starting point goto_XY(startPos); break; } } } setCursorOn(); } simulated = true; break; case JUMP_NEXT_SESS : gui.nextSession(); simulated = true; break; case JUMP_PREV_SESS : gui.prevSession(); simulated = true; break; default : System.out.println(" Mnemonic not supported " + mnem); break; } return simulated; }
protected boolean simulateMnemonic(int mnem){ boolean simulated = false; switch (mnem) { case AID_CLEAR : case AID_ENTER : case AID_PF1 : case AID_PF2 : case AID_PF3 : case AID_PF4 : case AID_PF5 : case AID_PF6 : case AID_PF7 : case AID_PF8 : case AID_PF9 : case AID_PF10 : case AID_PF11 : case AID_PF12 : case AID_PF13 : case AID_PF14 : case AID_PF15 : case AID_PF16 : case AID_PF17 : case AID_PF18 : case AID_PF19 : case AID_PF20 : case AID_PF21 : case AID_PF22 : case AID_PF23 : case AID_PF24 : case AID_ROLL_DOWN : case AID_ROLL_UP : case AID_ROLL_LEFT : case AID_ROLL_RIGHT : sendAid(mnem); simulated = true; break; case AID_HELP : sessionVT.sendHelpRequest(); simulated = true; break; case AID_PRINT : sessionVT.hostPrint(1); simulated = true; break; case BACK_SPACE : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.getCurrentField().startPos() == lastPos) displayError(ERR_CURSOR_PROTECTED); else { setCursorOff(); screenFields.getCurrentField().getKeyPos(lastPos); screenFields.getCurrentField().changePos(-1); resetDirty(screenFields.getCurrentField().getCurrentPos()); shiftLeft(screenFields.getCurrentField().getCurrentPos()); updateDirty(); setCursorOn(); screenFields.setCurrentFieldMDT(); simulated = true; } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BACK_TAB : if (screenFields.getCurrentField() != null && screenFields.isCurrentFieldHighlightedEntry()) { resetDirty(screenFields.getCurrentField().startPos); gotoFieldPrev(); updateDirty(); } else gotoFieldPrev(); if (screenFields.isCurrentFieldContinued()) { do { gotoFieldPrev(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } isInField(lastPos); simulated = true; break; case UP : case MARK_UP : process_XY(lastPos - numCols); simulated = true; break; case DOWN : case MARK_DOWN : process_XY(lastPos + numCols); simulated = true; break; case LEFT : case MARK_LEFT : process_XY(lastPos - 1); simulated = true; break; case RIGHT : case MARK_RIGHT : process_XY(lastPos + 1); simulated = true; break; case NEXTWORD : gotoNextWord(); simulated = true; break; case PREVWORD : gotoPrevWord(); simulated = true; break; case DELETE : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); screenFields.getCurrentField().getKeyPos(lastPos); shiftLeft(screenFields.getCurrentFieldPos()); screenFields.setCurrentFieldMDT(); updateDirty(); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case TAB : if (screenFields.getCurrentField() != null && !screenFields.isCurrentFieldContinued()) { if (screenFields.isCurrentFieldHighlightedEntry()) { resetDirty(screenFields.getCurrentField().startPos); gotoFieldNext(); updateDirty(); } else gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.getCurrentField() != null && (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast())); } isInField(lastPos); simulated = true; break; case EOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = endOfField(screenFields.getCurrentField().startPos(),true); if (where > 0) { goto_XY((where / numCols) + 1,(where % numCols) + 1); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case ERASE_EOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); int where = lastPos; resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); goto_XY(where); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case ERASE_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); int where = lastPos; lastPos = screenFields.getCurrentField().startPos(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); goto_XY(where); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case INSERT : setCursorOff(); // we toggle it insertMode = insertMode ? false : true; setCursorOn(); break; case HOME : // position to the home position set if (lastPos + numCols + 1 != homePos) { goto_XY(homePos - numCols - 1); // now check if we are in a field isInField(lastPos); } else gotoField(1); break; case KEYPAD_0 : simulated = simulateKeyStroke('0'); break; case KEYPAD_1 : simulated = simulateKeyStroke('1'); break; case KEYPAD_2 : simulated = simulateKeyStroke('2'); break; case KEYPAD_3 : simulated = simulateKeyStroke('3'); break; case KEYPAD_4 : simulated = simulateKeyStroke('4'); break; case KEYPAD_5 : simulated = simulateKeyStroke('5'); break; case KEYPAD_6 : simulated = simulateKeyStroke('6'); break; case KEYPAD_7 : simulated = simulateKeyStroke('7'); break; case KEYPAD_8 : simulated = simulateKeyStroke('8'); break; case KEYPAD_9 : simulated = simulateKeyStroke('9'); break; case KEYPAD_PERIOD : simulated = simulateKeyStroke('.'); break; case KEYPAD_COMMA : simulated = simulateKeyStroke(','); break; case KEYPAD_MINUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int s = screenFields.getCurrentField().getFieldShift(); if (s == 3 || s == 5 || s == 7) { screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } simulated = true; updateDirty(); if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_EXIT : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_PLUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_MINUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int s = screenFields.getCurrentField().getFieldShift(); if (s == 3 || s == 5 || s == 7) { setCursorOff(); screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = screenFields.getCurrentField().startPos(); if (where > 0) { goto_XY(where); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case SYSREQ : sessionVT.systemRequest(); simulated = true; break; case RESET : if (isStatusErrorCode()) { restoreErrorLine(); setStatus(STATUS_ERROR_CODE,STATUS_VALUE_OFF,""); isInField(lastPos); updateDirty(); } setKBIndicatorOff(); simulated = true; break; case COPY : copyMe(); break; case PASTE : pasteMe(false); break; case ATTN : sessionVT.sendAttentionKey(); simulated = true; break; case DUP_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.isCurrentFieldDupEnabled()) { setCursorOff(); resetDirty(lastPos); screenFields.getCurrentField().setFieldChar(lastPos,(char)0x1C); screenFields.setCurrentFieldMDT(); gotoFieldNext(); updateDirty(); setCursorOn(); simulated = true; } else { displayError(ERR_DUP_KEY_NOT_ALLOWED); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case NEW_LINE : if (screenFields.getSize() > 0) { int startRow = getRow(lastPos) + 1; int startPos = lastPos; boolean isthere = false; setCursorOff(); if (startRow == getRows()) startRow = 0; goto_XY(++startRow,1); if (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { while (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { // lets keep going advancePos(); // Have we looped the screen? if (lastPos == startPos) { // if so then go back to starting point goto_XY(startPos); break; } } } setCursorOn(); } simulated = true; break; case JUMP_NEXT_SESS : gui.nextSession(); simulated = true; break; case JUMP_PREV_SESS : gui.prevSession(); simulated = true; break; default : System.out.println(" Mnemonic not supported " + mnem); break; } return simulated; }
6,146
protected void addImpl(Component comp, Object constraints, int index) { // If we're adding in the initialization stage use super.add. // Otherwise pass the add onto the content pane. if (!initStageDone) super.addImpl(comp, constraints, index); else { if (isRootPaneCheckingEnabled()) throw new Error("rootPaneChecking is enabled - adding components " + "disallowed."); getContentPane().add(comp,constraints,index); } }
protected void addImpl(Component comp, Object constraints, int index) { // If we're adding in the initialization stage use super.add. // Otherwise pass the add onto the content pane. if (!initStageDone) super.addImpl(comp, constraints, index); else { if (isRootPaneCheckingEnabled()) throw new Error("rootPaneChecking is enabled - adding components " + "disallowed."); getContentPane().add(comp,constraints,index); } }
6,149
protected void addImpl(Component comp, Object constraints, int index) { // If we're adding in the initialization stage use super.add. // Otherwise pass the add onto the content pane. if (!initStageDone) super.addImpl(comp, constraints, index); else { if (isRootPaneCheckingEnabled()) throw new Error("rootPaneChecking is enabled - adding components " + "disallowed."); getContentPane().add(comp,constraints,index); } }
protected void addImpl(Component comp, Object constraints, int index) { // If we're adding in the initialization stage use super.add. // Otherwise pass the add onto the content pane. if (!initStageDone) super.addImpl(comp, constraints, index); else { if (isRootPaneCheckingEnabled()) throw new Error("rootPaneChecking is enabled - adding components " + "disallowed."); getContentPane().add(comp,constraints,index); } }
6,150
protected void frameInit() { super.setLayout(new BorderLayout(1, 1)); enableEvents(AWTEvent.WINDOW_EVENT_MASK); getRootPane(); // will do set/create // We're now done the init stage. initStageDone = true; }
protected void frameInit() { super.setLayout(new BorderLayout(1, 1)); enableEvents(AWTEvent.WINDOW_EVENT_MASK); getRootPane(); // will do set/create // We're now done the init stage. setRootPaneCheckingEnabled(true); }
6,151
public void setLayout(LayoutManager manager) { // Check if we're in initialization stage. If so, call super.setLayout // otherwise, valid calls go to the content pane. if (initStageDone) { if (isRootPaneCheckingEnabled()) throw new Error("Cannot set layout. Use getContentPane().setLayout()" + " instead."); getContentPane().setLayout(manager); } else super.setLayout(manager); }
public void setLayout(LayoutManager manager) { // Check if we're in initialization stage. If so, call super.setLayout // otherwise, valid calls go to the content pane. if (initStageDone) { if (isRootPaneCheckingEnabled()) throw new Error("Cannot set layout. Use getContentPane().setLayout()" + " instead."); getContentPane().setLayout(manager); } else super.setLayout(manager); }
6,152
public void setLayout(LayoutManager manager) { // Check if we're in initialization stage. If so, call super.setLayout // otherwise, valid calls go to the content pane. if (initStageDone) { if (isRootPaneCheckingEnabled()) throw new Error("Cannot set layout. Use getContentPane().setLayout()" + " instead."); getContentPane().setLayout(manager); } else super.setLayout(manager); }
public void setLayout(LayoutManager manager) { // Check if we're in initialization stage. If so, call super.setLayout // otherwise, valid calls go to the content pane. if (initStageDone) { if (isRootPaneCheckingEnabled()) throw new Error("Cannot set layout. Use getContentPane().setLayout()" + " instead."); getContentPane().setLayout(manager); } else super.setLayout(manager); }
6,153
public void setLayout(LayoutManager manager) { // Check if we're in initialization stage. If so, call super.setLayout // otherwise, valid calls go to the content pane. if (initStageDone) { if (isRootPaneCheckingEnabled()) throw new Error("Cannot set layout. Use getContentPane().setLayout()" + " instead."); getContentPane().setLayout(manager); } else super.setLayout(manager); }
public void setLayout(LayoutManager manager) { // Check if we're in initialization stage. If so, call super.setLayout // otherwise, valid calls go to the content pane. if (initStageDone) { if (isRootPaneCheckingEnabled()) throw new Error("Cannot set layout. Use getContentPane().setLayout()" + " instead."); getContentPane().setLayout(manager); else super.setLayout(manager); }
6,154
BasicHorizontalLayoutManager() { // Nothing to do here. }
this(SwingConstants.HORIZONTAL); this(SwingConstants.HORIZONTAL); this(SwingConstants.HORIZONTAL); this(SwingConstants.HORIZONTAL); BasicHorizontalLayoutManager()this(SwingConstants.HORIZONTAL); this(SwingConstants.HORIZONTAL); this(SwingConstants.HORIZONTAL); this(SwingConstants.HORIZONTAL); {this(SwingConstants.HORIZONTAL); this(SwingConstants.HORIZONTAL); this(SwingConstants.HORIZONTAL); this(SwingConstants.HORIZONTAL); this(SwingConstants.HORIZONTAL); this(SwingConstants.HORIZONTAL); //this(SwingConstants.HORIZONTAL); Nothingthis(SwingConstants.HORIZONTAL); tothis(SwingConstants.HORIZONTAL); dothis(SwingConstants.HORIZONTAL); here.this(SwingConstants.HORIZONTAL); this(SwingConstants.HORIZONTAL); this(SwingConstants.HORIZONTAL); this(SwingConstants.HORIZONTAL); }
6,156
protected int getAvailableSize(Dimension containerSize, Insets insets) { return containerSize.width - insets.left - insets.right; }
protected int getAvailableSize(Dimension containerSize, Insets insets) { int size; if (axis == SwingConstants.HORIZONTAL) size = containerSize.width - insets.left - insets.right; else size = containerSize.height - insets.top - insets.bottom; return size; }
6,157
protected int getInitialLocation(Insets insets) { if (insets != null) return insets.left; return 0; }
protected int getInitialLocation(Insets insets) { if (insets != null) return insets.left; return 0; }
6,158
protected int getPreferredSizeOfComponent(Component c) { Dimension dims = c.getPreferredSize(); if (dims != null) return dims.width; return 0; }
protected int getPreferredSizeOfComponent(Component c) { Dimension dims = c.getPreferredSize(); if (dims != null) return dims.width; return 0; }
6,159
protected int getSizeOfComponent(Component c) { return c.getWidth(); }
protected int getSizeOfComponent(Component c) { int size; if (axis == SwingConstants.HORIZONTAL) size = c.getHeight(); else size = c.getWidth(); return size; }
6,160
public Dimension minimumLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getMinimumSize(); if (dims != null) { width += dims.width; height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
public Dimension minimumLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getMinimumSize(); if (dims != null) { width += dims.width; height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
6,161
public Dimension minimumLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getMinimumSize(); if (dims != null) { width += dims.width; height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
public Dimension minimumLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getMinimumSize(); if (dims != null) { width += dims.width; height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
6,162
public Dimension minimumLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getMinimumSize(); if (dims != null) { width += dims.width; height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
public Dimension minimumLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getMinimumSize(); if (dims != null) { width += dims.width; height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
6,163
public Dimension minimumLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getMinimumSize(); if (dims != null) { width += dims.width; height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
public Dimension minimumLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getMinimumSize(); if (dims != null) { width += dims.width; height = Math.max(height, dims.height); } } int width = axis == SwingConstants.HORIZONTAL ? primary : secondary; int height = axis == SwingConstants.VERTICAL ? secondary : primary; Insets i = splitPane.getInsets(); dim.setSize(width + i.left + i.right, height + i.top + i.bottom); } return null; }
6,164
public Dimension minimumLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getMinimumSize(); if (dims != null) { width += dims.width; height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
public Dimension minimumLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getMinimumSize(); if (dims != null) { width += dims.width; height = Math.max(height, dims.height); } } return new Dimension(width, height); } return dim; }
6,165
int minimumSizeOfComponent(int index) { Dimension dims = components[index].getMinimumSize(); if (dims != null) return dims.width; else return 0; }
int minimumSizeOfComponent(int index) { Dimension dims = components[index].getMinimumSize(); if (dims != null) if (axis == SwingConstants.HORIZONTAL) size = dims.width; else return 0; }
6,166
int minimumSizeOfComponent(int index) { Dimension dims = components[index].getMinimumSize(); if (dims != null) return dims.width; else return 0; }
int minimumSizeOfComponent(int index) { Dimension dims = components[index].getMinimumSize(); if (dims != null) return dims.width; else size = dims.height; return size; }
6,167
public Dimension preferredLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getPreferredSize(); if (dims != null) { width += dims.width; if (!(components[i] instanceof BasicSplitPaneDivider)) height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
public Dimension preferredLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getPreferredSize(); if (dims != null) { width += dims.width; if (!(components[i] instanceof BasicSplitPaneDivider)) height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
6,168
public Dimension preferredLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getPreferredSize(); if (dims != null) { width += dims.width; if (!(components[i] instanceof BasicSplitPaneDivider)) height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
public Dimension preferredLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getPreferredSize(); if (dims != null) { width += dims.width; if (!(components[i] instanceof BasicSplitPaneDivider)) height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
6,169
public Dimension preferredLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getPreferredSize(); if (dims != null) { width += dims.width; if (!(components[i] instanceof BasicSplitPaneDivider)) height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
public Dimension preferredLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getPreferredSize(); if (dims != null) { width += dims.width; if (!(components[i] instanceof BasicSplitPaneDivider)) height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
6,170
public Dimension preferredLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getPreferredSize(); if (dims != null) { width += dims.width; if (!(components[i] instanceof BasicSplitPaneDivider)) height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
public Dimension preferredLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getPreferredSize(); if (dims != null) { width += dims.width; if (!(components[i] instanceof BasicSplitPaneDivider)) height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
6,171
public Dimension preferredLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getPreferredSize(); if (dims != null) { width += dims.width; if (!(components[i] instanceof BasicSplitPaneDivider)) height = Math.max(height, dims.height); } } return new Dimension(width, height); } return null; }
public Dimension preferredLayoutSize(Container target) { if (target instanceof JSplitPane) { JSplitPane split = (JSplitPane) target; Insets insets = target.getInsets(); int height = 0; int width = 0; for (int i = 0; i < components.length; i++) { if (components[i] == null) continue; Dimension dims = components[i].getPreferredSize(); if (dims != null) { width += dims.width; if (!(components[i] instanceof BasicSplitPaneDivider)) height = Math.max(height, dims.height); } } return new Dimension(width, height); } return dim; }
6,172
protected void setComponentToSize(Component c, int size, int location, Insets insets, Dimension containerSize) { int w = size; int h = containerSize.height - insets.top - insets.bottom; int x = location; int y = insets.top; c.setBounds(x, y, w, h); }
protected void setComponentToSize(Component c, int size, int location, Insets insets, Dimension containerSize) { int w = size; int h = containerSize.height - insets.top - insets.bottom; int x = location; int y = insets.top; c.setBounds(x, y, w, h); }
6,173
protected void updateComponents() { Component left = splitPane.getLeftComponent(); Component right = splitPane.getRightComponent(); if (left != null) { components[0] = left; resetSizeAt(0); } if (right != null) { components[1] = right; resetSizeAt(1); } components[2] = divider; resetSizeAt(2); }
protected void updateComponents() { Component left = splitPane.getLeftComponent(); Component right = splitPane.getRightComponent(); if (left != null) { components[0] = left; resetSizeAt(0); } if (right != null) { components[1] = right; resetSizeAt(1); } components[2] = divider; }
6,174
protected void installDefaults() { LookAndFeel.installColors(splitPane, "SplitPane.background", "SplitPane.foreground"); LookAndFeel.installBorder(splitPane, "SplitPane.border"); divider = createDefaultDivider(); divider.setBorder(UIManager.getBorder("SplitPaneDivider.border")); resetLayoutManager(); nonContinuousLayoutDivider = createDefaultNonContinuousLayoutDivider(); splitPane.add(divider, JSplitPane.DIVIDER); // There is no need to add the nonContinuousLayoutDivider splitPane.setDividerSize(UIManager.getInt("SplitPane.dividerSize")); splitPane.setOpaque(true); }
protected void installDefaults() { LookAndFeel.installColors(splitPane, "SplitPane.background", "SplitPane.foreground"); LookAndFeel.installBorder(splitPane, "SplitPane.border"); divider = createDefaultDivider(); divider.setBorder(UIManager.getBorder("SplitPaneDivider.border")); resetLayoutManager(); nonContinuousLayoutDivider = createDefaultNonContinuousLayoutDivider(); splitPane.add(divider, JSplitPane.DIVIDER); // There is no need to add the nonContinuousLayoutDivider dividerSize = UIManager.getInt("SplitPane.dividerSize"); splitPane.setDividerSize(dividerSize); divider.setDividerSize(dividerSize); splitPane.setOpaque(true); }
6,175
private void setTitle() { if (sequence - 1 > 0) setTitle("tn5250j <" + sequence + "> - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer); else setTitle("tn5250j - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer); if (getSessionAt(selectedIndex) != null && getSessionAt(selectedIndex).getAllocDeviceName() != null) setTitle(getTitle() + " - " + getSessionAt(selectedIndex).getAllocDeviceName()); }
private void setTitle() { if (sequence - 1 > 0) setTitle("tn5250j <" + sequence + "> - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer); else setTitle("tn5250j - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer); if (getSessionAt(selectedIndex) != null && getSessionAt(selectedIndex).getAllocDeviceName() != null) setTitle(getTitle() + " - " + getSessionAt(selectedIndex).getAllocDeviceName()); }
6,176
private void setTitle() { if (sequence - 1 > 0) setTitle("tn5250j <" + sequence + "> - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer); else setTitle("tn5250j - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer); if (getSessionAt(selectedIndex) != null && getSessionAt(selectedIndex).getAllocDeviceName() != null) setTitle(getTitle() + " - " + getSessionAt(selectedIndex).getAllocDeviceName()); }
private void setTitle() { if (sequence - 1 > 0) setTitle("tn5250j <" + sequence + "> - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer); else setTitle("tn5250j - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer); if (getSessionAt(selectedIndex) != null && getSessionAt(selectedIndex).getAllocDeviceName() != null) setTitle(getSessionAt(selectedIndex).getAllocDeviceName()); if (sequence - 1 > 0) setTitle(getTitle() + " - tn5250j <" + sequence + "> - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer); else setTitle(getTitle() + " - tn5250j - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer); }
6,177
public void connect(Stub self, javax.rmi.ORB orb) throws RemoteException { throw new Error("Not implemented for StubDelegate"); }
public void connect(Stub self, ORB orb) throws RemoteException { throw new Error("Not implemented for StubDelegate"); }
6,179
public void connect(Stub self, javax.rmi.ORB orb) throws RemoteException { throw new Error("Not implemented for StubDelegate"); }
public void connect(Stub self, javax.rmi.ORB orb) throws RemoteException { connect(self, orb, null); }
6,180
public boolean equals(Stub self, Object obj) { if(self == null || obj == null) return self == obj; if(!(obj instanceof Stub)) return false; return self.hashCode() == ((Stub)obj).hashCode(); }
public boolean equals(Stub self, java.lang.Object obj) { if(self == null || obj == null) return self == obj; if(!(obj instanceof Stub)) return false; return self.hashCode() == ((Stub)obj).hashCode(); }
6,181
public boolean equals(Stub self, Object obj) { if(self == null || obj == null) return self == obj; if(!(obj instanceof Stub)) return false; return self.hashCode() == ((Stub)obj).hashCode(); }
public boolean equals(Stub self, Object obj) { if(self == null || obj == null) return self == obj; if(!(obj instanceof Stub)) return false; return self.hashCode() == ((Stub)obj).hashCode(); }
6,182
public int hashCode(Stub self) { //FIX ME return hashCode; }
public int hashCode(Stub self) { //FIX ME Delegate d = self._get_delegate(); return d==null?0:d.hashCode(); }
6,183
public void readObject(Stub self, ObjectInputStream s) throws IOException, ClassNotFoundException { throw new Error("Not implemented for StubDelegate"); }
public void readObject(Stub self, ObjectInputStream input) throws IOException, ClassNotFoundException { throw new Error("Not implemented for StubDelegate"); }
6,184
public void readObject(Stub self, ObjectInputStream s) throws IOException, ClassNotFoundException { throw new Error("Not implemented for StubDelegate"); }
public void readObject(Stub self, ObjectInputStream s) throws IOException, ClassNotFoundException { readObject(self, input, null); }
6,185
public String toString(Stub self) { try { return self._orb().object_to_string(self); } // XXX javax.rmi.BAD_OPERATION -> org.omg.CORBA.BAD_OPERATION catch(javax.rmi.BAD_OPERATION bad_operation) { return null; } }
public String toString(Stub self) { try { return self._orb().object_to_string(self); } // XXX javax.rmi.BAD_OPERATION -> org.omg.CORBA.BAD_OPERATION catch (Exception ex) { return null; } }
6,186
public void writeObject(Stub self, ObjectOutputStream s) throws IOException { throw new Error("Not implemented for StubDelegate"); }
public void writeObject(Stub self, ObjectOutputStream output) throws IOException { throw new Error("Not implemented for StubDelegate"); }
6,187
public void writeObject(Stub self, ObjectOutputStream s) throws IOException { throw new Error("Not implemented for StubDelegate"); }
public void writeObject(Stub self, ObjectOutputStream s) throws IOException { writeObject(self, output, null); }
6,188
public MetalSplitPaneDivider(MetalSplitPaneUI ui, Color light, Color dark) { super(ui); setLayout(new MetalDividerLayout()); this.splitPane = super.splitPane; this.orientation = super.orientation; this.light = light; this.dark = dark; }
public MetalSplitPaneDivider(MetalSplitPaneUI ui, Color light, Color dark) { super(ui); setLayout(new MetalDividerLayout()); this.splitPane = super.splitPane; this.orientation = super.orientation; this.light = light; this.dark = dark; }
6,189
public MetalSplitPaneDivider(MetalSplitPaneUI ui, Color light, Color dark) { super(ui); setLayout(new MetalDividerLayout()); this.splitPane = super.splitPane; this.orientation = super.orientation; this.light = light; this.dark = dark; }
public MetalSplitPaneDivider(MetalSplitPaneUI ui, Color light, Color dark) { super(ui); this.splitPane = super.splitPane; this.orientation = super.orientation; this.light = light; this.dark = dark; }
6,190
public MetalSplitPaneDivider(MetalSplitPaneUI ui, Color light, Color dark) { super(ui); setLayout(new MetalDividerLayout()); this.splitPane = super.splitPane; this.orientation = super.orientation; this.light = light; this.dark = dark; }
public MetalSplitPaneDivider(MetalSplitPaneUI ui, Color light, Color dark) { super(ui); setLayout(new MetalDividerLayout()); this.splitPane = super.splitPane; this.orientation = super.orientation; this.light = light; this.dark = dark; }
6,191
public void paint(Graphics g) { Dimension s = getSize(); if (splitPane.hasFocus()) { g.setColor(UIManager.getColor("SplitPane.dividerFocusColor")); g.fillRect(0, 0, s.width, s.height); } // Paint border if one exists. Border border = getBorder(); if (border != null) border.paintBorder(this, g, 0, 0, s.width, s.height); MetalUtils.fillMetalPattern(splitPane, g, 2, 2, s.width - 4, s.height - 4, light, dark); if (splitPane.isOneTouchExpandable()) { ((BasicArrowButton) rightButton).paint(g); ((BasicArrowButton) leftButton).paint(g); } }
public void paint(Graphics g) { Dimension s = getSize(); if (splitPane.hasFocus()) { g.setColor(UIManager.getColor("SplitPane.dividerFocusColor")); g.fillRect(0, 0, s.width, s.height); } // Paint border if one exists. Border border = getBorder(); if (border != null) border.paintBorder(this, g, 0, 0, s.width, s.height); MetalUtils.fillMetalPattern(splitPane, g, 2, 2, s.width - 4, s.height - 4, light, dark); if (splitPane.isOneTouchExpandable()) { ((BasicArrowButton) rightButton).paint(g); ((BasicArrowButton) leftButton).paint(g); } }
6,192
public void paint(Graphics g) { Dimension s = getSize(); if (splitPane.hasFocus()) { g.setColor(UIManager.getColor("SplitPane.dividerFocusColor")); g.fillRect(0, 0, s.width, s.height); } // Paint border if one exists. Border border = getBorder(); if (border != null) border.paintBorder(this, g, 0, 0, s.width, s.height); MetalUtils.fillMetalPattern(splitPane, g, 2, 2, s.width - 4, s.height - 4, light, dark); if (splitPane.isOneTouchExpandable()) { ((BasicArrowButton) rightButton).paint(g); ((BasicArrowButton) leftButton).paint(g); } }
public void paint(Graphics g) { Dimension s = getSize(); if (splitPane.hasFocus()) { g.setColor(UIManager.getColor("SplitPane.dividerFocusColor")); g.fillRect(0, 0, s.width, s.height); } // Paint border if one exists. Border border = getBorder(); if (border != null) border.paintBorder(this, g, 0, 0, s.width, s.height); MetalUtils.fillMetalPattern(splitPane, g, 2, 2, s.width - 4, s.height - 4, light, dark); if (splitPane.isOneTouchExpandable()) { ((BasicArrowButton) rightButton).paint(g); ((BasicArrowButton) leftButton).paint(g); } }
6,193
public void paint(Graphics g) { Dimension s = getSize(); if (splitPane.hasFocus()) { g.setColor(UIManager.getColor("SplitPane.dividerFocusColor")); g.fillRect(0, 0, s.width, s.height); } // Paint border if one exists. Border border = getBorder(); if (border != null) border.paintBorder(this, g, 0, 0, s.width, s.height); MetalUtils.fillMetalPattern(splitPane, g, 2, 2, s.width - 4, s.height - 4, light, dark); if (splitPane.isOneTouchExpandable()) { ((BasicArrowButton) rightButton).paint(g); ((BasicArrowButton) leftButton).paint(g); } }
public void paint(Graphics g) { Dimension s = getSize(); if (splitPane.hasFocus()) { g.setColor(UIManager.getColor("SplitPane.dividerFocusColor")); g.fillRect(0, 0, s.width, s.height); } // Paint border if one exists. Border border = getBorder(); if (border != null) border.paintBorder(this, g, 0, 0, s.width, s.height); Insets i = getInsets(); MetalUtils.fillMetalPattern(splitPane, g, i.left + 2, i.top + 2, s.width - i.left - i.right - 4, s.height - i.top - i.bottom - 4, light, dark); if (splitPane.isOneTouchExpandable()) { ((BasicArrowButton) rightButton).paint(g); ((BasicArrowButton) leftButton).paint(g); } }
6,194
public void paint(Graphics g) { Dimension s = getSize(); if (splitPane.hasFocus()) { g.setColor(UIManager.getColor("SplitPane.dividerFocusColor")); g.fillRect(0, 0, s.width, s.height); } // Paint border if one exists. Border border = getBorder(); if (border != null) border.paintBorder(this, g, 0, 0, s.width, s.height); MetalUtils.fillMetalPattern(splitPane, g, 2, 2, s.width - 4, s.height - 4, light, dark); if (splitPane.isOneTouchExpandable()) { ((BasicArrowButton) rightButton).paint(g); ((BasicArrowButton) leftButton).paint(g); } }
public void paint(Graphics g) { Dimension s = getSize(); if (splitPane.hasFocus()) { g.setColor(UIManager.getColor("SplitPane.dividerFocusColor")); g.fillRect(0, 0, s.width, s.height); } // Paint border if one exists. Border border = getBorder(); if (border != null) border.paintBorder(this, g, 0, 0, s.width, s.height); MetalUtils.fillMetalPattern(splitPane, g, 2, 2, s.width - 4, s.height - 4, light, dark); if (splitPane.isOneTouchExpandable()) { ((BasicArrowButton) rightButton).paint(g); ((BasicArrowButton) leftButton).paint(g); } }
6,195
public SortingFocusTraversalPolicy(Comparator comparator) { this.comparator = comparator; }
protected SortingFocusTraversalPolicy() { this.comparator = comparator; }
6,196
public SortingFocusTraversalPolicy(Comparator comparator) { this.comparator = comparator; }
public SortingFocusTraversalPolicy(Comparator comparator) { }
6,197
public Object clone() { return new CubicSegment(P1.getX(), P1.getY(), cp1.getX(), cp1.getY(), cp2.getX(), cp2.getY(), P2.getX(), P2.getY()); }
public Object clone() { return new CubicSegment(P1.getX(), P1.getY(), cp1.getX(), cp1.getY(), cp2.getX(), cp2.getY(), P2.getX(), P2.getY()); }
6,198
protected void specificIOStyleToXDF( OutputStream outputstream,String indent) { //write out nodes in formatCommandList synchronized (formatCommandList) { int stop = formatCommandList.size(); for (int i = 0; i <stop; i++) { if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } ((XMLDataIOStyle) formatCommandList.get(i)).specificIOStyleToXDF(outputstream, indent); } } }
protected void specificIOStyleToXDF( OutputStream outputstream,String indent) { //write out nodes in formatCommandList synchronized (formatCommandList) { int stop = formatCommandList.size(); for (int i = 0; i <stop; i++) { if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } ((XMLDataIOStyle) formatCommandList.get(i)).specificIOStyleToXDF(outputstream, indent); } } }
6,200
protected void specificIOStyleToXDF( OutputStream outputstream,String indent) { //write out nodes in formatCommandList synchronized (formatCommandList) { int stop = formatCommandList.size(); for (int i = 0; i <stop; i++) { if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } ((XMLDataIOStyle) formatCommandList.get(i)).specificIOStyleToXDF(outputstream, indent); } } }
protected void specificIOStyleToXDF( OutputStream outputstream,String indent) { //write out nodes in formatCommandList synchronized (formatCommandList) { int stop = formatCommandList.size(); for (int i = 0; i <stop; i++) { if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } ((XMLDataIOStyle) formatCommandList.get(i)).specificIOStyleToXDF(outputstream, indent); } } }
6,201
public BasicSplitPaneDivider(BasicSplitPaneUI ui) { setLayout(new DividerLayout()); setBasicSplitPaneUI(ui); setDividerSize(splitPane.getDividerSize()); setBorder(tmpBorder); }
public BasicSplitPaneDivider(BasicSplitPaneUI ui) { setLayout(new DividerLayout()); setBasicSplitPaneUI(ui); setDividerSize(splitPane.getDividerSize()); }
6,203
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) { /* Remove the connection to the existing JSplitPane. */ if (splitPane != null) { splitPane.removePropertyChangeListener(this); splitPane.removeMouseListener(mouseHandler); splitPane.removeMouseMotionListener(mouseHandler); removeMouseListener(mouseHandler); removeMouseMotionListener(mouseHandler); splitPane = null; hiddenDivider = null; } /* Establish the connection to the new JSplitPane. */ splitPaneUI = newUI; if (splitPaneUI != null) splitPane = newUI.getSplitPane(); if (splitPane != null) { splitPane.addPropertyChangeListener(this); splitPane.addMouseListener(mouseHandler); splitPane.addMouseMotionListener(mouseHandler); addMouseListener(mouseHandler); addMouseMotionListener(mouseHandler); hiddenDivider = splitPaneUI.getNonContinuousLayoutDivider(); orientation = splitPane.getOrientation(); oneTouchExpandableChanged(); } }
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) { /* Remove the connection to the existing JSplitPane. */ if (splitPane != null) { splitPane.removePropertyChangeListener(this); splitPane.removeMouseListener(mouseHandler); splitPane.removeMouseMotionListener(mouseHandler); removeMouseListener(mouseHandler); removeMouseMotionListener(mouseHandler); splitPane = null; hiddenDivider = null; } /* Establish the connection to the new JSplitPane. */ splitPaneUI = newUI; if (splitPaneUI != null) splitPane = newUI.getSplitPane(); if (splitPane != null) { splitPane.addPropertyChangeListener(this); splitPane.addMouseListener(mouseHandler); splitPane.addMouseMotionListener(mouseHandler); addMouseListener(mouseHandler); addMouseMotionListener(mouseHandler); hiddenDivider = splitPaneUI.getNonContinuousLayoutDivider(); orientation = splitPane.getOrientation(); oneTouchExpandableChanged(); } }
6,204
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) { /* Remove the connection to the existing JSplitPane. */ if (splitPane != null) { splitPane.removePropertyChangeListener(this); splitPane.removeMouseListener(mouseHandler); splitPane.removeMouseMotionListener(mouseHandler); removeMouseListener(mouseHandler); removeMouseMotionListener(mouseHandler); splitPane = null; hiddenDivider = null; } /* Establish the connection to the new JSplitPane. */ splitPaneUI = newUI; if (splitPaneUI != null) splitPane = newUI.getSplitPane(); if (splitPane != null) { splitPane.addPropertyChangeListener(this); splitPane.addMouseListener(mouseHandler); splitPane.addMouseMotionListener(mouseHandler); addMouseListener(mouseHandler); addMouseMotionListener(mouseHandler); hiddenDivider = splitPaneUI.getNonContinuousLayoutDivider(); orientation = splitPane.getOrientation(); oneTouchExpandableChanged(); } }
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) { /* Remove the connection to the existing JSplitPane. */ if (splitPane != null) { splitPane.removePropertyChangeListener(this); splitPane.removeMouseListener(mouseHandler); splitPane.removeMouseMotionListener(mouseHandler); removeMouseListener(mouseHandler); removeMouseMotionListener(mouseHandler); splitPane = null; hiddenDivider = null; } /* Establish the connection to the new JSplitPane. */ splitPaneUI = newUI; if (splitPaneUI != null) splitPane = newUI.getSplitPane(); if (splitPane != null) { splitPane.addPropertyChangeListener(this); splitPane.addMouseListener(mouseHandler); splitPane.addMouseMotionListener(mouseHandler); addMouseListener(mouseHandler); addMouseMotionListener(mouseHandler); hiddenDivider = splitPaneUI.getNonContinuousLayoutDivider(); orientation = splitPane.getOrientation(); oneTouchExpandableChanged(); } }
6,205
final boolean writeMouseCommand(int cmd) throws DeviceException { // First clear the mouse channel, otherwise we might read // old data back mouseChannel.clear(); // Transmit the command writeController(CCMD_WRITE_MOUSE); writeData(cmd); int data; try { data = mouseChannel.read(50); } catch (IOException ex) { log.debug("IOException in readMouse", ex); return false; } catch (TimeoutException ex) { log.debug("Timeout in readMouse"); return false; } catch (InterruptedException ex) { log.debug("Interrupted in readMouse"); return false; } if (data == REPLY_ACK) { return true; // command acknowledged } else if (data == REPLY_RESEND) { log.debug("Mouse replied with RESEND"); } else { log.debug("Invalid reply 0x" + Integer.toHexString(data)); } return false; // on error }
final boolean writeMouseCommand(int cmd) throws DeviceException { // First clear the mouse channel, otherwise we might read // old data back mouseChannel.clear(); // Transmit the command writeController(CCMD_WRITE_MOUSE); writeData(cmd); int data; try { data = mouseChannel.read(50); } catch (IOException ex) { log.debug("IOException in readMouse", ex); return false; } catch (TimeoutException ex) { log.debug("Timeout in readMouse"); return false; } catch (InterruptedException ex) { log.debug("Interrupted in readMouse"); return false; } if (data == REPLY_ACK) { return true; // command acknowledged } else if (data == REPLY_RESEND) { log.debug("Mouse replied with RESEND"); } else { log.debug("Invalid reply 0x" + Integer.toHexString(data)); } return false; // on error }
6,208
public boolean equals(Object obj) { return (obj != null) && (obj instanceof SimpleAttributeSet) && ((SimpleAttributeSet)obj).tab.equals(this.tab); }
public boolean equals(Object obj) { return (obj != null) && (obj instanceof SimpleAttributeSet) && ((SimpleAttributeSet)obj).tab.equals(this.tab); }
6,210
public boolean isEqual(AttributeSet attr) { return this.equals(attr); }
public boolean isEqual(AttributeSet attr) { return attr != null && attr.containsAttributes(this) && this.containsAttributes(attr); }
6,211
private void addURLImpl(URL newUrl) { synchronized (urlloaders) { if (newUrl == null) return; // Silently ignore... // Check global cache to see if there're already url loader // for this url. URLLoader loader = (URLLoader) urlloaders.get(newUrl); if (loader == null) { String file = newUrl.getFile(); // Check that it is not a directory if (! (file.endsWith("/") || file.endsWith(File.separator))) loader = new JarURLLoader(this, newUrl); else if ("file".equals(newUrl.getProtocol())) loader = new FileURLLoader(this, newUrl); else loader = new RemoteURLLoader(this, newUrl); // Cache it. urlloaders.put(newUrl, loader); } urls.add(newUrl); urlinfos.add(loader); } }
private void addURLImpl(URL newUrl) { synchronized (urlloaders) { if (newUrl == null) return; // Silently ignore... // Check global cache to see if there're already url loader // for this url. URLLoader loader = (URLLoader) urlloaders.get(newUrl); if (loader == null) { String file = newUrl.getFile(); // Check that it is not a directory if (! (file.endsWith("/") || file.endsWith(File.separator))) loader = new JarURLLoader(this, newUrl); else if ("file".equals(newUrl.getProtocol())) loader = new FileURLLoader(this, newUrl); else loader = new RemoteURLLoader(this, newUrl); // Cache it. urlloaders.put(newUrl, loader); } urls.add(newUrl); urlinfos.add(loader); } }
6,212
protected Class findClass(final String className) throws ClassNotFoundException { // Just try to find the resource by the (almost) same name String resourceName = className.replace('.', '/') + ".class"; Resource resource = findURLResource(resourceName); if (resource == null) throw new ClassNotFoundException(className + " not found in " + urls); // Try to read the class data, create the CodeSource, Package and // construct the class (and watch out for those nasty IOExceptions) try { byte[] data; InputStream in = resource.getInputStream(); try { int length = resource.getLength(); if (length != -1) { // We know the length of the data. // Just try to read it in all at once data = new byte[length]; int pos = 0; while (length - pos > 0) { int len = in.read(data, pos, length - pos); if (len == -1) throw new EOFException("Not enough data reading from: " + in); pos += len; } } else { // We don't know the data length. // Have to read it in chunks. ByteArrayOutputStream out = new ByteArrayOutputStream(4096); byte[] b = new byte[4096]; int l = 0; while (l != -1) { l = in.read(b); if (l != -1) out.write(b, 0, l); } data = out.toByteArray(); } } finally { in.close(); } final byte[] classData = data; // Now get the CodeSource final CodeSource source = resource.getCodeSource(); // Find out package name String packageName = null; int lastDot = className.lastIndexOf('.'); if (lastDot != -1) packageName = className.substring(0, lastDot); if (packageName != null && getPackage(packageName) == null) { // define the package Manifest manifest = resource.loader.getManifest(); if (manifest == null) definePackage(packageName, null, null, null, null, null, null, null); else definePackage(packageName, manifest, resource.loader.baseURL); } // And finally construct the class! SecurityManager sm = System.getSecurityManager(); if (sm != null && securityContext != null) return (Class) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return defineClass(className, classData, 0, classData.length, source); } }, securityContext); else return defineClass(className, classData, 0, classData.length, source); } catch (IOException ioe) { throw new ClassNotFoundException(className, ioe); } }
protected Class findClass(final String className) throws ClassNotFoundException { // Just try to find the resource by the (almost) same name String resourceName = className.replace('.', '/') + ".class"; Resource resource = findURLResource(resourceName); if (resource == null) throw new ClassNotFoundException(className + " not found in " + urls); // Try to read the class data, create the CodeSource, Package and // construct the class (and watch out for those nasty IOExceptions) try { byte[] data; InputStream in = resource.getInputStream(); try { int length = resource.getLength(); if (length != -1) { // We know the length of the data. // Just try to read it in all at once data = new byte[length]; int pos = 0; while (length - pos > 0) { int len = in.read(data, pos, length - pos); if (len == -1) throw new EOFException("Not enough data reading from: " + in); pos += len; } } else { // We don't know the data length. // Have to read it in chunks. ByteArrayOutputStream out = new ByteArrayOutputStream(4096); byte[] b = new byte[4096]; int l = 0; while (l != -1) { l = in.read(b); if (l != -1) out.write(b, 0, l); } data = out.toByteArray(); } } finally { in.close(); } final byte[] classData = data; // Now get the CodeSource final CodeSource source = resource.getCodeSource(); // Find out package name String packageName = null; int lastDot = className.lastIndexOf('.'); if (lastDot != -1) packageName = className.substring(0, lastDot); if (packageName != null && getPackage(packageName) == null) { // define the package Manifest manifest = resource.loader.getManifest(); if (manifest == null) definePackage(packageName, null, null, null, null, null, null, null); else definePackage(packageName, manifest, resource.loader.baseURL); } // And finally construct the class! SecurityManager sm = System.getSecurityManager(); if (sm != null && securityContext != null) return (Class) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return defineClass(className, classData, 0, classData.length, source); } }, securityContext); else return defineClass(className, classData, 0, classData.length, source); } catch (IOException ioe) { throw new ClassNotFoundException(className, ioe); } }
6,213
protected Class findClass(final String className) throws ClassNotFoundException { // Just try to find the resource by the (almost) same name String resourceName = className.replace('.', '/') + ".class"; Resource resource = findURLResource(resourceName); if (resource == null) throw new ClassNotFoundException(className + " not found in " + urls); // Try to read the class data, create the CodeSource, Package and // construct the class (and watch out for those nasty IOExceptions) try { byte[] data; InputStream in = resource.getInputStream(); try { int length = resource.getLength(); if (length != -1) { // We know the length of the data. // Just try to read it in all at once data = new byte[length]; int pos = 0; while (length - pos > 0) { int len = in.read(data, pos, length - pos); if (len == -1) throw new EOFException("Not enough data reading from: " + in); pos += len; } } else { // We don't know the data length. // Have to read it in chunks. ByteArrayOutputStream out = new ByteArrayOutputStream(4096); byte[] b = new byte[4096]; int l = 0; while (l != -1) { l = in.read(b); if (l != -1) out.write(b, 0, l); } data = out.toByteArray(); } } finally { in.close(); } final byte[] classData = data; // Now get the CodeSource final CodeSource source = resource.getCodeSource(); // Find out package name String packageName = null; int lastDot = className.lastIndexOf('.'); if (lastDot != -1) packageName = className.substring(0, lastDot); if (packageName != null && getPackage(packageName) == null) { // define the package Manifest manifest = resource.loader.getManifest(); if (manifest == null) definePackage(packageName, null, null, null, null, null, null, null); else definePackage(packageName, manifest, resource.loader.baseURL); } // And finally construct the class! SecurityManager sm = System.getSecurityManager(); if (sm != null && securityContext != null) return (Class) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return defineClass(className, classData, 0, classData.length, source); } }, securityContext); else return defineClass(className, classData, 0, classData.length, source); } catch (IOException ioe) { throw new ClassNotFoundException(className, ioe); } }
protected Class findClass(final String className) throws ClassNotFoundException { // Just try to find the resource by the (almost) same name String resourceName = className.replace('.', '/') + ".class"; Resource resource = findURLResource(resourceName); if (resource == null) throw new ClassNotFoundException(className + " not found in " + urls); // Try to read the class data, create the CodeSource, Package and // construct the class (and watch out for those nasty IOExceptions) try { byte[] data; InputStream in = resource.getInputStream(); try { int length = resource.getLength(); if (length != -1) { // We know the length of the data. // Just try to read it in all at once data = new byte[length]; int pos = 0; while (length - pos > 0) { int len = in.read(data, pos, length - pos); if (len == -1) throw new EOFException("Not enough data reading from: " + in); pos += len; } } else { // We don't know the data length. // Have to read it in chunks. ByteArrayOutputStream out = new ByteArrayOutputStream(4096); byte[] b = new byte[4096]; int l = 0; while (l != -1) { l = in.read(b); if (l != -1) out.write(b, 0, l); } data = out.toByteArray(); } } finally { in.close(); } final byte[] classData = data; // Now get the CodeSource final CodeSource source = resource.getCodeSource(); // Find out package name String packageName = null; int lastDot = className.lastIndexOf('.'); if (lastDot != -1) packageName = className.substring(0, lastDot); if (packageName != null && getPackage(packageName) == null) { // define the package Manifest manifest = resource.loader.getManifest(); if (manifest == null) definePackage(packageName, null, null, null, null, null, null, null); else definePackage(packageName, manifest, resource.loader.baseURL); } // And finally construct the class! SecurityManager sm = System.getSecurityManager(); if (sm != null && securityContext != null) return (Class) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return defineClass(className, classData, 0, classData.length, source); } }, securityContext); else return defineClass(className, classData, 0, classData.length, source); } catch (IOException ioe) { throw new ClassNotFoundException(className, ioe); } }
6,214
public Object run() { return defineClass(className, classData, 0, classData.length, source); }
public Object run() { return defineClass(className, classData, 0, classData.length, source); }
6,216
final synchronized IRQResource claimResources(ResourceOwner owner, int irq) throws DriverException { try { final ResourceManager rm; try { rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME); } catch (NameNotFoundException ex) { throw new DriverException("Cannot find ResourceManager: ", ex); } if (ioResData == null) { ioResData = claimPorts(rm, owner, PS2_DATA_PORT, 1); ioResCtrl = claimPorts(rm, owner, PS2_CTRL_PORT, 1); } final IRQResource irqRes = rm.claimIRQ(owner, irq, this, true); if (activeCount == 0) { processQueues(); } activeCount++; return irqRes; } catch (ResourceNotFreeException ex) { throw new DriverException("Cannot claim necessairy resources: ", ex); } }
final synchronized IRQResource claimResources(ResourceOwner owner, int irq) throws DriverException { try { final ResourceManager rm; try { rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME); } catch (NameNotFoundException ex) { throw new DriverException("Cannot find ResourceManager: ", ex); } if (ioResData == null) { ioResData = claimPorts(rm, owner, PS2_DATA_PORT, 1); ioResCtrl = claimPorts(rm, owner, PS2_CTRL_PORT, 1); } final IRQResource irqRes = rm.claimIRQ(owner, irq, this, true); if (activeCount == 0) { processQueues(); } activeCount++; return irqRes; } catch (ResourceNotFreeException ex) { throw new DriverException("Cannot claim necessairy resources: ", ex); } }
6,218
final int getMode() throws DeviceException { writeController(CCMD_READ_MODE); return readData(); }
final int getMode() throws DeviceException { writeController(CCMD_READ_MODE); return readData(); }
6,219
public synchronized final void handleInterrupt(int irq) { if (irqReadQueue) { processQueues(); } }
public synchronized final void handleInterrupt(int irq) { if (irqReadQueue) { processQueues(); } }
6,220
final void processQueues() { int status; //System.out.print('<'); while (((status = readStatus()) & AUX_STAT_OBF) != 0) { final int data = readData(); // determine which driver shall handle the scancode final PS2ByteChannel channel; if ((status & STAT_MOUSE_OBF) != 0) { channel = mouseChannel; } else { channel = kbChannel; } // if this driver is not registered, merely exit if (channel == null) { log.debug("Unhandled scancode 0x" + Integer.toHexString(data) + " status=0x" + Integer.toHexString(status)); } else { // let the driver handle the scancode channel.handleScancode(data); } } //System.out.print('>'); }
final void processQueues() { int status; //System.out.print('<'); while (((status = readStatus()) & AUX_STAT_OBF) != 0) { final int data = readData(); // determine which driver shall handle the scancode final PS2ByteChannel channel; if ((status & STAT_MOUSE_OBF) != 0) { channel = mouseChannel; } else { channel = kbChannel; } // if this driver is not registered, merely exit if (channel == null) { log.debug("Unhandled scancode 0x" + Integer.toHexString(data) + " status=0x" + Integer.toHexString(status)); } else { // let the driver handle the scancode channel.handleScancode(data); } } //System.out.print('>'); }
6,221
final void processQueues() { int status; //System.out.print('<'); while (((status = readStatus()) & AUX_STAT_OBF) != 0) { final int data = readData(); // determine which driver shall handle the scancode final PS2ByteChannel channel; if ((status & STAT_MOUSE_OBF) != 0) { channel = mouseChannel; } else { channel = kbChannel; } // if this driver is not registered, merely exit if (channel == null) { log.debug("Unhandled scancode 0x" + Integer.toHexString(data) + " status=0x" + Integer.toHexString(status)); } else { // let the driver handle the scancode channel.handleScancode(data); } } //System.out.print('>'); }
finalvoidprocessQueues(){ intstatus; //System.out.print('<'); while(((status=readStatus())&AUX_STAT_OBF)!=0){ finalintdata=readData(); //determinewhichdrivershallhandlethescancode finalPS2ByteChannelchannel; if((status&STAT_MOUSE_OBF)!=0){ channel=mouseChannel; }else{ channel=kbChannel; } //ifthisdriverisnotregistered,merelyexit if(channel==null){ log.debug("Unhandledscancode0x"+Integer.toHexString(data)+"status=0x"+Integer.toHexString(status)); }else{ //letthedriverhandlethescancode channel.handleScancode(data); } } //System.out.print('>'); }
6,222
final boolean testMouse() throws DeviceException { irqReadQueue = false; try { writeController(CCMD_TEST_MOUSE); final int status = readStatus(); final int rc = readData(); log.debug("testMouse rc=0x" + NumberUtils.hex(rc, 2) + ", status 0x" + NumberUtils.hex(status, 2)); return (rc != 0xFF); } finally { irqReadQueue = true; processQueues(); } }
final boolean testMouse() throws DeviceException { irqReadQueue = false; try { writeController(CCMD_TEST_MOUSE); final int status = readStatus(); final int rc = readData(); log.debug("testMouse rc=0x" + NumberUtils.hex(rc, 2) + ", status 0x" + NumberUtils.hex(status, 2)); return (rc != 0xFF); } finally { irqReadQueue = true; processQueues(); } }
6,225
final boolean testMouse() throws DeviceException { irqReadQueue = false; try { writeController(CCMD_TEST_MOUSE); final int status = readStatus(); final int rc = readData(); log.debug("testMouse rc=0x" + NumberUtils.hex(rc, 2) + ", status 0x" + NumberUtils.hex(status, 2)); return (rc != 0xFF); } finally { irqReadQueue = true; processQueues(); } }
final boolean testMouse() throws DeviceException { irqReadQueue = false; try { writeController(CCMD_TEST_MOUSE); final int status = readStatus(); final int rc = readData(); log.debug("testMouse rc=0x" + NumberUtils.hex(rc, 2) + ", status 0x" + NumberUtils.hex(status, 2)); return (rc != 0xFF); } finally { irqReadQueue = true; processQueues(); } }
6,226
final boolean testMouse() throws DeviceException { irqReadQueue = false; try { writeController(CCMD_TEST_MOUSE); final int status = readStatus(); final int rc = readData(); log.debug("testMouse rc=0x" + NumberUtils.hex(rc, 2) + ", status 0x" + NumberUtils.hex(status, 2)); return (rc != 0xFF); } finally { irqReadQueue = true; processQueues(); } }
final boolean testMouse() throws DeviceException { irqReadQueue = false; try { writeController(CCMD_TEST_MOUSE); final int status = readStatus(); final int rc = readData(); log.debug("testMouse rc=0x" + NumberUtils.hex(rc, 2) + ", status 0x" + NumberUtils.hex(status, 2)); return (rc != 0xFF); } finally { irqReadQueue = true; processQueues(); } }
6,227
final boolean writeMouseCommands(int[] cmds) throws DeviceException { boolean ok = true; for (int i = 0; i < cmds.length; i++) { ok &= writeMouseCommand(cmds[i]); } return ok; }
final boolean writeMouseCommands(int[] cmds) throws DeviceException { boolean ok = true; for (int i = 0; i < cmds.length; i++) { ok &= writeMouseCommand(cmds[i]); } return ok; }
6,228
public static void drawStringUnderlineCharAt(Graphics g, String text, int underlinedIndex, int x, int y) { Graphics2D g2; Rectangle2D.Double underline; FontRenderContext frc; FontMetrics fmet; LineMetrics lineMetrics; Font font; TextLayout layout; double underlineX1, underlineX2; boolean drawUnderline; int textLength; textLength = text.length(); if (textLength == 0) return; drawUnderline = (underlinedIndex >= 0) && (underlinedIndex < textLength); // XXX - FIXME we now always use this fall-back since TextLayout is // almost completely not implemented. if (!(g instanceof Graphics2D) || true) { /* Fall-back. This is likely to produce garbage for any text * containing right-to-left (Hebrew or Arabic) characters, even * if the underlined character is left-to-right. */ g.drawString(text, x, y); if (drawUnderline) { fmet = g.getFontMetrics(); g.fillRect( /* x */ x + fmet.stringWidth(text.substring(0, underlinedIndex)), /* y */ y + fmet.getDescent() - 1, /* width */ fmet.charWidth(text.charAt(underlinedIndex)), /* height */ 1); } return; } g2 = (Graphics2D) g; font = g2.getFont(); frc = g2.getFontRenderContext(); lineMetrics = font.getLineMetrics(text, frc); layout = new TextLayout(text, font, frc); /* Draw the text. */ layout.draw(g2, x, y); if (!drawUnderline) return; underlineX1 = x + layout.getLogicalHighlightShape( underlinedIndex, underlinedIndex).getBounds2D().getX(); underlineX2 = x + layout.getLogicalHighlightShape( underlinedIndex + 1, underlinedIndex + 1).getBounds2D().getX(); underline = new Rectangle2D.Double(); if (underlineX1 < underlineX2) { underline.x = underlineX1; underline.width = underlineX2 - underlineX1; } else { underline.x = underlineX2; underline.width = underlineX1 - underlineX2; } underline.height = lineMetrics.getUnderlineThickness(); underline.y = lineMetrics.getUnderlineOffset(); if (underline.y == 0) { /* Some fonts do not specify an underline offset, although they * actually should do so. In that case, the result of calling * lineMetrics.getUnderlineOffset() will be zero. Since it would * look very ugly if the underline was be positioned immediately * below the baseline, we check for this and move the underline * below the descent, as shown in the following ASCII picture: * * ##### ##### # * # # # # * # # # # * # # # # * ##### ###### ---- baseline (0) * # * # * ------------------###----------- lineMetrics.getDescent() */ underline.y = lineMetrics.getDescent(); } underline.y += y; g2.fill(underline); }
public static void drawStringUnderlineCharAt(Graphics g, String text, int underlinedIndex, int x, int y) { Graphics2D g2; Rectangle2D.Double underline; FontRenderContext frc; FontMetrics fmet; LineMetrics lineMetrics; Font font; TextLayout layout; double underlineX1, underlineX2; boolean drawUnderline; int textLength; textLength = text.length(); if (textLength == 0) return; drawUnderline = (underlinedIndex >= 0) && (underlinedIndex < textLength); // XXX - FIXME we now always use this fall-back since TextLayout is // almost completely not implemented. if (true || !(g instanceof Graphics2D)) { /* Fall-back. This is likely to produce garbage for any text * containing right-to-left (Hebrew or Arabic) characters, even * if the underlined character is left-to-right. */ g.drawString(text, x, y); if (drawUnderline) { fmet = g.getFontMetrics(); g.fillRect( /* x */ x + fmet.stringWidth(text.substring(0, underlinedIndex)), /* y */ y + fmet.getDescent() - 1, /* width */ fmet.charWidth(text.charAt(underlinedIndex)), /* height */ 1); } return; } g2 = (Graphics2D) g; font = g2.getFont(); frc = g2.getFontRenderContext(); lineMetrics = font.getLineMetrics(text, frc); layout = new TextLayout(text, font, frc); /* Draw the text. */ layout.draw(g2, x, y); if (!drawUnderline) return; underlineX1 = x + layout.getLogicalHighlightShape( underlinedIndex, underlinedIndex).getBounds2D().getX(); underlineX2 = x + layout.getLogicalHighlightShape( underlinedIndex + 1, underlinedIndex + 1).getBounds2D().getX(); underline = new Rectangle2D.Double(); if (underlineX1 < underlineX2) { underline.x = underlineX1; underline.width = underlineX2 - underlineX1; } else { underline.x = underlineX2; underline.width = underlineX1 - underlineX2; } underline.height = lineMetrics.getUnderlineThickness(); underline.y = lineMetrics.getUnderlineOffset(); if (underline.y == 0) { /* Some fonts do not specify an underline offset, although they * actually should do so. In that case, the result of calling * lineMetrics.getUnderlineOffset() will be zero. Since it would * look very ugly if the underline was be positioned immediately * below the baseline, we check for this and move the underline * below the descent, as shown in the following ASCII picture: * * ##### ##### # * # # # # * # # # # * # # # # * ##### ###### ---- baseline (0) * # * # * ------------------###----------- lineMetrics.getDescent() */ underline.y = lineMetrics.getDescent(); } underline.y += y; g2.fill(underline); }
6,230
public RootView() { super(null); }
public RootView() { super(null); }
6,231
public Container getContainer() { return textComponent; }
public Container getContainer() { return textComponent; }
6,232
public float getPreferredSpan(int axis) { if (view != null) return view.getPreferredSpan(axis); return Integer.MAX_VALUE; }
public float getPreferredSpan(int axis) { if (view != null) return view.getPreferredSpan(axis); return Integer.MAX_VALUE; }
6,233
public ViewFactory getViewFactory() { ViewFactory factory = null; EditorKit editorKit = BasicTextUI.this.getEditorKit(getComponent()); factory = editorKit.getViewFactory(); if (factory == null) factory = BasicTextUI.this; return factory; }
public ViewFactory getViewFactory() { ViewFactory factory = null; EditorKit editorKit = BasicTextUI.this.getEditorKit(getComponent()); factory = editorKit.getViewFactory(); if (factory == null) factory = BasicTextUI.this; return factory; }
6,234
public void paint(Graphics g, Shape s) { if (view != null) view.paint(g, s); }
public void paint(Graphics g, Shape s) { if (view != null) view.paint(g, s); }
6,235
public void setView(View v) { if (view != null) view.setParent(null); if (v != null) v.setParent(null); view = v; }
public void setView(View v) { if (view != null) view.setParent(null); if (v != null) v.setParent(null); view = v; }
6,236
public BasicTextUI() { }
public BasicTextUI() { }
6,237
protected Caret createCaret() { return new BasicCaret(); }
protected Caret createCaret() { return new BasicCaret(); }
6,238
public void damageRange(JTextComponent t, int p0, int p1) { damageRange(t, p0, p1, null, null); }
public void damageRange(JTextComponent t, int p0, int p1) { damageRange(t, p0, p1, null, null); }
6,239
ActionMap getActionMap() { String prefix = getPropertyPrefix(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); ActionMap am = (ActionMap) defaults.get(prefix + ".actionMap"); if (am == null) { am = createActionMap(); defaults.put(prefix + ".actionMap", am); } return am; }
ActionMap getActionMap() { String prefix = getPropertyPrefix(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); ActionMap am = (ActionMap) defaults.get(prefix + ".actionMap"); if (am == null) { am = createActionMap(); defaults.put(prefix + ".actionMap", am); } return am; }
6,240
protected final JTextComponent getComponent() { return textComponent; }
protected final JTextComponent getComponent() { return textComponent; }
6,241
public EditorKit getEditorKit(JTextComponent t) { return kit; }
public EditorKit getEditorKit(JTextComponent t) { return kit; }
6,242
public int getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) throws BadLocationException { return 0; // TODO: Implement me. }
public int getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) throws BadLocationException { return 0; // TODO: Implement me. }
6,243
public int getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) throws BadLocationException { return 0; // TODO: Implement me. }
public int getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) throws BadLocationException { return 0; // TODO: Implement me. }
6,244
public Dimension getPreferredSize(JComponent c) { View v = getRootView(textComponent); float w = v.getPreferredSpan(View.X_AXIS); float h = v.getPreferredSpan(View.Y_AXIS); return new Dimension((int) w, (int) h); }
public Dimension getPreferredSize(JComponent c) { View v = getRootView(textComponent); float w = v.getPreferredSpan(View.X_AXIS); float h = v.getPreferredSpan(View.Y_AXIS); return new Dimension((int) w, (int) h); }
6,245
public Dimension getPreferredSize(JComponent c) { View v = getRootView(textComponent); float w = v.getPreferredSpan(View.X_AXIS); float h = v.getPreferredSpan(View.Y_AXIS); return new Dimension((int) w, (int) h); }
public Dimension getPreferredSize(JComponent c) { View v = getRootView(textComponent); float w = v.getPreferredSpan(View.X_AXIS); float h = v.getPreferredSpan(View.Y_AXIS); return new Dimension((int) w, (int) h); }
6,246
public View getRootView(JTextComponent t) { return rootView; }
public View getRootView(JTextComponent t) { return rootView; }
6,247