rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if (a != TOP && a != CENTER && a != BOTTOM) throw new IllegalArgumentException("Invalid alignment.");
public void setVerticalAlignment(int a) { if (verticalAlignment == a) return; int old = verticalAlignment; verticalAlignment = a; firePropertyChange(VERTICAL_ALIGNMENT_CHANGED_PROPERTY, old, a); revalidate(); repaint(); }
if (t != TOP && t != CENTER && t != BOTTOM) throw new IllegalArgumentException("Invalid alignment.");
public void setVerticalTextPosition(int t) { if (verticalTextPosition == t) return; int old = verticalTextPosition; verticalTextPosition = t; firePropertyChange(VERTICAL_TEXT_POSITION_CHANGED_PROPERTY, old, t); revalidate(); repaint(); }
this.operand1 = getOperand(varIndex1);
public ConditionalBranchQuad(int address, IRBasicBlock block, int varIndex1, int condition, int varIndex2, int targetAddress) { super(address, block, targetAddress); if (condition < IF_ICMPEQ || condition > IF_ACMPNE) { throw new IllegalArgumentException("can...
this.operand2 = getOperand(varIndex2); refs = new Operand[]{operand1, operand2};
refs = new Operand[]{ getOperand(varIndex1), getOperand(varIndex2) };
public ConditionalBranchQuad(int address, IRBasicBlock block, int varIndex1, int condition, int varIndex2, int targetAddress) { super(address, block, targetAddress); if (condition < IF_ICMPEQ || condition > IF_ACMPNE) { throw new IllegalArgumentException("can...
operand1 = operand1.simplify(); if (operand1 instanceof Variable) { Variable v = (Variable) operand1;
refs[0] = refs[0].simplify(); if (refs[0] instanceof Variable) { Variable v = (Variable) refs[0];
public void doPass2(BootableHashMap liveVariables) { operand1 = operand1.simplify(); if (operand1 instanceof Variable) { Variable v = (Variable) operand1; v.setLastUseAddress(this.getAddress()); liveVariables.put(v, v); } if (operand2 != null) { ...
if (operand2 != null) { operand2 = operand2.simplify(); if (operand2 instanceof Variable) { Variable v = (Variable) operand2;
if (refs[1] != null) { refs[1] = refs[1].simplify(); if (refs[1] instanceof Variable) { Variable v = (Variable) refs[1];
public void doPass2(BootableHashMap liveVariables) { operand1 = operand1.simplify(); if (operand1 instanceof Variable) { Variable v = (Variable) operand1; v.setLastUseAddress(this.getAddress()); liveVariables.put(v, v); } if (operand2 != null) { ...
int op1Mode = operand1.getAddressingMode(); int op2Mode = operand2.getAddressingMode();
int op1Mode = refs[0].getAddressingMode(); int op2Mode = refs[1].getAddressingMode();
public void generateCodeForBinary(CodeGenerator cg) { cg.checkLabel(getAddress()); int op1Mode = operand1.getAddressingMode(); int op2Mode = operand2.getAddressingMode(); Object reg2 = null; if (op1Mode == Operand.MODE_REGISTER) { Variable var = (Variable) operand1; ...
Variable var = (Variable) operand1;
Variable var = (Variable) refs[0];
public void generateCodeForBinary(CodeGenerator cg) { cg.checkLabel(getAddress()); int op1Mode = operand1.getAddressingMode(); int op2Mode = operand2.getAddressingMode(); Object reg2 = null; if (op1Mode == Operand.MODE_REGISTER) { Variable var = (Variable) operand1; ...
Variable var = (Variable) operand2;
Variable var = (Variable) refs[1];
public void generateCodeForBinary(CodeGenerator cg) { cg.checkLabel(getAddress()); int op1Mode = operand1.getAddressingMode(); int op2Mode = operand2.getAddressingMode(); Object reg2 = null; if (op1Mode == Operand.MODE_REGISTER) { Variable var = (Variable) operand1; ...
c2 = (Constant) operand1;
c2 = (Constant) refs[0];
public void generateCodeForBinary(CodeGenerator cg) { cg.checkLabel(getAddress()); int op1Mode = operand1.getAddressingMode(); int op2Mode = operand2.getAddressingMode(); Object reg2 = null; if (op1Mode == Operand.MODE_REGISTER) { Variable var = (Variable) operand1; ...
c3 = (Constant) operand2;
c3 = (Constant) refs[1];
public void generateCodeForBinary(CodeGenerator cg) { cg.checkLabel(getAddress()); int op1Mode = operand1.getAddressingMode(); int op2Mode = operand2.getAddressingMode(); Object reg2 = null; if (op1Mode == Operand.MODE_REGISTER) { Variable var = (Variable) operand1; ...
if (operand1 instanceof Variable) { Location varLoc = ((Variable) operand1).getLocation();
if (refs[0] instanceof Variable) { Location varLoc = ((Variable) refs[0]).getLocation();
public void generateCodeForUnary(CodeGenerator cg) { if (operand1 instanceof Variable) { Location varLoc = ((Variable) operand1).getLocation(); if (varLoc instanceof RegisterLocation) { RegisterLocation vregLoc = (RegisterLocation) varLoc; cg.generateCodeFo...
} else if (operand1 instanceof Constant) {
} else if (refs[0] instanceof Constant) {
public void generateCodeForUnary(CodeGenerator cg) { if (operand1 instanceof Variable) { Location varLoc = ((Variable) operand1).getLocation(); if (varLoc instanceof RegisterLocation) { RegisterLocation vregLoc = (RegisterLocation) varLoc; cg.generateCodeFo...
Constant con = (Constant) operand1;
Constant con = (Constant) refs[0];
public void generateCodeForUnary(CodeGenerator cg) { if (operand1 instanceof Variable) { Location varLoc = ((Variable) operand1).getLocation(); if (varLoc instanceof RegisterLocation) { RegisterLocation vregLoc = (RegisterLocation) varLoc; cg.generateCodeFo...
throw new IllegalArgumentException("Unknown operand: " + operand1);
throw new IllegalArgumentException("Unknown operand: " + refs[0]);
public void generateCodeForUnary(CodeGenerator cg) { if (operand1 instanceof Variable) { Location varLoc = ((Variable) operand1).getLocation(); if (varLoc instanceof RegisterLocation) { RegisterLocation vregLoc = (RegisterLocation) varLoc; cg.generateCodeFo...
return operand1;
return refs[0];
public Operand getOperand1() { return operand1; }
return operand2;
return refs[1];
public Operand getOperand2() { return operand2; }
return getAddress() + ": if " + operand1.toString() + " " + CONDITION_MAP[condition] + " " + operand2.toString() +
return getAddress() + ": if " + refs[0].toString() + " " + CONDITION_MAP[condition] + " " + refs[1].toString() +
public String toString() { if (condition >= IF_ICMPEQ) { return getAddress() + ": if " + operand1.toString() + " " + CONDITION_MAP[condition] + " " + operand2.toString() + " goto " + getTargetAddress(); } else { return getAddress() + ": if " ...
return getAddress() + ": if " + operand1.toString() + " " +
return getAddress() + ": if " + refs[0].toString() + " " +
public String toString() { if (condition >= IF_ICMPEQ) { return getAddress() + ": if " + operand1.toString() + " " + CONDITION_MAP[condition] + " " + operand2.toString() + " goto " + getTargetAddress(); } else { return getAddress() + ": if " ...
new OpenSameAction(session,keyMap);
void initKeyBindings() { KeyStroke ks; new NewSessionAction(session,keyMap); new ToggleConnectionAction(session,keyMap); new JumpNextAction(session,keyMap); new JumpPrevAction(session,keyMap); new HotspotsAction(session,keyMap); new GuiAction(session,keyMap); new DispMsgsActio...
keyMap.init();
KeyMapper.init();
public KeyboardHandler(Session session) { this.session = session; this.screen = session.getScreen(); String os = System.getProperty("os.name"); if (os.toLowerCase().indexOf("linux") != -1) { System.out.println("using os " + os); isLinux = true; } keyMap = new KeyMapper()...
keyMap.addKeyChangeListener(this);
KeyMapper.addKeyChangeListener(this);
public KeyboardHandler(Session session) { this.session = session; this.screen = session.getScreen(); String os = System.getProperty("os.name"); if (os.toLowerCase().indexOf("linux") != -1) { System.out.println("using os " + os); isLinux = true; } keyMap = new KeyMapper()...
public final static String getKeyStrokeText(KeyEvent ke,boolean isAltGr) { if (!workStroke.equals(ke,isAltGr)) { workStroke.setAttributes(ke,isAltGr); lastKeyMnemonic = (String)mappedKeys.get(workStroke); } if (lastKeyMnemonic != null && lastKeyMnemonic.endsWith(".alt2")) { lastKeyMnemonic = lastKeyMnemonic.substring...
public final static String getKeyStrokeText(KeyEvent ke) { return getKeyStrokeText(ke,false);
public final static String getKeyStrokeText(KeyEvent ke,boolean isAltGr) { if (!workStroke.equals(ke,isAltGr)) { workStroke.setAttributes(ke,isAltGr); lastKeyMnemonic = (String)mappedKeys.get(workStroke); } if (lastKeyMnemonic != null && lastKeyMnemonic.endsWith(".alt2")) { las...
public void executeMeMacro(String macro) {
public void executeMeMacro(ActionEvent ae) {
public void executeMeMacro(String macro) { Macronizer.invoke(macro,(Session)this); }
Macronizer.invoke(macro,(Session)this);
executeMeMacro(ae.getActionCommand());
public void executeMeMacro(String macro) { Macronizer.invoke(macro,(Session)this); }
public void setLocationRelativeTo (Component c) { if (c == null || !c.isShowing ())
public void setLocationRelativeTo(Component c)
public void setLocationRelativeTo (Component c) { if (c == null || !c.isShowing ()) { int x = 0; int y = 0; GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment (); Point center = ge.getCenterPoint (); x = center.x - (width / 2); y = center.y - (h...
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment (); Point center = ge.getCenterPoint ();
if (c == null || !c.isShowing()) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); Point center = ge.getCenterPoint();
public void setLocationRelativeTo (Component c) { if (c == null || !c.isShowing ()) { int x = 0; int y = 0; GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment (); Point center = ge.getCenterPoint (); x = center.x - (width / 2); y = center.y - (h...
setLocation (x, y);
public void setLocationRelativeTo (Component c) { if (c == null || !c.isShowing ()) { int x = 0; int y = 0; GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment (); Point center = ge.getCenterPoint (); x = center.x - (width / 2); y = center.y - (h...
int x = c.getX(); int y = c.getY();
public void setLocationRelativeTo (Component c) { if (c == null || !c.isShowing ()) { int x = 0; int y = 0; GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment (); Point center = ge.getCenterPoint (); x = center.x - (width / 2); y = center.y - (h...
else if (x < 0)
else if (x < 0 || (x - (width - cWidth) / 2) < 0)
public void setLocationRelativeTo (Component c) { if (c == null || !c.isShowing ()) { int x = 0; int y = 0; GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment (); Point center = ge.getCenterPoint (); x = center.x - (width / 2); y = center.y - (h...
}
public void setLocationRelativeTo (Component c) { if (c == null || !c.isShowing ()) { int x = 0; int y = 0; GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment (); Point center = ge.getCenterPoint (); x = center.x - (width / 2); y = center.y - (h...
if (front == null || back == null) throw new IllegalArgumentException();
public BufferCapabilities(ImageCapabilities front, ImageCapabilities back, FlipContents flip) { this.front = front; this.back = back; this.flip = flip; if (front == null || back == null) throw new IllegalArgumentException(); }
next_out = 0; next_in = oldQueue.length; } notify(); }
next_out = 0; next_in = oldQueue.length; } if (dispatchThread == null || !dispatchThread.isAlive()) { System.out .println("Start new dispatchThread old=" + dispatchThread); dispatchThread = new EventDispatchThread(this); dispatchThread.start(); } if (!isDispatchThread() || (evt.getID() == WindowEvent.WINDOW_CLOSE...
public synchronized void postEvent(AWTEvent evt) { if (evt == null) throw new NullPointerException(); if (next != null) { next.postEvent(evt); return; } /* Check for any events already on the queue with the same source and ID. */ int i = next_out; while (i != next_in) { AWTEvent...
return false;
boolean handled = handleEvent (e); if (!handled && getParent() != null) handled = getParent ().postEvent (e); return handled;
public boolean postEvent(Event e) { // XXX Add backward compatibility handling. return false; }
switch (evt.id) { case Event.KEY_ACTION: case Event.KEY_PRESS: return keyDown (evt, evt.key); case Event.KEY_ACTION_RELEASE: case Event.KEY_RELEASE: return keyUp (evt, evt.key); case Event.MOUSE_DOWN: return mouseDown (evt, evt.x, evt.y); case Event.MOUSE_UP: return mouseUp (evt, evt.x, evt.y); case Event.MOUSE_MOVE...
public boolean handleEvent(Event evt) { // XXX Add backward compatibility handling. return false; }
if (instance == null) instance = new MetalRadioButtonUI(); return instance;
return new MetalRadioButtonUI();
public static ComponentUI createUI(JComponent component) { if (instance == null) instance = new MetalRadioButtonUI(); return instance; }
MenuBarUI ui = ((MenuBarUI) UIManager.getUI(this)); setUI(ui);
setUI((MenuBarUI) UIManager.getUI(this));
public void updateUI() { MenuBarUI ui = ((MenuBarUI) UIManager.getUI(this)); setUI(ui); invalidate(); }
if (tokenizer.hasMoreTokens())
if (tokenizer.hasMoreTokens()) {
private static void parseKeyStrokes(Properties keystrokes) { String theStringList = ""; String theKey = ""; Enumeration ke = keystrokes.propertyNames(); while (ke.hasMoreElements()) { theKey = (String)ke.nextElement(); theStringList = keystrokes.getProperty(theKey); int x ...
mappedKeys.put(new KeyStroker(kc, is, ic, ia, iag),theKey);
if (tokenizer.hasMoreTokens()) { location = Integer.parseInt(tokenizer.nextToken()); } } mappedKeys.put(newKeyStroker(kc, is, ic, ia, iag,location),theKey);
private static void parseKeyStrokes(Properties keystrokes) { String theStringList = ""; String theKey = ""; Enumeration ke = keystrokes.propertyNames(); while (ke.hasMoreElements()) { theKey = (String)ke.nextElement(); theStringList = keystrokes.getProperty(theKey); int x ...
usingDefaults = true;
public String getConfigurationResource() { if (configurationResource == null || configurationResource == "") { configurationResource = "TN5250JDefaults.props"; } return configurationResource; }
getConfigurationResource());
getConfigurationResource(),true, "Default Settings");
private void loadDefaults() { try { sesProps = ConfigureFactory.getInstance().getProperties( "dfltSessionProps", getConfigurationResource()); if (sesProps.size() == 0) { Properties schemaProps = new Properties(); ...
keepTrucking = false;
public final boolean disconnect() { if (me != null && me.isAlive()) { me.interrupt(); pthread.interrupt(); } screen52.setStatus(screen52.STATUS_SYSTEM,screen52.STATUS_VALUE_ON,"X - Disconnected"); screen52.setKeyboardLocked(false); try { if (bin != null) bi...
boolean keepTrucking = true;
public void run () { boolean keepTrucking = true; while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; ...
if (axisId != null) { if (AxisObj.containsKey(axisId)) Log.warnln("More than one axis node with axisId=\""+axisId+"\", using latest node." ); AxisObj.put(axisId, newaxis); }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // create new object appropriately Axis newaxis = new Axis(); newaxis.setXMLAttributes(attrs); // set XML attributes from passed list // Every axis must have *either* axisId *or* an axisIdRef //...
newaxis.setAxisId(findUniqueIdName(AxisObj,newaxis.getAxisId()));
newaxis.setAxisId(findUniqueIdName(AxisObj,newaxis.getAxisId(), AxisAliasId));
public Object action (SaxDocumentHandler handler, Attributes attrs) { // create new object appropriately Axis newaxis = new Axis(); newaxis.setXMLAttributes(attrs); // set XML attributes from passed list // Every axis must have *either* axisId *or* an axisIdRef //...
} if (axisId != null) { if (AxisObj.containsKey(axisId)) Log.warnln("More than one axis node with axisId=\""+axisId+"\", using latest node." ); AxisObj.put(axisId, newaxis);
public Object action (SaxDocumentHandler handler, Attributes attrs) { // create new object appropriately Axis newaxis = new Axis(); newaxis.setXMLAttributes(attrs); // set XML attributes from passed list // Every axis must have *either* axisId *or* an axisIdRef //...
formatObj.setIOAxesOrder(AxisReadOrder);
public void action (SaxDocumentHandler handler) { // we stopped reading datanode, lower count by one DataNodeLevel--; // we might still be nested within a data node // if so, return now to accumulate more data within the DATABLOCK if(DataNodeLevel != 0) ...
newfieldaxis.setAxisId(findUniqueIdName(AxisObj, newfieldaxis.getAxisId()));
newfieldaxis.setAxisId(findUniqueIdName(AxisObj, newfieldaxis.getAxisId(), AxisAliasId));
public Object action (SaxDocumentHandler handler, Attributes attrs) { // create new object appropriately FieldAxis newfieldaxis = new FieldAxis(); newfieldaxis.setXMLAttributes(attrs); // set XML attributes from passed list // Every axis must have *either* axisId *or* an axi...
if (AxisReadOrder.size() > 0) { readObj.setIOAxesOrder(AxisReadOrder); }
public void action (SaxDocumentHandler handler) { // obtain the current XMLDataIOStyle Object XMLDataIOStyle readObj = CurrentArray.getXMLDataIOStyle(); // initialization for XDF::Reader specific internal GLOBALS if ( (readObj instanceof TaggedXMLDataIOStyle) ) { ...
ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.ha...
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAt...
/*
private void addDataToCurrentArray ( Locator dataLocator, String thisString, DataFormat CurrentDataFormat, int intRadix ) {/*Log.debug("Add Data:["+thi...
*/
private void addDataToCurrentArray ( Locator dataLocator, String thisString, DataFormat CurrentDataFormat, int intRadix ) {/*Log.debug("Add Data:["+thi...
public String findUniqueIdName( Hashtable list, String baseIdName) {
public String findUniqueIdName( Hashtable idTable, String baseIdName) {
public String findUniqueIdName( Hashtable list, String baseIdName) { StringBuffer testName = new StringBuffer(baseIdName); while (list.containsKey(testName.toString())) { testName.append("0"); // isnt there something better to append here?? } return testName.toString(); }
while (list.containsKey(testName.toString())) {
while (idTable.containsKey(testName.toString())) {
public String findUniqueIdName( Hashtable list, String baseIdName) { StringBuffer testName = new StringBuffer(baseIdName); while (list.containsKey(testName.toString())) { testName.append("0"); // isnt there something better to append here?? } return testName.toString(); }
buttons.addElement(b);
else b.setSelected(false); } buttons.addElement(b);
public void add(AbstractButton b) { b.getModel().setGroup(this); if (b.isSelected()) sel = b.getModel(); buttons.addElement(b); }
if (runCount > tabRuns.length) expandTabRunsArray();
protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i...
if (runCount > tabRuns.length) expandTabRunsArray();
protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i...
if (tabCount > runCount) runCount = tabCount;
protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); boolean isScroll = tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT; // Please note: the ordering of the painting is important. // we WANT to pai...
if (pendingInsert) {
if (pendingInsert && homePos > 0) {
public void goHome() { // now we try to move to first input field according to // 14.6 WRITE TO DISPLAY Command // If the WTD command is valid, after the command is processed, // the cursor moves to one of three locations: // - The location set by an insert cursor order (un...
restriction = new Rectangle(0,0);
void jbInit() throws Exception { if (!appProps.containsKey("font")) { font = new Font("dialoginput",Font.BOLD,14); appProps.setProperty("font","dialoginput"); } else { font = new Font(getStringProperty("font"),Font.PLAIN,14); } gui.setFont(font); lastAttr = 32; ...
if (resetAttr)
if (resetAttr) {
public void propertyChange(PropertyChangeEvent pce) { String pn = pce.getPropertyName(); boolean resetAttr = false; if (pn.equals("colorBg")) { colorBg = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorBlue")) { colorBlue = (Color)pce.getNewValue(); ...
bi.drawOIA(fmWidth,fmHeight,numRows,numCols,font,colorBg,colorBlue); }
public void propertyChange(PropertyChangeEvent pce) { String pn = pce.getPropertyName(); boolean resetAttr = false; if (pn.equals("colorBg")) { colorBg = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorBlue")) { colorBlue = (Color)pce.getNewValue(); ...
goto_XY(icX,icY);
public void setPendingInsert(boolean flag, int icX, int icY) { pendingInsert = flag; if (pendingInsert) { homePos = getPos(icX,icY); } }
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.setCu...
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 : ...
ClassLoader cl = VMSecurityManager.currentClassLoader(); return cl != null ? cl.getPackage(name) : null;
ClassLoader cl = VMStackWalker.getCallingClassLoader(); return cl != null ? cl.getPackage(name) : VMClassLoader.getPackage(name);
public static Package getPackage(String name) { // Get the caller's classloader ClassLoader cl = VMSecurityManager.currentClassLoader(); return cl != null ? cl.getPackage(name) : null; }
Class c = VMSecurityManager.getClassContext()[1]; ClassLoader cl = c.getClassLoader(); return cl != null ? cl.getPackages() : new Package[0];
ClassLoader cl = VMStackWalker.getCallingClassLoader(); return cl != null ? cl.getPackages() : VMClassLoader.getPackages();
public static Package[] getPackages() { // Get the caller's classloader Class c = VMSecurityManager.getClassContext()[1]; ClassLoader cl = c.getClassLoader(); // Sun's implementation returns the packages loaded by the bootstrap // classloader if cl is null, but right now our bootstrap classloader // does not...
breaker.setText(s.toString());
breaker.setText(s);
public static final int getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) { int mark = Utilities.getTabbedTextOffset(s, metrics, x0, x, e, startOffset); BreakIterator breaker = Brea...
if (Math.abs(offsX-x) < Math.abs(offsXNext-x))
if (Math.abs(offsX-x) <= Math.abs(offsXNext-x))
public static final int getPositionAbove(JTextComponent c, int offset, int x) throws BadLocationException { int offs = getRowStart(c, offset); if(offs == -1) return -1; // Effectively calculates the y value of the previous line. Point pt = c.modelToView(offs-1).getLocation(); pt.x = x;...
if (Math.abs(offsX-x) < Math.abs(offsXNext-x))
if (Math.abs(offsX-x) <= Math.abs(offsXNext-x))
public static final int getPositionBelow(JTextComponent c, int offset, int x) throws BadLocationException { int offs = getRowEnd(c, offset); if(offs == -1) return -1; // Effectively calculates the y value of the previous line. Point pt = c.modelToView(offs+1).getLocation(); pt.x = x; ...
System.out.println(tFile.substring(0,memberOffset));
protected boolean getFileInfo(String tFile, boolean useInternal) { int memberOffset = tFile.indexOf("."); String file2 = null; String member2 = null; if (memberOffset > 0) { System.out.println(tFile.substring(0,memberOffset)); file2 = tFile.substring(0,memberOffset); membe...
if (member == null && fileSize == 0) { fileSize = packed2int(abyte0,345,5); status.setFileLength(fileSize); member = sb.toString(); } else { if (sb.toString().equalsIgnoreCase(member)) { fileSize = packed2int(abyte0,345,5); status.setFileLength(fileSize);
members.add(new MemberInfo(sb.toString(),packed2int(abyte0,345,5)));
private boolean getMbrSize(String member) { boolean flag = true; if(ftpOutputStream == null) { printFTPInfo("Not connected to any server!"); return false; } if(!loggedIn) { printFTPInfo("Login was not successful! Aborting!"); return false; } Socket socket...
} else { fileSize = packed2int(abyte0,345,5); status.setFileLength(fileSize); } }
private boolean getMbrSize(String member) { boolean flag = true; if(ftpOutputStream == null) { printFTPInfo("Not connected to any server!"); return false; } if(!loggedIn) { printFTPInfo("Login was not successful! Aborting!"); return false; } Socket socket...
SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkAccept(impl.getInetAddress().getHostAddress(), impl.getLocalPort());
public Socket accept() throws IOException { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkAccept(impl.getInetAddress().getHostAddress(), impl.getLocalPort()); Socket socket = new Socket(); try { implAccept(socket); } catch (IOException e) ...
public Gui5250(SessionConfig config) { propFileName = config.getConfigurationResource(); sesConfig = config; enableEvents(AWTEvent.WINDOW_EVENT_MASK | AWTEvent.KEY_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); }
public Gui5250 () {
public Gui5250(SessionConfig config) { propFileName = config.getConfigurationResource(); sesConfig = config; enableEvents(AWTEvent.WINDOW_EVENT_MASK | AWTEvent.KEY_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } }
public Bus(Bus parent) { this.parent = parent; this.parentDevice = null;
Bus() { this.parent = null; this.parentDevice = null;
public Bus(Bus parent) { this.parent = parent; this.parentDevice = null; }
public DeviceException(String s) { super(s);
public DeviceException() { super();
public DeviceException(String s) { super(s); }
private FloatItem(int kind, Register reg, int offsetToFP, float value) { super(kind, reg, offsetToFP); this.value = value;
FloatItem(ItemFactory factory) { super(factory);
private FloatItem(int kind, Register reg, int offsetToFP, float value) { super(kind, reg, offsetToFP); this.value = value; }
return createConst(getValue());
return factory.createFConst(getValue());
protected WordItem cloneConstant() { return createConst(getValue()); }
simulateMnemonic(getMnemonicValue(text));
public void sendKeys(String text) { if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; } else { keysBuffered = true; if(bufferedKeys == null){ ...
Graphics2D g2d = getWritingArea();
public void setStatus(byte attr,byte value,String s) { Graphics2D g2d = getWritingArea(); statusString = s; if (g2d == null) return; try { g2d.setColor(colorBg); g2d.fill(sArea); float Y = ((int)sArea.getY() + fmHeight)- (lm.getLeading() + lm.getDescent()); ...
if (g2d == null) return; try { g2d.setColor(colorBg); g2d.fill(sArea);
bi.setStatus(attr,value,s, fmWidth, fmHeight, lm, font, colorBg, colorRed, colorWhite);
public void setStatus(byte attr,byte value,String s) { Graphics2D g2d = getWritingArea(); statusString = s; if (g2d == null) return; try { g2d.setColor(colorBg); g2d.fill(sArea); float Y = ((int)sArea.getY() + fmHeight)- (lm.getLeading() + lm.getDescent()); ...
float Y = ((int)sArea.getY() + fmHeight)- (lm.getLeading() + lm.getDescent()); switch (attr) {
switch (attr) {
public void setStatus(byte attr,byte value,String s) { Graphics2D g2d = getWritingArea(); statusString = s; if (g2d == null) return; try { g2d.setColor(colorBg); g2d.fill(sArea); float Y = ((int)sArea.getY() + fmHeight)- (lm.getLeading() + lm.getDescent()); ...
case STATUS_SYSTEM: if (value == STATUS_VALUE_ON) { statusXSystem =true; g2d.setColor(colorWhite);
case STATUS_SYSTEM: if (value == STATUS_VALUE_ON) { statusXSystem =true; } else statusXSystem = false; break;
public void setStatus(byte attr,byte value,String s) { Graphics2D g2d = getWritingArea(); statusString = s; if (g2d == null) return; try { g2d.setColor(colorBg); g2d.fill(sArea); float Y = ((int)sArea.getY() + fmHeight)- (lm.getLeading() + lm.getDescent()); ...
if (s != null) g2d.drawString(s,(float)sArea.getX(),Y); else g2d.drawString(xSystem,(float)sArea.getX(),Y); } else statusXSystem = false; break; case STATUS_ERROR_CODE: if (value == STATUS_VALUE_ON) { g2d.setColor(colorRed); if (s != null) g2d.drawString(s,(float)sArea.getX(),Y); else g2d.drawString(xError,(float)sAre...
case STATUS_ERROR_CODE: if (value == STATUS_VALUE_ON) { statusErrorCode = true; setKeyboardLocked(true); Toolkit.getDefaultToolkit().beep(); } else { statusErrorCode = false; setKeyboardLocked(false); homePos = saveHomePos; saveHomePos = 0; pendingInsert = false; } break;
public void setStatus(byte attr,byte value,String s) { Graphics2D g2d = getWritingArea(); statusString = s; if (g2d == null) return; try { g2d.setColor(colorBg); g2d.fill(sArea); float Y = ((int)sArea.getY() + fmHeight)- (lm.getLeading() + lm.getDescent()); ...
updateImage(sArea.getBounds());
public void setStatus(byte attr,byte value,String s) { Graphics2D g2d = getWritingArea(); statusString = s; if (g2d == null) return; try { g2d.setColor(colorBg); g2d.fill(sArea); float Y = ((int)sArea.getY() + fmHeight)- (lm.getLeading() + lm.getDescent()); ...
protected void resolve()
protected void resolve(PluginRegistryModel registry)
protected void resolve() throws PluginException { if (getDeclaringPluginDescriptor().getPluginRegistry().getPluginDescriptor(plugin) == null) { throw new PluginException("Unknown plugin " + plugin + " in import of " + getDeclaringPluginDescriptor().getId()); } }
if (getDeclaringPluginDescriptor().getPluginRegistry().getPluginDescriptor(plugin) == null) {
if (registry.getPluginDescriptor(plugin) == null) {
protected void resolve() throws PluginException { if (getDeclaringPluginDescriptor().getPluginRegistry().getPluginDescriptor(plugin) == null) { throw new PluginException("Unknown plugin " + plugin + " in import of " + getDeclaringPluginDescriptor().getId()); } }
protected void unresolve() throws PluginException {
protected void unresolve(PluginRegistryModel registry) throws PluginException {
protected void unresolve() throws PluginException { // Nothing to do }
int value = layoutManager.getInitialLocation(jc.getInsets()); if (layoutManager.components[0] != null) value += layoutManager.minimumSizeOfComponent(0);
int value = layoutManager.getInitialLocation(jc.getInsets()) - layoutManager.getAvailableSize(jc.getSize(), jc.getInsets()) + splitPane.getDividerSize(); if (layoutManager.components[1] != null) value += layoutManager.minimumSizeOfComponent(1);
public int getMinimumDividerLocation(JSplitPane jc) { int value = layoutManager.getInitialLocation(jc.getInsets()); if (layoutManager.components[0] != null) value += layoutManager.minimumSizeOfComponent(0); return value; }
Hashtable table;
String property;
public static String getLocalizedString(Locale inLocale, String key, String name, boolean checkEnglish, boolean checkRoot) { String localizedString; Hashtable table; if (key.equals("")) return ""; /* Localize to inLocale */ try { table = (Hashtable) ResourceBundle.getBun...
table = (Hashtable)
localizedString =
public static String getLocalizedString(Locale inLocale, String key, String name, boolean checkEnglish, boolean checkRoot) { String localizedString; Hashtable table; if (key.equals("")) return ""; /* Localize to inLocale */ try { table = (Hashtable) ResourceBundle.getBun...
inLocale).getObject(name); localizedString = (String) table.get(key);
inLocale).getString(property);
public static String getLocalizedString(Locale inLocale, String key, String name, boolean checkEnglish, boolean checkRoot) { String localizedString; Hashtable table; if (key.equals("")) return ""; /* Localize to inLocale */ try { table = (Hashtable) ResourceBundle.getBun...
table = (Hashtable) bundle.getObject(name); localizedString = (String) table.get(key);
localizedString = bundle.getString(property);
public static String getLocalizedString(Locale inLocale, String key, String name, boolean checkEnglish, boolean checkRoot) { String localizedString; Hashtable table; if (key.equals("")) return ""; /* Localize to inLocale */ try { table = (Hashtable) ResourceBundle.getBun...
Locale.ENGLISH).getObject(name); localizedString= (String) table.get(key);
Locale.ENGLISH).getString(property);
public static String getLocalizedString(Locale inLocale, String key, String name, boolean checkEnglish, boolean checkRoot) { String localizedString; Hashtable table; if (key.equals("")) return ""; /* Localize to inLocale */ try { table = (Hashtable) ResourceBundle.getBun...
new Locale("","","")).getObject(name); localizedString= (String) table.get(key);
new Locale("","","") ).getString(property);
public static String getLocalizedString(Locale inLocale, String key, String name, boolean checkEnglish, boolean checkRoot) { String localizedString; Hashtable table; if (key.equals("")) return ""; /* Localize to inLocale */ try { table = (Hashtable) ResourceBundle.getBun...
Map.Entry e = (Map.Entry) it.next();
Map.Entry e = (Map.Entry) it2.next();
private void encodeDer() { ArrayList name = new ArrayList(components.size()); for (Iterator it = components.iterator(); it.hasNext(); ) { Map m = (Map) it.next(); if (m.isEmpty()) continue; Set rdn = new HashSet(); for (Iterator it2 = m.entrySet().iterator(); it2.hasNe...
if (sep == -1) break;
private void parseString(String str) throws IOException { Reader in = new StringReader(str); while (true) { String key = readAttributeType(in); if (key == null) break; String value = readAttributeValue(in); putComponent(key, value); if (sep == ',') newR...
throw new EOFException();
throw new EOFException("partial name read: " + buf);
private String readAttributeType(Reader in) throws IOException { StringBuffer buf = new StringBuffer(); int ch; while ((ch = in.read()) != '=') { if (ch == -1) { if (buf.length() > 0) throw new EOFException(); return null; } if (ch > 12...
throw new EOFException();
sep = -1; return buf.toString ();
private String readAttributeValue(Reader in) throws IOException { StringBuffer buf = new StringBuffer(); int ch = in.read(); if (ch == '#') { while (true) { ch = in.read(); if (('a' <= ch && ch <= 'f') || ('A' <= ch && ch <= 'F') || Character.isDigit...
ch = in.read ();
private String readAttributeValue(Reader in) throws IOException { StringBuffer buf = new StringBuffer(); int ch = in.read(); if (ch == '#') { while (true) { ch = in.read(); if (('a' <= ch && ch <= 'f') || ('A' <= ch && ch <= 'F') || Character.isDigit...