rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
new BAD_OPERATION("Unable to activate", 0x5004,
new BAD_OPERATION("Unable to activate", Minor.Activation,
public InvokeHandler getHandler(String operation, CookieHolder cookie, boolean forwarding_allowed ) throws gnuForwardRequest { if (servant != null) { return servantToHandler(servant); } else { // Use servant locator to locate the servant. if (...
throw new BAD_OPERATION("Unable to activate", 0x5002,
throw new BAD_OPERATION("Unable to activate", Minor.Activation,
public InvokeHandler getHandler(String operation, CookieHolder cookie, boolean forwarding_allowed ) throws gnuForwardRequest { if (servant != null) { return servantToHandler(servant); } else { // Use servant locator to locate the servant. if (...
public boolean equals(Object obj) { if (obj instanceof ActivationGroupID) { ActivationGroupID that = (ActivationGroupID)obj; if (this.system.equals(that.system)) { return (true);
public boolean equals(Object obj) { if (obj instanceof ActivationGroupID) { ActivationGroupID that = (ActivationGroupID) obj; return system.equals(that.system);
public boolean equals(Object obj) { if (obj instanceof ActivationGroupID) { ActivationGroupID that = (ActivationGroupID)obj; if (this.system.equals(that.system)) { return (true); } } return (false);}
return (false); }
public boolean equals(Object obj) { if (obj instanceof ActivationGroupID) { ActivationGroupID that = (ActivationGroupID)obj; if (this.system.equals(that.system)) { return (true); } } return (false);}
public ActivationSystem getSystem() { return (system); }
public ActivationSystem getSystem() { return system; }
public ActivationSystem getSystem() { return (system);}
public int hashCode() { return (system.hashCode()); }
public int hashCode() { return system.hashCode(); }
public int hashCode() { return (system.hashCode());}
if (deviceName.getText() != null)
if (deviceName.getText() != null && !sdn.isSelected())
private static String toArgString() { StringBuffer sb = new StringBuffer(); sb.append(systemId.getText()); // port if (port.getText() != null) if (port.getText().trim().length() > 0) sb.append(" -p " + port.getText().trim()); if (fpn.getText() != null) if (fpn.getTe...
if (sdn.isSelected()) sb.append(" -dn=hostname");
private static String toArgString() { StringBuffer sb = new StringBuffer(); sb.append(systemId.getText()); // port if (port.getText() != null) if (port.getText().trim().length() > 0) sb.append(" -p " + port.getText().trim()); if (fpn.getText() != null) if (fpn.getTe...
bad.minor = Minor.Any;
public static AdapterAlreadyExists extract(Any any) { try { EmptyExceptionHolder h = (EmptyExceptionHolder) any.extract_Streamable(); return (AdapterAlreadyExists) h.value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("AdapterAlreadyExist...
return null;
if (accessibleContext == null) accessibleContext = new AccessibleJPanel(); return accessibleContext;
public AccessibleContext getAccessibleContext() { return null; }
throw new Error("Not implemented");
return RemoteServer.getClientHost();
public String getClientHost() throws ServerNotActiveException { throw new Error("Not implemented");}
public UnicastRef(ObjID objid) { this.objid = objid;
public UnicastRef() {
public UnicastRef(ObjID objid) { this.objid = objid;}
public static synchronized UnicastConnectionManager getInstance(int port, RMIServerSocketFactory ssf) { if (ssf == null) { ssf = defaultSocketFactory;
public static synchronized UnicastConnectionManager getInstance(String host, int port, RMIClientSocketFactory csf) { if (csf == null) { csf = defaultSocketFactory;
public static synchronized UnicastConnectionManager getInstance(int port, RMIServerSocketFactory ssf) {//System.out.println("getInstance: " + port + "," + ssf); if (ssf == null) { ssf = defaultSocketFactory; } TripleKey key = new TripleKey(localhost, port, ssf); UnicastConnectionManager man = (UnicastConnectionM...
TripleKey key = new TripleKey(localhost, port, ssf); UnicastConnectionManager man = (UnicastConnectionManager)servers.get(key);
try{ host = InetAddress.getByName(host).getHostAddress(); }catch(Exception _){} TripleKey key = new TripleKey(host, port, csf); UnicastConnectionManager man = (UnicastConnectionManager)clients.get(key);
public static synchronized UnicastConnectionManager getInstance(int port, RMIServerSocketFactory ssf) {//System.out.println("getInstance: " + port + "," + ssf); if (ssf == null) { ssf = defaultSocketFactory; } TripleKey key = new TripleKey(localhost, port, ssf); UnicastConnectionManager man = (UnicastConnectionM...
man = new UnicastConnectionManager(port, ssf);
man = new UnicastConnectionManager(host, port, csf);
public static synchronized UnicastConnectionManager getInstance(int port, RMIServerSocketFactory ssf) {//System.out.println("getInstance: " + port + "," + ssf); if (ssf == null) { ssf = defaultSocketFactory; } TripleKey key = new TripleKey(localhost, port, ssf); UnicastConnectionManager man = (UnicastConnectionM...
nsmanager++; System.out.println("\n\n ****** " + nsmanager + " server managers.\n\n");
ncmanager++; System.out.println("\n\n ====== " + ncmanager + " client managers.\n\n");
public static synchronized UnicastConnectionManager getInstance(int port, RMIServerSocketFactory ssf) {//System.out.println("getInstance: " + port + "," + ssf); if (ssf == null) { ssf = defaultSocketFactory; } TripleKey key = new TripleKey(localhost, port, ssf); UnicastConnectionManager man = (UnicastConnectionM...
key.port = man.serverPort; servers.put(key, man);
clients.put(key, man); UnicastConnectionManager svrman = (UnicastConnectionManager)servers.get(key); if(svrman != null){ man.serverobj = svrman.serverobj; }
public static synchronized UnicastConnectionManager getInstance(int port, RMIServerSocketFactory ssf) {//System.out.println("getInstance: " + port + "," + ssf); if (ssf == null) { ssf = defaultSocketFactory; } TripleKey key = new TripleKey(localhost, port, ssf); UnicastConnectionManager man = (UnicastConnectionM...
public GeneralSecurityException(String msg)
public GeneralSecurityException()
public GeneralSecurityException(String msg) { super(msg); }
super(msg);
public GeneralSecurityException(String msg) { super(msg); }
int sum = 0;
int i = 0; int pos = 0; boolean lengthWritten = false;
public final synchronized void writeUTF(String value) throws IOException { int len = value.length(); int sum = 0; for (int i = 0; i < len && sum <= 65535; ++i) { char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') sum += 1; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) sum +...
for (int i = 0; i < len && sum <= 65535; ++i)
if (buf == null) buf = new byte[512]; do
public final synchronized void writeUTF(String value) throws IOException { int len = value.length(); int sum = 0; for (int i = 0; i < len && sum <= 65535; ++i) { char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') sum += 1; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) sum +...
char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') sum += 1; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) sum += 2; else sum += 3; } if (sum > 65535) throw new UTFDataFormatException (); int pos = 0; byte[] buf = new byte[sum]; for (int i = 0; i < len; ++i) { char c = value.charAt(i);
while (i < len && pos < buf.length - 3) { char c = value.charAt(i++);
public final synchronized void writeUTF(String value) throws IOException { int len = value.length(); int sum = 0; for (int i = 0; i < len && sum <= 65535; ++i) { char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') sum += 1; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) sum +...
writeShort (sum); write(buf, 0, sum);
if (! lengthWritten) { if (i == len) writeShort(pos); else writeShort(getUTFlength(value, i, pos)); lengthWritten = true; } write(buf, 0, pos); pos = 0; } while (i < len);
public final synchronized void writeUTF(String value) throws IOException { int len = value.length(); int sum = 0; for (int i = 0; i < len && sum <= 65535; ++i) { char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') sum += 1; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) sum +...
if (m.getModel().isArmed() && (m.getParent() instanceof MenuElement || m.getModel().isPressed()))
if ((m.isSelected() && checkIcon == null) || m.getModel().isArmed() && (m.getParent() instanceof MenuElement))
protected void paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Rectangle tr = new Rectangle(); // text rectangle Rectangle ir = new R...
if (menuItem.getModel().isArmed() && (menuItem.getParent() instanceof MenuElement || menuItem.getModel().isPressed()))
if ((menuItem.isSelected() && checkIcon == null) || menuItem.getModel().isArmed() && (menuItem.getParent() instanceof MenuElement))
protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text) { Font f = menuItem.getFont(); g.setFont(f); FontMetrics fm = g.getFontMetrics(f); if (text != null && ! text.equals("")) { if (menuItem.isEnabled()) { /* Menu item...
KeyStroke[] bothKeys = new KeyStroke[superKeys.length + mapKeys.length]; for (int i = 0; i < superKeys.length; ++i)
int skl = 0; int mkl = 0; if (superKeys != null) skl = superKeys.length; if (mapKeys != null) mkl = mapKeys.length; KeyStroke[] bothKeys = new KeyStroke[skl + mkl]; for (int i = 0; i < skl; ++i)
public KeyStroke[] allKeys() { KeyStroke[] superKeys = super.allKeys(); KeyStroke[] mapKeys = map.getBoundKeyStrokes(); KeyStroke[] bothKeys = new KeyStroke[superKeys.length + mapKeys.length]; for (int i = 0; i < superKeys.length; ++i) bothKeys[i] = superKeys[i]; for (int i = 0; ...
for (int i = 0; i < mapKeys.length; ++i) bothKeys[i + superKeys.length] = mapKeys[i];
for (int i = 0; i < mkl; ++i) bothKeys[i + skl] = mapKeys[i];
public KeyStroke[] allKeys() { KeyStroke[] superKeys = super.allKeys(); KeyStroke[] mapKeys = map.getBoundKeyStrokes(); KeyStroke[] bothKeys = new KeyStroke[superKeys.length + mapKeys.length]; for (int i = 0; i < superKeys.length; ++i) bothKeys[i] = superKeys[i]; for (int i = 0; ...
boolean creatingKeymap = false;
public JTextComponent() { Keymap defkeymap = getKeymap(DEFAULT_KEYMAP); boolean creatingKeymap = false; if (defkeymap == null) { defkeymap = addKeymap(DEFAULT_KEYMAP, null); defkeymap.setDefaultAction(new DefaultEditorKit.DefaultKeyTypedAction()); creatingKeymap = true; } s...
creatingKeymap = true;
public JTextComponent() { Keymap defkeymap = getKeymap(DEFAULT_KEYMAP); boolean creatingKeymap = false; if (defkeymap == null) { defkeymap = addKeymap(DEFAULT_KEYMAP, null); defkeymap.setDefaultAction(new DefaultEditorKit.DefaultKeyTypedAction()); creatingKeymap = true; } s...
if (creatingKeymap) loadKeymap( defkeymap, new KeyBinding[] { new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), DefaultEditorKit.backwardAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), DefaultEditorKit.forwardAction), new KeyBinding(KeyStroke.getKeyStroke("typed \b"), DefaultEditorKit.de...
public JTextComponent() { Keymap defkeymap = getKeymap(DEFAULT_KEYMAP); boolean creatingKeymap = false; if (defkeymap == null) { defkeymap = addKeymap(DEFAULT_KEYMAP, null); defkeymap.setDefaultAction(new DefaultEditorKit.DefaultKeyTypedAction()); creatingKeymap = true; } s...
return "DERValue [ tag=" + tag + ", class=" + tagClass + ", constructed=" + constructed + ", value=" + value + " ]";
String start = "DERValue ( ["; if (tagClass == DER.UNIVERSAL) start = start + "UNIVERSAL "; else if (tagClass == DER.PRIVATE) start = start + "PRIVATE "; else if (tagClass == DER.APPLICATION) start = start + "APPLICATION "; start = start + tag + "] constructed=" + constructed + ", value="; if (constructed) start = star...
public String toString() { return "DERValue [ tag=" + tag + ", class=" + tagClass + ", constructed=" + constructed + ", value=" + value + " ]"; }
checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field");
DerUtil.checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(...
checkIsBigInteger(derVersion, "Wrong Version field");
DerUtil.checkIsBigInteger(derVersion, "Wrong Version field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(...
checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field");
DerUtil.checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(...
checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field");
DerUtil.checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(...
checkIsBigInteger(val, "Wrong RSAPrivateKey Version field");
DerUtil.checkIsBigInteger(val, "Wrong RSAPrivateKey Version field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(...
checkIsBigInteger(val, "Wrong modulus field");
DerUtil.checkIsBigInteger(val, "Wrong modulus field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(...
checkIsBigInteger(val, "Wrong publicExponent field");
DerUtil.checkIsBigInteger(val, "Wrong publicExponent field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(...
checkIsBigInteger(val, "Wrong privateExponent field");
DerUtil.checkIsBigInteger(val, "Wrong privateExponent field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(...
checkIsBigInteger(val, "Wrong prime1 field");
DerUtil.checkIsBigInteger(val, "Wrong prime1 field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(...
checkIsBigInteger(val, "Wrong prime2 field");
DerUtil.checkIsBigInteger(val, "Wrong prime2 field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(...
checkIsBigInteger(val, "Wrong exponent1 field");
DerUtil.checkIsBigInteger(val, "Wrong exponent1 field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(...
checkIsBigInteger(val, "Wrong exponent2 field");
DerUtil.checkIsBigInteger(val, "Wrong exponent2 field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(...
checkIsBigInteger(val, "Wrong coefficient field");
DerUtil.checkIsBigInteger(val, "Wrong coefficient field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(...
final VmNormalClass< ? > normalClass = (VmNormalClass) objectClass;
final VmNormalClass< ? > normalClass = (VmNormalClass<?>) objectClass;
public final Object clone(Cloneable object) { testInited(); final VmClassType< ? > objectClass = VmMagic.getObjectType(object); final Address objectPtr = ObjectReference.fromObject(object) .toAddress(); final int size; if (objectClass.isArray()) { final i...
cls.initialize();
public final Object newInstance(VmType< ? > cls) { // cls.link(); cls.initialize(); return newInstance(cls, ((VmNormalClass< ? >) cls).getObjectSize()); }
public NegativeArraySizeException(String s) { super(s);
public NegativeArraySizeException() {
public NegativeArraySizeException(String s) { super(s); }
public OutOfMemoryError() { super();
public OutOfMemoryError() {
public OutOfMemoryError() { super(); }
public HostArgument(String name, String description) { super(name, description);
public HostArgument(String name, String description, boolean multi) { super(name, description, multi);
public HostArgument(String name, String description) { super(name, description); }
editor.setBorder(new EmptyBorder(1, 1, 1, 1));
editor.setBorder(null); editor.setColumns(9);
public BasicComboBoxEditor() { editor = new JTextField(); editor.setBorder(new EmptyBorder(1, 1, 1, 1)); }
Window w = base.getAWTComponent(); if(w instanceof Frame){ MenuBar mb = ((Frame)w).getMenuBar(); if(mb != null){ JMenuBar jmb = ((SwingMenuBarPeer)mb.getPeer()).jComponent; Point p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, jmb); comp = SwingUtilities.getDeepestComponentAt(jmb, p.x, p.y); if(comp != nul...
if(base.isShowing()){ Window w = base.getAWTComponent(); if(w instanceof Frame){ MenuBar mb = ((Frame)w).getMenuBar(); if(mb != null){ JMenuBar jmb = ((SwingMenuBarPeer)mb.getPeer()).jComponent; Point p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, jmb); comp = SwingUtilities.getDeepestComponentAt(jmb, p.x...
public Component getTopComponentAt(int x, int y) { if(desktopFrame == null){ //no AWT yet, drop the event return null; } Component comp = desktopFrame.getDesktop().getComponentAt(x,y); if(comp instanceof SwingBaseWindow){ SwingBaseWindow base = (SwingBase...
} Point p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, w); comp = SwingUtilities.getDeepestComponentAt(w, p.x, p.y); if(comp == w){ p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, base); comp = SwingUtilities.getDeepestComponentAt(base, p.x, p.y);
Point p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, w); comp = SwingUtilities.getDeepestComponentAt(w, p.x, p.y); if(comp == w){ p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, base); comp = SwingUtilities.getDeepestComponentAt(base, p.x, p.y); }
public Component getTopComponentAt(int x, int y) { if(desktopFrame == null){ //no AWT yet, drop the event return null; } Component comp = desktopFrame.getDesktop().getComponentAt(x,y); if(comp instanceof SwingBaseWindow){ SwingBaseWindow base = (SwingBase...
double tx = (x - getCenterX()) / rx; double ty = (y - getCenterY()) / ry; return tx * tx + ty * ty <= 1.0;
double tx = (x - (getX() + rx)) / rx; double ty = (y - (getY() + ry)) / ry; return tx * tx + ty * ty < 1.0;
public boolean contains(double x, double y) { double rx = getWidth() / 2; double ry = getHeight() / 2; double tx = (x - getCenterX()) / rx; double ty = (y - getCenterY()) / ry; return tx * tx + ty * ty <= 1.0; }
Rectangle2D r = new Rectangle2D.Double(x, y, w, h); if (! r.intersects(getX(), getY(), getWidth(), getHeight())) return false; if (contains(x, y) || contains(x, y + h) || contains(x + w, y) || contains(x + w, y + h)) return true; Line2D l1 = new Line2D.Double(getX(), getY() + (getHeight() / 2), getX() + getWidth(), g...
public boolean intersects(double x, double y, double w, double h) { // fixme return false; }
dragging = true;
public void mouseDragged(MouseEvent e) { if (slider.isEnabled()) { currentMouseX = e.getX(); currentMouseY = e.getY(); if (slider.getValueIsAdjusting()) { int value; if (slider.getOrientation() == JSlider.HORIZONTAL) value = valueForXPosition(currentMouseX) - offset; e...
dragging = false;
public void mouseReleased(MouseEvent e) { if (slider.isEnabled()) { currentMouseX = e.getX(); currentMouseY = e.getY(); if (slider.getValueIsAdjusting()) { slider.setValueIsAdjusting(false); if (slider.getSnapToTicks()) slider.setValue(findClosestTick(slider.getValue()))...
return (value > slider.getValue());
return value > slider.getValue();
public boolean shouldScroll(int direction) { int value; if (slider.getOrientation() == JSlider.HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (direction == POSITIVE_SCROLL) return (value > slider.getValue()); else return (value < s...
return (value < slider.getValue());
return value < slider.getValue();
public boolean shouldScroll(int direction) { int value; if (slider.getOrientation() == JSlider.HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (direction == POSITIVE_SCROLL) return (value > slider.getValue()); else return (value < s...
labelRect.y = tickRect.y + tickRect.height;
labelRect.y = tickRect.y + tickRect.height - 1;
protected void calculateLabelRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { labelRect.x = contentRect.x; labelRect.y = tickRect.y + tickRect.height; labelRect.width = contentRect.width; labelRect.height = getHeightOfTallestLabel(); } else { labelRect.x = tickRect.x + tickRe...
labelRect.x = tickRect.x + tickRect.width;
if (slider.getPaintLabels()) { labelRect.x = tickRect.x + tickRect.width - 1;
protected void calculateLabelRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { labelRect.x = contentRect.x; labelRect.y = tickRect.y + tickRect.height; labelRect.width = contentRect.width; labelRect.height = getHeightOfTallestLabel(); } else { labelRect.x = tickRect.x + tickRe...
labelRect.width = getWidthOfWidestLabel();
protected void calculateLabelRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { labelRect.x = contentRect.x; labelRect.y = tickRect.y + tickRect.height; labelRect.width = contentRect.width; labelRect.height = getHeightOfTallestLabel(); } else { labelRect.x = tickRect.x + tickRe...
else { labelRect.x = tickRect.x + tickRect.width; labelRect.y = trackRect.y; labelRect.height = trackRect.height; } labelRect.width = getWidthOfWidestLabel(); }
protected void calculateLabelRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { labelRect.x = contentRect.x; labelRect.y = tickRect.y + tickRect.height; labelRect.width = contentRect.width; labelRect.height = getHeightOfTallestLabel(); } else { labelRect.x = tickRect.x + tickRe...
thumbRect.y = trackRect.y;
thumbRect.y = trackRect.y + 1;
protected void calculateThumbLocation() { int value = slider.getValue(); if (slider.getOrientation() == JSlider.HORIZONTAL) { thumbRect.x = xPositionForValue(value) - thumbRect.width / 2; thumbRect.y = trackRect.y; } else { thumbRect.x = trackRect.x; thumbRect.y = yPositionForValue(value) - t...
thumbRect.x = trackRect.x;
thumbRect.x = trackRect.x + 1;
protected void calculateThumbLocation() { int value = slider.getValue(); if (slider.getOrientation() == JSlider.HORIZONTAL) { thumbRect.x = xPositionForValue(value) - thumbRect.width / 2; thumbRect.y = trackRect.y; } else { thumbRect.x = trackRect.x; thumbRect.y = yPositionForValue(value) - t...
if (slider.getOrientation() == JSlider.HORIZONTAL) thumbRect.y = trackRect.y; else thumbRect.x = trackRect.x;
protected void calculateThumbSize() { Dimension d = getThumbSize(); thumbRect.width = d.width; thumbRect.height = d.height; if (slider.getOrientation() == JSlider.HORIZONTAL) thumbRect.y = trackRect.y; else thumbRect.x = trackRect.x; }
tickRect.height = (slider.getPaintTicks() ? getTickLength() : 0);
tickRect.height = slider.getPaintTicks() ? getTickLength() : 0; if (!slider.getPaintTicks()) tickRect.y--;
protected void calculateTickRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { tickRect.x = trackRect.x; tickRect.y = trackRect.y + trackRect.height; tickRect.width = trackRect.width; tickRect.height = (slider.getPaintTicks() ? getTickLength() : 0); if (tickRect.y + tickRect.height > conten...
tickRect.width = (slider.getPaintTicks() ? getTickLength() : 0);
tickRect.width = slider.getPaintTicks() ? getTickLength() : 0;
protected void calculateTickRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { tickRect.x = trackRect.x; tickRect.y = trackRect.y + trackRect.height; tickRect.width = trackRect.width; tickRect.height = (slider.getPaintTicks() ? getTickLength() : 0); if (tickRect.y + tickRect.height > conten...
if (!slider.getPaintTicks()) tickRect.x--;
protected void calculateTickRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { tickRect.x = trackRect.x; tickRect.y = trackRect.y + trackRect.height; tickRect.width = trackRect.width; tickRect.height = (slider.getPaintTicks() ? getTickLength() : 0); if (tickRect.y + tickRect.height > conten...
Point a = new Point(trackRect.x, trackRect.y);
Point a = new Point(trackRect.x, trackRect.y + 1);
public void paintTrack(Graphics g) { Color saved_color = g.getColor(); int width; int height; Point a = new Point(trackRect.x, trackRect.y); Point b = new Point(a); Point c = new Point(a); Point d = new Point(a); if (slider.getOrientation() == JSlider.HORIZONTAL) { width = trackRect.widt...
return ((max - min) / 2);
return (max - min) / 2;
public int valueForXPosition(int xPos) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.width; int value; // If the length is 0, you shouldn't be able to even see where the slider // is. This really shouldn't ever happen, but just in case, we'll return // th...
value = ((xPos - trackRect.x) * (max - min) / len + min);
value = (xPos - trackRect.x) * (max - min) / len + min;
public int valueForXPosition(int xPos) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.width; int value; // If the length is 0, you shouldn't be able to even see where the slider // is. This really shouldn't ever happen, but just in case, we'll return // th...
value = ((len - (xPos - trackRect.x)) * (max - min) / len + min);
value = (len - (xPos - trackRect.x)) * (max - min) / len + min;
public int valueForXPosition(int xPos) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.width; int value; // If the length is 0, you shouldn't be able to even see where the slider // is. This really shouldn't ever happen, but just in case, we'll return // th...
return ((max - min) / 2);
return (max - min) / 2;
public int valueForYPosition(int yPos) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.height; int value; // If the length is 0, you shouldn't be able to even see where the slider // is. This really shouldn't ever happen, but just in case, we'll return // t...
value = ((len - (yPos - trackRect.y)) * (max - min) / len + min);
value = (len - (yPos - trackRect.y)) * (max - min) / len + min;
public int valueForYPosition(int yPos) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.height; int value; // If the length is 0, you shouldn't be able to even see where the slider // is. This really shouldn't ever happen, but just in case, we'll return // t...
value = ((yPos - trackRect.y) * (max - min) / len + min);
value = (yPos - trackRect.y) * (max - min) / len + min;
public int valueForYPosition(int yPos) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.height; int value; // If the length is 0, you shouldn't be able to even see where the slider // is. This really shouldn't ever happen, but just in case, we'll return // t...
public synchronized void write (byte[] buf, int offset, int len) throws IOException
public synchronized void write (int value) throws IOException
public synchronized void write (byte[] buf, int offset, int len) throws IOException { out.write(buf, offset, len); written += len; }
out.write(buf, offset, len); written += len;
out.write (value); ++written;
public synchronized void write (byte[] buf, int offset, int len) throws IOException { out.write(buf, offset, len); written += len; }
this.operand = getOperand(varIndex); refs = new Operand[] { operand };
refs = new Operand[] { getOperand(varIndex) };
public UnaryQuad(int address, IRBasicBlock block, int lhsIndex, int operation, int varIndex) { super(address, block, lhsIndex); this.operation = operation; this.operand = getOperand(varIndex); refs = new Operand[] { operand }; }
operand = operand.simplify(); if (operand instanceof Variable) { Variable v = (Variable) operand;
refs[0] = refs[0].simplify(); if (refs[0] instanceof Variable) { Variable v = (Variable) refs[0];
public void doPass2(BootableHashMap liveVariables) { operand = operand.simplify(); if (operand instanceof Variable) { Variable v = (Variable) operand; v.setLastUseAddress(this.getAddress()); liveVariables.put(v, v); } }
if(operand instanceof Constant){ Constant c = (Constant) operand;
if(refs[0] instanceof Constant){ Constant c = (Constant) refs[0];
private Quad foldConstants() { if(operand instanceof Constant){ Constant c = (Constant) operand; switch (operation) { case I2L: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.i2l()); case I2F: ...
if (operand instanceof Variable) { Variable var = (Variable) operand;
if (refs[0] instanceof Variable) { Variable var = (Variable) refs[0];
public void generateCode(CodeGenerator cg) { Variable lhs = getLHS(); Location lhsLoc = lhs.getLocation(); if (lhsLoc instanceof RegisterLocation) { RegisterLocation regLoc = (RegisterLocation) lhsLoc; Object lhsReg = regLoc.getRegister(); if (operand instanceof Variable) { Variable var = (Variable) operan...
} else if (operand instanceof Constant) {
} else if (refs[0] instanceof Constant) {
public void generateCode(CodeGenerator cg) { Variable lhs = getLHS(); Location lhsLoc = lhs.getLocation(); if (lhsLoc instanceof RegisterLocation) { RegisterLocation regLoc = (RegisterLocation) lhsLoc; Object lhsReg = regLoc.getRegister(); if (operand instanceof Variable) { Variable var = (Variable) operan...
Constant con = (Constant) operand;
Constant con = (Constant) refs[0];
public void generateCode(CodeGenerator cg) { Variable lhs = getLHS(); Location lhsLoc = lhs.getLocation(); if (lhsLoc instanceof RegisterLocation) { RegisterLocation regLoc = (RegisterLocation) lhsLoc; Object lhsReg = regLoc.getRegister(); if (operand instanceof Variable) { Variable var = (Variable) operan...
throw new IllegalArgumentException("Unknown operand: " + operand);
throw new IllegalArgumentException("Unknown operand: " + refs[0]);
public void generateCode(CodeGenerator cg) { Variable lhs = getLHS(); Location lhsLoc = lhs.getLocation(); if (lhsLoc instanceof RegisterLocation) { RegisterLocation regLoc = (RegisterLocation) lhsLoc; Object lhsReg = regLoc.getRegister(); if (operand instanceof Variable) { Variable var = (Variable) operan...
} else if (operand instanceof Constant) { Constant con = (Constant) operand;
} else if (refs[0] instanceof Constant) { Constant con = (Constant) refs[0];
public void generateCode(CodeGenerator cg) { Variable lhs = getLHS(); Location lhsLoc = lhs.getLocation(); if (lhsLoc instanceof RegisterLocation) { RegisterLocation regLoc = (RegisterLocation) lhsLoc; Object lhsReg = regLoc.getRegister(); if (operand instanceof Variable) { Variable var = (Variable) operan...
return operand;
return refs[0];
public Operand getOperand() { return operand; }
OP_MAP[operation - I2L] + " " + operand.toString();
OP_MAP[operation - I2L] + " " + refs[0].toString();
public String toString() { return getAddress() + ": " + getLHS().toString() + " = " + OP_MAP[operation - I2L] + " " + operand.toString(); }
public AssignQuad(int address, IRBasicBlock block, int lhsIndex) { this(address, block, block.getVariables()[lhsIndex]);
public AssignQuad(int address, IRBasicBlock block, Variable lhs) { super(address, block); setLHS(lhs);
public AssignQuad(int address, IRBasicBlock block, int lhsIndex) { this(address, block, block.getVariables()[lhsIndex]); }
m.minor = Minor.UserException;
public static ValueMember read(InputStream istream) { try { ValueMember value = new ValueMember(); value.name = istream.read_string(); value.id = istream.read_string(); value.defined_in = istream.read_string(); value.version = istream.read_string(); value.type = Type...
m.minor = Minor.UserException;
public static void write(OutputStream ostream, ValueMember value) { try { ostream.write_string(value.name); ostream.write_string(value.id); ostream.write_string(value.defined_in); ostream.write_string(value.version); TypeCodeHelper.write(ostream, value.type); IDLType...
NIOSocket socket = (NIOSocket) ((SocketChannelImpl) ch).socket(); return socket.getPlainSocketImpl().getNativeFD();
try { return ((SocketChannelImpl) ch).getVMChannel().getState().getNativeFD(); } catch (IOException ioe) { throw new IllegalStateException(ioe); }
public int getNativeFD() { NIOSocket socket = (NIOSocket) ((SocketChannelImpl) ch).socket(); return socket.getPlainSocketImpl().getNativeFD(); }
if (event.modified)
public void insertString(int offset, String text, AttributeSet attributes) throws BadLocationException { // Just return when no text to insert was given. if (text == null || text.length() == 0) return; DefaultDocumentEvent event = new DefaultDocumentEvent(offset, text.length(), Documen...
if (appProps.containsKey("defaultPrinter")) { if (getStringProperty("defaultPrinter").equals("Yes")) defaultPrinter = true; else defaultPrinter = false; }
public void loadProps(Properties props) { appProps = props; loadColors(); if (appProps.containsKey("colSeparator")) { if (getStringProperty("colSeparator").equals("Line")) colSepLine = 0; if (getStringProperty("colSeparator").equals("ShortLine")) colSepLine = 1; ...
if (pn.equals("defaultPrinter")) { if (pce.getNewValue().equals("Yes")) defaultPrinter = true; else defaultPrinter = false; }
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(); ...
showMe = new JCheckBox(LangTool.getString("ss.labelShowMe")); if(props.containsKey("emul.showConnectDialog")) showMe.setSelected(true); showMe.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { showMe_itemStateChanged(e); } }); options.add(showMe);
void jbInit() throws Exception { // make it non resizable setResizable(true); this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); // create some reusable borders and layouts Border etchedBorder = BorderFactory.createEtchedBorder(); BorderLayout borderLayout = new BorderLayout(); ...
getContentPane().add(interfacePanel,BorderLayout.NORTH);
getContentPane().add(emulOptPanel,BorderLayout.NORTH);
void jbInit() throws Exception { // make it non resizable setResizable(true); this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); // create some reusable borders and layouts Border etchedBorder = BorderFactory.createEtchedBorder(); BorderLayout borderLayout = new BorderLayout(); ...
public DebugGraphics(Graphics graphics)
public DebugGraphics()
public DebugGraphics(Graphics graphics) { this.graphics = graphics; }
this.graphics = graphics;
public DebugGraphics(Graphics graphics) { this.graphics = graphics; }
return result;
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DSAPrivateKeySpec) { DSAPrivateKeySpec spec = (DSAPrivateKeySpec) keySpec; BigInteger p = spec.getP(); BigInteger q = spec.getQ(); BigInteger g = spec.getG(); ...
return result;
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DSAPublicKeySpec) { DSAPublicKeySpec spec = (DSAPublicKeySpec) keySpec; BigInteger p = spec.getP(); BigInteger q = spec.getQ(); BigInteger g = spec.getG(); ...