rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
return false; | else return false; | public boolean hasMemberObj (Object obj) { if (obj!=null) { if (memberObjHash.contains(obj)) { return true; } else return false; } return false; } |
if (obj!=null) { if (memberObjHash.contains(obj)) { memberObjHash.remove(obj); return obj; } else return null; | if (memberObjHash.contains(obj)) { memberObjHash.remove(obj); return obj; | public Object removeMemberObject (Object obj) { if (obj!=null) { if (memberObjHash.contains(obj)) { memberObjHash.remove(obj); return obj; } else return null; } else return null; } |
throw new Error("not implemented"); | if (GraphicsEnvironment.isHeadless ()) throw new AWTException ("Robot: headless graphics environment"); SecurityManager sm = System.getSecurityManager (); if (sm != null) sm.checkPermission (new AWTPermission ("createRobot")); ClasspathToolkit tk = (ClasspathToolkit) Toolkit.getDefaultToolkit (); peer = tk.createRo... | public Robot() throws AWTException { throw new Error("not implemented"); } |
public BufferedImage createScreenCapture(Rectangle screen) | public BufferedImage createScreenCapture (Rectangle screenRect) | public BufferedImage createScreenCapture(Rectangle screen) { return null; } |
return null; | if (screenRect.width <= 0) throw new IllegalArgumentException ("Robot: capture width is <= 0"); if (screenRect.height <= 0) throw new IllegalArgumentException ("Robot: capture height is <= 0"); SecurityManager sm = System.getSecurityManager (); if (sm != null) sm.checkPermission (new AWTPermission ("readDisplayPixels... | public BufferedImage createScreenCapture(Rectangle screen) { return null; } |
throw new IllegalArgumentException(); | throw new IllegalArgumentException ("Robot: delay length out-of-bounds"); try { Thread.sleep (ms); } catch (InterruptedException e) { System.err.println ("Robot: delay interrupted"); } | public void delay(int ms) { if (ms < 0 || ms > 60000) throw new IllegalArgumentException(); } |
return null; | return new Color (peer.getRGBPixel (x, y)); | public Color getPixelColor(int x, int y) { return null; } |
peer.keyPress (keycode); if (waitForIdle) waitForIdle (); if (autoDelay > 0) delay (autoDelay); | public void keyPress(int keycode) { } | |
peer.keyRelease (keycode); if (waitForIdle) waitForIdle (); if (autoDelay > 0) delay (autoDelay); | public void keyRelease(int keycode) { } | |
peer.mouseMove (x, y); if (waitForIdle) waitForIdle (); if (autoDelay > 0) delay (autoDelay); | public void mouseMove(int x, int y) { } | |
if ((buttons & InputEvent.BUTTON1_MASK) == 0 && (buttons & InputEvent.BUTTON2_MASK) == 0 && (buttons & InputEvent.BUTTON3_MASK) == 0) throw new IllegalArgumentException ("Robot: mousePress:" + " invalid button mask"); peer.mousePress (buttons); if (waitForIdle) waitForIdle (); if (autoDelay > 0) delay (autoDelay); | public void mousePress(int buttons) { } | |
if ((buttons & InputEvent.BUTTON1_MASK) == 0 && (buttons & InputEvent.BUTTON2_MASK) == 0 && (buttons & InputEvent.BUTTON3_MASK) == 0) throw new IllegalArgumentException ("Robot: mouseRelease:" + " invalid button mask"); peer.mouseRelease (buttons); if (waitForIdle) waitForIdle (); if (autoDelay > 0) delay (autoDelay... | public void mouseRelease(int buttons) { } | |
peer.mouseWheel (wheelAmt); if (waitForIdle) waitForIdle (); if (autoDelay > 0) delay (autoDelay); | public void mouseWheel(int wheelAmt) { } | |
if (ms < 0 || ms > 60000) throw new IllegalArgumentException(); | if (ms <= 0 || ms >= 60000) throw new IllegalArgumentException ("Robot: delay length out-of-bounds"); | public void setAutoDelay(int ms) { if (ms < 0 || ms > 60000) throw new IllegalArgumentException(); autoDelay = ms; } |
public void setAutoWaitForIdle(boolean value) | public void setAutoWaitForIdle (boolean isOn) | public void setAutoWaitForIdle(boolean value) { waitForIdle = value; } |
waitForIdle = value; | waitForIdle = isOn; | public void setAutoWaitForIdle(boolean value) { waitForIdle = value; } |
return "unimplemented"; | return getClass ().getName () + "[ autoDelay = " + autoDelay + ", autoWaitForIdle = " + waitForIdle + " ]"; | public String toString() { return "unimplemented"; } |
if (EventQueue.isDispatchThread ()) throw new IllegalThreadStateException ("Robot: waitForIdle called from " + "the event dispatch thread"); EventQueue q = Toolkit.getDefaultToolkit ().getSystemEventQueue (); while (q.peekEvent () != null) { try { wait (); } catch (InterruptedException e) { System.err.println ("Robot... | public void waitForIdle() { } | |
return t_fixed; | return new fixedTypeCode(value); | public TypeCode _type() { return t_fixed; } |
vmClass.link(); | public static Object allocObject(VmType<?> vmClass, int size) throws UninterruptiblePragma { vmClass.link(); // Screen.debug("ao cls{"); // Screen.debug(vmClass.getName()); VmHeapManager hm = heapManager; if (hm == null) { heapManager = hm = Vm.getHeapManager... | |
Object result; | final Object result; | public static Object allocObject(VmType<?> vmClass, int size) throws UninterruptiblePragma { vmClass.link(); // Screen.debug("ao cls{"); // Screen.debug(vmClass.getName()); VmHeapManager hm = heapManager; if (hm == null) { heapManager = hm = Vm.getHeapManager... |
int selectedRow = rowSM.getMinSelectionIndex(); connectKey = (String)ctm.getValueAt(selectedRow,0); saveProps(); setVisible(false); | doActionConnect(); | public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("DONE")) { saveProps(); setVisible(false); } if (e.getActionCommand().equals("ADD")) { Configure.doEntry((JFrame)getParent(),null,props); ctm.addSession(); } if (e.getActionCommand().... |
setResizable(false); | setResizable(true); | void jbInit() throws Exception { // make it non resizable setResizable(false); this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); // create some reusable borders and layouts Border etchedBorder = BorderFactory.createEtchedBorder(); BorderLayout borderLayout = new BorderLayout(); ... |
show(); | this.setVisible(true); | void jbInit() throws Exception { // make it non resizable setResizable(false); this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); // create some reusable borders and layouts Border etchedBorder = BorderFactory.createEtchedBorder(); BorderLayout borderLayout = new BorderLayout(); ... |
if (ctm.getRowCount() == 1) { sessions.getSelectionModel().setSelectionInterval( 0, 0); } | public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("DONE")) { saveProps(); setVisible(false); } if (e.getActionCommand().equals("ADD")) { Configure.doEntry((JFrame) getParent(), null, props); ctm.addSession(); } if (e.getActionCommand().equals("REMOVE")) { removeEntry(); edit... | |
+ " '"+ defaultFactoryClass +"'"); | + " '"+ defaultFactoryClass +"'", e); | private static PreferencesFactory getFactory() throws SecurityException { // First check for permission SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(prefsPermission); } // Get the factory if (factory == null) { ... |
public NodeReader(InputStream is, PreferencesFactory factory) { this(new InputStreamReader(is), factory); | public NodeReader(Reader r, PreferencesFactory factory) { if(r instanceof BufferedReader) { br = (BufferedReader) r; } else { br = new BufferedReader(r); } this.factory = factory; | public NodeReader(InputStream is, PreferencesFactory factory) { this(new InputStreamReader(is), factory); } |
PublicKey pubK = new DSSPublicKey(p, q, g, y); PrivateKey secK = new DSSPrivateKey(p, q, g, x); | PublicKey pubK = new DSSPublicKey(preferredFormat, p, q, g, y); PrivateKey secK = new DSSPrivateKey(preferredFormat, p, q, g, x); | public KeyPair generate() { if (p == null) { BigInteger[] params = new FIPS186(L, rnd).generateParameters(); seed = params[FIPS186.DSA_PARAMS_SEED]; counter = params[FIPS186.DSA_PARAMS_COUNTER]; q = params[FIPS186.DSA_PARAMS_Q]; p = params[FIPS186.DSA_PARAMS_P]; e = ... |
Integer formatID = (Integer) attributes.get(PREFERRED_ENCODING_FORMAT); preferredFormat = formatID == null ? DEFAULT_ENCODING_FORMAT : formatID.intValue(); | public void setup(Map attributes) { // find out the modulus length Integer l = (Integer) attributes.get(MODULUS_LENGTH); L = (l == null ? DEFAULT_MODULUS_LENGTH : l.intValue()); if ((L % 64) != 0 || L < 512 || L > 1024) throw new IllegalArgumentException(MODULUS_LENGTH); // should we use the defa... | |
int x = c.getMagicCaretPosition().x; | Point mcp = c.getMagicCaretPosition(); int x = (mcp != null) ? mcp.x : 0; | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { if (t != null) { Caret c = t.getCaret(); int x = c.getMagicCaretPosition().x; int pos = Utilities.getPositionAbove(t, ... |
int x = c.getMagicCaretPosition().x; | Point mcp = c.getMagicCaretPosition(); int x = (mcp != null) ? mcp.x : 0; | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { if (t != null) { Caret c = t.getCaret(); int x = c.getMagicCaretPosition().x; int pos = Utilities.getPositionBelow(t, ... |
int x = c.getMagicCaretPosition().x; | Point mcp = c.getMagicCaretPosition(); int x = (mcp != null) ? mcp.x : 0; | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { if (t != null) { Caret c = t.getCaret(); int x = c.getMagicCaretPosition().x; int pos = Utilities.getPositionAbove(t, ... |
int x = c.getMagicCaretPosition().x; | Point mcp = c.getMagicCaretPosition(); int x = (mcp != null) ? mcp.x : 0; | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { if (t != null) { Caret c = t.getCaret(); int x = c.getMagicCaretPosition().x; int pos = Utilities.getPositionBelow(t, ... |
if(offs > 0) | if(offs >= 0) | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { int offs = t.getCaretPosition() - 1; if(offs > 0) { Caret c = t.getCaret(); c.moveDot(offs); try { c.setM... |
scrollTimer = new Timer(200, null); | scrollTimer = new Timer(50, null); | public void installUI(JComponent c) { super.installUI(c); if (c instanceof JScrollBar) { scrollbar = (JScrollBar) c; trackRect = new Rectangle(); thumbRect = new Rectangle(); scrollTimer = new Timer(200, null); scrollTimer.setRepeats(true); installComponents(); installDefaults(); configureScrollBarColors(... |
} XMLDataIOStyle readObj = CurrentArray.getXMLDataIOStyle(); if (readObj instanceof FormattedXMLDataIOStyle) { Iterator citer = ((FormattedXMLDataIOStyle) readObj).getFormatCommands().iterator(); while (citer.hasNext()) { FormattedIOCmd currentIOCmd = (FormattedIOCmd) citer.next(); if (currentIOCmd instanceof SkipCha... | public Object action (SaxDocumentHandler handler, Attributes attrs) throws SAXException { // we only need to do these things for the first time we enter // a data node if (DataNodeLevel == 0) { // A little 'pre-handling' as href is a specialattribute ... | |
protected void changeState(int stateflag, boolean b) | private void changeState(int stateflag, boolean b) | protected void changeState(int stateflag, boolean b) { int oldstate = stateMask; int newstate; if (b) newstate = oldstate | stateflag; else newstate = oldstate & ~ stateflag; if (oldstate == newstate) return; if ((stateflag != SELECTED) && (stateflag != ENABLED) && (stateMas... |
public void fireActionPerformed(ActionEvent e) | protected void fireActionPerformed(ActionEvent e) | public void fireActionPerformed(ActionEvent e) { ActionListener[] ll = getActionListeners(); for (int i = 0; i < ll.length; i++) ll[i].actionPerformed(e); } |
public void fireItemStateChanged(ItemEvent e) | protected void fireItemStateChanged(ItemEvent e) | public void fireItemStateChanged(ItemEvent e) { ItemListener[] ll = getItemListeners(); for (int i = 0; i < ll.length; i++) ll[i].itemStateChanged(e); } |
public void fireStateChanged() | protected void fireStateChanged() | public void fireStateChanged() { ChangeListener[] ll = getChangeListeners(); for (int i = 0; i < ll.length; i++) ll[i].stateChanged(changeEvent); } |
this.operand1 = getOperand(varIndex1); | public BinaryQuad(int address, IRBasicBlock block, int lhsIndex, int varIndex1, int operation, int varIndex2) { super(address, block, lhsIndex); this.operand1 = getOperand(varIndex1); this.operation = operation; this.operand2 = getOperand(varIndex2); refs = new Operand[] { operand1, operand2 }; this.commutative... | |
this.operand2 = getOperand(varIndex2); refs = new Operand[] { operand1, operand2 }; | refs = new Operand[] { getOperand(varIndex1), getOperand(varIndex2) }; | public BinaryQuad(int address, IRBasicBlock block, int lhsIndex, int varIndex1, int operation, int varIndex2) { super(address, block, lhsIndex); this.operand1 = getOperand(varIndex1); this.operation = operation; this.operand2 = getOperand(varIndex2); refs = new Operand[] { operand1, operand2 }; this.commutative... |
operand1 = operand1.simplify(); operand2 = operand2.simplify(); if (operand1 instanceof Variable) { Variable v = (Variable) operand1; | refs[0] = refs[0].simplify(); refs[1] = refs[1].simplify(); if (refs[0] instanceof Variable) { Variable v = (Variable) refs[0]; | public void doPass2(BootableHashMap liveVariables) { operand1 = operand1.simplify(); operand2 = operand2.simplify(); if (operand1 instanceof Variable) { Variable v = (Variable) operand1; v.setLastUseAddress(this.getAddress()); liveVariables.put(v, v); } if (operand2 instanceof Variable) { Variable v = (Va... |
if (operand2 instanceof Variable) { Variable v = (Variable) operand2; | if (refs[1] instanceof Variable) { Variable v = (Variable) refs[1]; | public void doPass2(BootableHashMap liveVariables) { operand1 = operand1.simplify(); operand2 = operand2.simplify(); if (operand1 instanceof Variable) { Variable v = (Variable) operand1; v.setLastUseAddress(this.getAddress()); liveVariables.put(v, v); } if (operand2 instanceof Variable) { Variable v = (Va... |
if (operand1 instanceof Constant && operand2 instanceof Constant) { Constant c1 = (Constant) operand1; Constant c2 = (Constant) operand2; | if (refs[0] instanceof Constant && refs[1] instanceof Constant) { Constant c1 = (Constant) refs[0]; Constant c2 = (Constant) refs[1]; | public Quad foldConstants() { if (operand1 instanceof Constant && operand2 instanceof Constant) { Constant c1 = (Constant) operand1; Constant c2 = (Constant) operand2; switch (operation) { case IADD: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), ... |
int op1Mode = operand1.getAddressingMode(); int op2Mode = operand2.getAddressingMode(); | int op1Mode = refs[0].getAddressingMode(); int op2Mode = refs[1].getAddressingMode(); | public void generateCode(CodeGenerator cg) { cg.checkLabel(getAddress()); Variable lhs = getLHS(); int lhsMode = lhs.getAddressingMode(); int op1Mode = operand1.getAddressingMode(); int op2Mode = operand2.getAddressingMode(); Object reg1 = null; if (lhsMode == Operand.MODE_REGISTER) { RegisterLocation r... |
Variable var = (Variable) operand1; | Variable var = (Variable) refs[0]; | public void generateCode(CodeGenerator cg) { cg.checkLabel(getAddress()); Variable lhs = getLHS(); int lhsMode = lhs.getAddressingMode(); int op1Mode = operand1.getAddressingMode(); int op2Mode = operand2.getAddressingMode(); Object reg1 = null; if (lhsMode == Operand.MODE_REGISTER) { RegisterLocation r... |
Variable var = (Variable) operand2; | Variable var = (Variable) refs[1]; | public void generateCode(CodeGenerator cg) { cg.checkLabel(getAddress()); Variable lhs = getLHS(); int lhsMode = lhs.getAddressingMode(); int op1Mode = operand1.getAddressingMode(); int op2Mode = operand2.getAddressingMode(); Object reg1 = null; if (lhsMode == Operand.MODE_REGISTER) { RegisterLocation r... |
c2 = (Constant) operand1; | c2 = (Constant) refs[0]; | public void generateCode(CodeGenerator cg) { cg.checkLabel(getAddress()); Variable lhs = getLHS(); int lhsMode = lhs.getAddressingMode(); int op1Mode = operand1.getAddressingMode(); int op2Mode = operand2.getAddressingMode(); Object reg1 = null; if (lhsMode == Operand.MODE_REGISTER) { RegisterLocation r... |
c3 = (Constant) operand2; | c3 = (Constant) refs[1]; | public void generateCode(CodeGenerator cg) { cg.checkLabel(getAddress()); Variable lhs = getLHS(); int lhsMode = lhs.getAddressingMode(); int op1Mode = operand1.getAddressingMode(); int op2Mode = operand2.getAddressingMode(); Object reg1 = null; if (lhsMode == Operand.MODE_REGISTER) { RegisterLocation r... |
operand1.toString() + " " + OP_MAP[operation - IADD] + " " + operand2.toString(); | refs[0].toString() + " " + OP_MAP[operation - IADD] + " " + refs[1].toString(); | public String toString() { return getAddress() + ": " + getLHS().toString() + " = " + operand1.toString() + " " + OP_MAP[operation - IADD] + " " + operand2.toString(); } |
CurrentArray = null; | public void action (SaxDocumentHandler handler) { // well, well, which array will we deal with here? // if an appendto is specified, then we will try to append this array // to the specified one, otherwise, the current array is added to // the current structure. Stri... | |
int thisInt = Integer.parseInt(thisString, intRadix); | int thisInt = 0; try { thisInt = Integer.parseInt(thisString, intRadix); } catch (NumberFormatException e) { if (thisString.startsWith("+")) { thisInt = Integer.parseInt(thisString.substring(1), intRadix); } else { throw e; } } | private void addDataToCurrentArray ( Locator dataLocator, String thisString, DataFormat CurrentDataFormat, int intRadix ) {/*// this stuff slows down t... |
endElementHandlerHashtable.put(XDFNodeName.STRUCTURE, new structureEndElementHandlerFunc()); | private void initEndHandlerHashtable () { endElementHandlerHashtable.put(XDFNodeName.ARRAY, new arrayEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.DATA, new dataEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.FIELDGROUP, new fieldGroupEndElementHandlerFu... | |
String prop = SystemProperties.getProperty("java.rmi.server.RMIClassLoaderSpi"); if ("default".equals(prop)) return null; Iterator it = ServiceFactory.lookupProviders(RMIClassLoaderSpi.class, null); if (it == null || ! it.hasNext()) | private static RMIClassLoaderSpi getProviderInstance() { // TODO: Do something more useful here. return null; } | |
return (RMIClassLoaderSpi) it.next(); | private static RMIClassLoaderSpi getProviderInstance() { // TODO: Do something more useful here. return null; } | |
return def; | if (settings.containsKey(key)) return settings.getProperty(key); else return def; | public String getProperty(String key, String def) { return def; } |
m.minor = Minor.Header; | public static void close(OutputStream socketStream) { try { Singleton.write(socketStream); socketStream.flush(); } catch (IOException ex) { MARSHAL m = new MARSHAL("Unable to flush the stream"); m.initCause(ex); throw m; } } | |
this.x = x; this.y = y; this.width = w; this.height = h; | this.x = (int) (x * units + 0.5f); this.y = (int) (y * units + 0.5f); this.width = (int) (w * units + 0.5f); this.height = (int) (h * units + 0.5f); | public MediaPrintableArea(float x, float y, float w, float h, int units) { if (x < 0.0f || y < 0.0f || w <= 0.0f || h <= 0.0f) throw new IllegalArgumentException(); this.x = x; this.y = y; this.width = w; this.height = h; } |
throw new IllegalArgumentException(); | throw new IllegalArgumentException("units may not be less than 1"); | public float getHeight(int units) { if (units < 1) throw new IllegalArgumentException(); return height * units; } |
return height * units; | return height / ((float)units); | public float getHeight(int units) { if (units < 1) throw new IllegalArgumentException(); return height * units; } |
throw new IllegalArgumentException(); | throw new IllegalArgumentException("units may not be less than 1"); | public float getWidth(int units) { if (units < 1) throw new IllegalArgumentException(); return width * units; } |
return width * units; | return width / ((float)units); | public float getWidth(int units) { if (units < 1) throw new IllegalArgumentException(); return width * units; } |
throw new IllegalArgumentException(); | throw new IllegalArgumentException("units may not be less than 1"); | public float getX(int units) { if (units < 1) throw new IllegalArgumentException(); return x * units; } |
return x * units; | return x / ((float)units); | public float getX(int units) { if (units < 1) throw new IllegalArgumentException(); return x * units; } |
throw new IllegalArgumentException(); | throw new IllegalArgumentException("units may not be less than 1"); | public float getY(int units) { if (units < 1) throw new IllegalArgumentException(); return y * units; } |
return y * units; | return y / ((float)units); | public float getY(int units) { if (units < 1) throw new IllegalArgumentException(); return y * units; } |
if (leaf) setLeafIcon(getLeafIcon()); else if (expanded) setOpenIcon(getOpenIcon()); else setClosedIcon(getClosedIcon()); | public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { this.selected = selected; this.hasFocus = hasFocus; if (leaf) setLeafIcon(getLeafIcon()); else if (expanded) setOpenIcon(getOp... | |
super.setForeground(getTextSelectionColor()); | setForeground(getTextSelectionColor()); | public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { this.selected = selected; this.hasFocus = hasFocus; if (leaf) setLeafIcon(getLeafIcon()); else if (expanded) setOpenIcon(getOp... |
super.setForeground(getTextNonSelectionColor()); | setForeground(getTextNonSelectionColor()); | public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { this.selected = selected; this.hasFocus = hasFocus; if (leaf) setLeafIcon(getLeafIcon()); else if (expanded) setOpenIcon(getOp... |
public boolean equals (Object obj) { if (!(obj instanceof VMID)) | public boolean equals(Object obj) | public boolean equals (Object obj) { if (!(obj instanceof VMID)) { return false; } VMID other = (VMID) obj; if (addr.length != other.addr.length) { return false; } for (int i = addr.length - 1; i >= 0; i--) { if (addr[i] != other.addr[i]) { ... |
return false; | if (obj instanceof VMID) { VMID other = (VMID) obj; return uid.equals(other.uid) && Arrays.equals(addr, other.addr); | public boolean equals (Object obj) { if (!(obj instanceof VMID)) { return false; } VMID other = (VMID) obj; if (addr.length != other.addr.length) { return false; } for (int i = addr.length - 1; i >= 0; i--) { if (addr[i] != other.addr[i]) { ... |
VMID other = (VMID) obj; if (addr.length != other.addr.length) { return false; } for (int i = addr.length - 1; i >= 0; i--) { if (addr[i] != other.addr[i]) { return false; } } return uid.equals(other.uid); | public boolean equals (Object obj) { if (!(obj instanceof VMID)) { return false; } VMID other = (VMID) obj; if (addr.length != other.addr.length) { return false; } for (int i = addr.length - 1; i >= 0; i--) { if (addr[i] != other.addr[i]) { ... | |
return super.hashCode(); } | if (hash==0) { for (int i = 0; i < localAddr.length; i++) hash += addr[i]; hash = hash ^ uid.hashCode(); } return hash; } | public int hashCode () { return super.hashCode(); } |
displayMessage("Internal frame closing", e); | public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... se... | |
displayMessage("Internal frame closed", e); | public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... se... | |
displayMessage("Internal frame opened", e); | public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... se... | |
displayMessage("Internal frame iconified", e); | public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... se... | |
displayMessage("Internal frame deiconified", e); | public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... se... | |
displayMessage("Internal frame activated", e); | activated = true; | public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... se... |
activated = false; | public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... se... | |
displayMessage("Internal frame activated", e); | activated = true; | public void internalFrameActivated(InternalFrameEvent e) { displayMessage("Internal frame activated", e); repaint(); } |
displayMessage("Internal frame closed", e); | public void internalFrameClosed(InternalFrameEvent e) { displayMessage("Internal frame closed", e); } | |
displayMessage("Internal frame closing", e); | public void internalFrameClosing(InternalFrameEvent e) { displayMessage("Internal frame closing", e); disconnectMe(); } | |
activated = false; | public void internalFrameDeactivated(InternalFrameEvent e) { displayMessage("Internal frame deactivated", e); } | |
displayMessage("Internal frame deiconified", e); | public void internalFrameDeiconified(InternalFrameEvent e) { displayMessage("Internal frame deiconified", e); } | |
displayMessage("Internal frame iconified", e); | public void internalFrameIconified(InternalFrameEvent e) { displayMessage("Internal frame iconified", e); } | |
displayMessage("Internal frame opened", e); | public void internalFrameOpened(InternalFrameEvent e) { displayMessage("Internal frame opened", e); } | |
selectedIndex = desktop.getComponentCount(); | public void addSessionView(String tabText,Session session) { MyInternalFrame frame = new MyInternalFrame(); frame.setVisible(true); desktop.add(frame); frame.setContentPane(session); try { frame.setSelected(true); } catch (java.beans.PropertyVetoException e) {} session.addS... | |
JInternalFrame[] frames = desktop.getAllFrames(); return (Session)frames[index].getContentPane(); | JInternalFrame[] frames = (JInternalFrame[])desktop.getAllFrames(); Session s = (Session)frames[index].getContentPane(); return s; | public Session getSessionAt( int index) { JInternalFrame[] frames = desktop.getAllFrames(); return (Session)frames[index].getContentPane(); } |
MyInternalFrame[] frames = (MyInternalFrame[])desktop.getAllFrames(); MyInternalFrame miv = (MyInternalFrame)desktop.getSelectedFrame(); | JInternalFrame[] frames = (JInternalFrame[])desktop.getAllFrames(); JInternalFrame miv = desktop.getSelectedFrame(); | private void nextSession() { MyInternalFrame[] frames = (MyInternalFrame[])desktop.getAllFrames(); MyInternalFrame miv = (MyInternalFrame)desktop.getSelectedFrame(); int index = desktop.getIndexOf(miv); if (index < desktop.getComponentCount() - 1) { try { frames[index + 1].setS... |
frames[index + 1].setSelected(true); | frames[index].setSelected(true); | private void nextSession() { MyInternalFrame[] frames = (MyInternalFrame[])desktop.getAllFrames(); MyInternalFrame miv = (MyInternalFrame)desktop.getSelectedFrame(); int index = desktop.getIndexOf(miv); if (index < desktop.getComponentCount() - 1) { try { frames[index + 1].setS... |
final int index = desktop.getIndexOf(ses); | final int index = getIndexOfSession(ses); | public void onSessionChanged(SessionChangeEvent changeEvent) { Session ses = (Session)changeEvent.getSource(); switch (changeEvent.getState()) { case STATE_CONNECTED: final String d = ses.getAllocDeviceName(); if (d != null) { System.out.println(changeEvent.getSt... |
frames[index].setTitle(d); | frames[index].setTitle(frames[index].getTitle() + " " + d); | public void onSessionChanged(SessionChangeEvent changeEvent) { Session ses = (Session)changeEvent.getSource(); switch (changeEvent.getState()) { case STATE_CONNECTED: final String d = ses.getAllocDeviceName(); if (d != null) { System.out.println(changeEvent.getSt... |
frames[index].setTitle(d); | frames[index].setTitle(frames[index].getTitle() + " " + d); | public void run() { JInternalFrame[] frames = desktop.getAllFrames(); frames[index].setTitle(d); } |
MyInternalFrame[] frames = (MyInternalFrame[])desktop.getAllFrames(); MyInternalFrame miv = (MyInternalFrame)desktop.getSelectedFrame(); int index = desktop.getIndexOf(miv); | JInternalFrame[] frames = (JInternalFrame[])desktop.getAllFrames(); JInternalFrame miv = (JInternalFrame)desktop.getSelectedFrame(); int index = selectedIndex; | private void prevSession() { MyInternalFrame[] frames = (MyInternalFrame[])desktop.getAllFrames(); MyInternalFrame miv = (MyInternalFrame)desktop.getSelectedFrame(); int index = desktop.getIndexOf(miv); if (index == 0) {// desktop.setSelectedFrame(frames[frames.length - 1]); try {... |
selectedIndex--; | private void prevSession() { MyInternalFrame[] frames = (MyInternalFrame[])desktop.getAllFrames(); MyInternalFrame miv = (MyInternalFrame)desktop.getSelectedFrame(); int index = desktop.getIndexOf(miv); if (index == 0) {// desktop.setSelectedFrame(frames[frames.length - 1]); try {... | |
MyInternalFrame[] frames = (MyInternalFrame[])desktop.getAllFrames(); int index = desktop.getIndexOf(targetSession); | int index = getIndexOfSession(targetSession); | public void removeSessionView(Session targetSession) { MyInternalFrame[] frames = (MyInternalFrame[])desktop.getAllFrames(); int index = desktop.getIndexOf(targetSession); System.out.println("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.... |
as400QueryP = new JPanel(); as400QueryP.setLayout(new BorderLayout()); queryStatement = new JTextArea(2, 40); JScrollPane scrollPane = new JScrollPane(queryStatement); queryStatement.setLineWrap(true); as400QueryP.add(scrollPane, BorderLayout.CENTER); | private void initXTFRInfo() { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); Border emptyBorder = BorderFactory.createEmptyBorder(10, 10, 0, 10); // main panel JPanel mp = new JPanel(); mp.setLayout(borderLayout); // system panel JPanel sp = new JPanel(); sp.setLay... | |
{ | public void setDragMode(int mode) { if ((mode != LIVE_DRAG_MODE) && (mode != OUTLINE_DRAG_MODE)) throw new IllegalArgumentException("Drag mode not valid."); // FIXME: Unsupported mode. if (mode == OUTLINE_DRAG_MODE) { // throw new IllegalArgumentException("Outline drag modes are unsupported... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.