rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (offset < 0 || offset > count) throw new StringIndexOutOfBoundsException(offset); ensureCapacity_unsynchronized(count + 1); VMSystem.arraycopy(value, offset, value, offset + 1, count - offset); value[offset] = ch; count++; | if (offset < 0 || offset > count || len < 0 || str_offset < 0 || str_offset > str.length - len) throw new StringIndexOutOfBoundsException(); ensureCapacity_unsynchronized(count + len); VMSystem.arraycopy(value, offset, value, offset + len, count - offset); VMSystem.arraycopy(str, str_offset, value, offset, len); count ... | public synchronized StringBuffer insert(int offset, char ch) { if (offset < 0 || offset > count) throw new StringIndexOutOfBoundsException(offset); ensureCapacity_unsynchronized(count + 1); VMSystem.arraycopy(value, offset, value, offset + 1, count - offset); value[offset] = ch; count++; retur... |
public int getHeight(ImageObserver io) { | public int getHeight() { | public int getHeight(ImageObserver io) { synchronized (lock) { // tell waiting threads to wake up lock.notifyAll(); return bi.getHeight(io); } } |
return bi.getHeight(io); | return bi.getHeight(); | public int getHeight(ImageObserver io) { synchronized (lock) { // tell waiting threads to wake up lock.notifyAll(); return bi.getHeight(io); } } |
public TTFFileInput(RandomAccessFile file) throws IOException { this(file, 0, file.length()); | public TTFFileInput(RandomAccessFile file, long offset, long length) throws IOException { this.ttf = file; this.offset = offset; this.length = length; | public TTFFileInput(RandomAccessFile file) throws IOException { this(file, 0, file.length()); } |
public GrubBootSector(byte[] src) { super(src); | public GrubBootSector(int size) { super(size); | public GrubBootSector(byte[] src) { super(src); } |
if (insideTimer != null) insideTimer.start(); | public void actionPerformed(ActionEvent event) { showTip(); if (insideTimer != null) insideTimer.start(); } | |
parent.invalidate(); parent.validate(); parent.repaint(); | void hideTip() { if (currentTip == null || ! currentTip.isVisible() || ! enabled) return; currentTip.setVisible(false); if (containerPanel != null) { Container parent = containerPanel.getParent(); if (parent == null) return; parent.remove(containerPanel); parent.invalidate(); parent.validate(); ... | |
showTip(); | public void mouseEntered(MouseEvent event) { if (currentComponent != null && getContentPaneDeepestComponent(event) == currentComponent) return; currentPoint = event.getPoint(); currentComponent = (Component) event.getSource(); if (exitTimer.isRunning()) { exitTimer.stop(); showTip(); ins... | |
if (currentTip != null) { if (currentComponent == null) currentComponent = (Component) event.getSource(); String text = ((JComponent) currentComponent).getToolTipText(event); currentTip.setTipText(text); } | public void mouseMoved(MouseEvent event) { currentPoint = event.getPoint(); if (currentTip != null) { if (currentComponent == null) currentComponent = (Component) event.getSource(); String text = ((JComponent) currentComponent).getToolTipText(event); currentTip.setTipText(text); } if (enterTime... | |
if (currentComponent == null) currentComponent = (Component) event.getSource(); currentComponent.invalidate(); currentComponent.validate(); currentComponent.repaint(); | public void mousePressed(MouseEvent event) { currentPoint = event.getPoint(); if (enterTimer.isRunning()) enterTimer.restart(); else if (insideTimer.isRunning()) { insideTimer.stop(); hideTip(); } if (currentComponent == null) currentComponent = (Component) event.getSource(); ... | |
if (! enabled || currentComponent == null) | if (!enabled || currentComponent == null || !currentComponent.isEnabled() || (currentTip != null && currentTip.isVisible())) | void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension di... |
if (canToolTipFit(currentTip)) | if (parent instanceof JPopupMenu) setLightWeightPopupEnabled(((JPopupMenu) parent).isLightWeightPopupEnabled()); else setLightWeightPopupEnabled(true); if (isLightWeightPopupEnabled()) | void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension di... |
if (pane == null) return; | if (pane == null) return; if (containerPanel != null) hideTip(); containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); | void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension di... |
if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout... | LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } | void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension di... |
p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); | p = SwingUtilities.convertPoint(currentComponent, p, pane); p = adjustLocation(p, pane, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); containerPanel.validate(); containerPanel.repaint(); | void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension di... |
else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); | else if (currentComponent.isShowing()) { SwingUtilities.convertPointToScreen(p, currentComponent); p = adjustLocation(p, SwingUtilities.getWindowAncestor(currentComponent), dims); tooltipWindow = new JDialog(); tooltipWindow.setContentPane(currentTip); tooltipWindow.setUndecorated(true); tooltipWindow.getRootPane(). s... | void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension di... |
currentTip.repaint(); | void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension di... | |
FileInputStream in = new FileInputStream(getConfigurationResource()); | FileInputStream in = new FileInputStream(settingsDirectory() + getConfigurationResource()); | private void loadConfigurationResource() { sesProps = new Properties(); try { FileInputStream in = new FileInputStream(getConfigurationResource()); sesProps.load(in); if (sesProps.size() == 0) loadDefaults(); } catch (IOException ioe) { System.out.printl... |
abstract public void saveSettings(String regKey, String fileName, String header); | abstract public void saveSettings(); | abstract public void saveSettings(String regKey, String fileName, String header); |
bad.minor = Minor.Any; | public static InvalidSlot extract(Any any) { try { EmptyExceptionHolder h = (EmptyExceptionHolder) any.extract_Streamable(); return (InvalidSlot) h.value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("InvalidSlot expected"); bad.in... | |
if(pcdata != null) writeOut(outputstream, pcdata); | if(pcdata != null) { writeOut(outputstream, pcdata); if (!dontCloseNode) if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) { writeOut(outputstream, "</"+sXDFRootNodeName+">"); } else { writeOut(outputstream, "</"+nodeNameString+">"); } if (sPrettyXDFOutput) writeOut(outputstream, Const... | public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,... |
public void toXDFOutputStream (OutputStream outputstream, String indent) | public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) | public void toXDFOutputStream (OutputStream outputstream, String indent) { // prepare XMLDeclaration Hashtable XMLDeclAttribs = new Hashtable(); XMLDeclAttribs.put("standalone", new String("no")); XMLDeclAttribs.put("version", (String) sXMLSpecVersion); toXDFOutputStream(outputstream, XMLDeclAttr... |
Hashtable XMLDeclAttribs = new Hashtable(); XMLDeclAttribs.put("standalone", new String("no")); XMLDeclAttribs.put("version", (String) sXMLSpecVersion); toXDFOutputStream(outputstream, XMLDeclAttribs, indent); | String nodeNameString = this.classXDFNodeName; if (newNodeNameString != null) nodeNameString = newNodeNameString; if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(o... | public void toXDFOutputStream (OutputStream outputstream, String indent) { // prepare XMLDeclaration Hashtable XMLDeclAttribs = new Hashtable(); XMLDeclAttribs.put("standalone", new String("no")); XMLDeclAttribs.put("version", (String) sXMLSpecVersion); toXDFOutputStream(outputstream, XMLDeclAttr... |
super(p, q, g); this.x = x; | this(Registry.RAW_ENCODING_ID, p, q, g, x); | public DSSPrivateKey(BigInteger p, BigInteger q, BigInteger g, BigInteger x) { super(p, q, g); this.x = x; } |
throw new IllegalArgumentException("format"); | throw new IllegalArgumentException("Unsupported encoding format: " + format); | public byte[] getEncoded(int format) { byte[] result; switch (format) { case IKeyPairCodec.RAW_FORMAT: result = new DSSKeyPairRawCodec().encodePrivateKey(this); break; default: throw new IllegalArgumentException("format"); } return result; } |
IKeyPairCodec codec = new DSSKeyPairRawCodec(); return (DSSPrivateKey) codec.decodePrivateKey(k); | return (DSSPrivateKey) new DSSKeyPairRawCodec().decodePrivateKey(k); | public static DSSPrivateKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is chea... |
else | catch (IllegalArgumentException ignored) | public static DSSPrivateKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is chea... |
throw new IllegalArgumentException("magic"); | public static DSSPrivateKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is chea... | |
return (DSSPrivateKey) new DSSKeyPairPKCS8Codec().decodePrivateKey(k); | public static DSSPrivateKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is chea... | |
public boolean equals(Object obj) | private static boolean equals(BigInteger x, BigInteger y) | public boolean equals(Object obj) { if (! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); } |
if (! (obj instanceof BigInteger)) | if (x.words == null && y.words == null) return x.ival == y.ival; if (x.words == null || y.words == null || x.ival != y.ival) | public boolean equals(Object obj) { if (! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); } |
return equals(this, (BigInteger) obj); | for (int i = x.ival; --i >= 0; ) { if (x.words[i] != y.words[i]) return false; } return true; | public boolean equals(Object obj) { if (! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); } |
public static void error(String msg, Throwable ex) { log(ERROR, System.err, msg, ex); | public static void error(String msg) { log(ERROR, System.err, msg, null); | public static void error(String msg, Throwable ex) { log(ERROR, System.err, msg, ex); /*try { Thread.sleep(2500); } catch (InterruptedException ex2) { // Ignore }*/ } |
double small = getFlatness() * (1E-10); | double small = getFlatness() * EPSILON; | private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) ... |
a0 += small; | a0 -= small; | private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) ... |
a2 += small; | a2 -= small; | private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) ... |
if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0)) | if (Line2D.linesIntersect(b0, a0, b2, a2, EPSILON, 0.0, distance, 0.0)) | private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) ... |
if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance)) | if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, EPSILON, 0.0, distance)) | private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) ... |
double beta = (((y1 - y3) * (x4 - x3) + (x1 - x3) * (y4 - y3)) / ((y2 - y1) * (x4 - x3) + (x2 - x1) * (y4 - y3))); if (beta < 0.0 || beta > 1.0) | double a1, a2, a3, a4; if ((a1 = area2(x1, y1, x2, y2, x3, y3)) == 0.0) { if (between(x1, y1, x2, y2, x3, y3)) { return true; } else { if (area2(x1, y1, x2, y2, x4, y4) == 0.0) { return between(x3, y3, x4, y4, x1, y1) || between (x3, y3, x4, y4, x2, y2); } else { | public static boolean linesIntersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) { double beta = (((y1 - y3) * (x4 - x3) + (x1 - x3) * (y4 - y3)) ... |
double alpha = (x1 + beta * (x2 - x1) - x3) / (x4 - x3); return alpha >= 0.0 && alpha <= 1.0; | } } } else if ((a2 = area2(x1, y1, x2, y2, x4, y4)) == 0.0) { return between(x1, y1, x2, y2, x4, y4); } if ((a3 = area2(x3, y3, x4, y4, x1, y1)) == 0.0) { if (between(x3, y3, x4, y4, x1, y1)) { return true; } else { if (area2(x3, y3, x4, y4, x2, y2) == 0.0) { return between(x1, y1, x2, y2, x3, y3) || between (x1, ... | public static boolean linesIntersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) { double beta = (((y1 - y3) * (x4 - x3) + (x1 - x3) * (y4 - y3)) ... |
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int num) | public Point2D transform(Point2D src, Point2D dst) | public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int num) { if (srcPts == dstPts && dstOff > srcOff && num > 1 && srcOff + 2 * num > dstOff) { float[] f = new float[2 * num]; System.arraycopy(srcPts, srcOff, f, 0, 2 * num); srcPts = f; } wh... |
if (srcPts == dstPts && dstOff > srcOff && num > 1 && srcOff + 2 * num > dstOff) { float[] f = new float[2 * num]; System.arraycopy(srcPts, srcOff, f, 0, 2 * num); srcPts = f; } while (--num >= 0) { float x = srcPts[srcOff++]; float y = srcPts[srcOff++]; dstPts[dstOff++] = (float) (m00 * x + m01 * y + m02); dstPts[dstO... | if (dst == null) dst = new Point2D.Double(); double x = src.getX(); double y = src.getY(); double nx = m00 * x + m01 * y + m02; double ny = m10 * x + m11 * y + m12; dst.setLocation(nx, ny); return dst; | public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int num) { if (srcPts == dstPts && dstOff > srcOff && num > 1 && srcOff + 2 * num > dstOff) { float[] f = new float[2 * num]; System.arraycopy(srcPts, srcOff, f, 0, 2 * num); srcPts = f; } wh... |
public static double abs(double d) { return (d <= 0) ? 0 - d : d; | public static int abs(int i) { return (i < 0) ? -i : i; | public static double abs(double d) { return (d <= 0) ? 0 - d : d; } |
public ProtectionDomain(CodeSource codesource, PermissionCollection permissions, ClassLoader classloader, Principal[] principals) | public ProtectionDomain(CodeSource codesource, PermissionCollection permissions) | public ProtectionDomain(CodeSource codesource, PermissionCollection permissions, ClassLoader classloader, Principal[] principals) { this(codesource, permissions, classloader, principals, false); } |
this(codesource, permissions, classloader, principals, false); | this(codesource, permissions, null, null, true); | public ProtectionDomain(CodeSource codesource, PermissionCollection permissions, ClassLoader classloader, Principal[] principals) { this(codesource, permissions, classloader, principals, false); } |
String linesep = System.getProperty("line.separator"); | String linesep = SystemProperties.getProperty("line.separator"); | public String toString() { String linesep = System.getProperty("line.separator"); StringBuffer sb = new StringBuffer("ProtectionDomain (").append(linesep); if (code_source == null) sb.append("CodeSource:null"); else sb.append(code_source); sb.append(linesep); if (classloader == nu... |
throw new BAD_OPERATION("Invalid enumeration code " + code); | BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code); bad.minor = Minor.PolicyType; throw bad; | public static IdAssignmentPolicyValue from_int(int code) { try { return enume [ code ]; } catch (ArrayIndexOutOfBoundsException ex) { throw new BAD_OPERATION("Invalid enumeration code " + code); } } |
if (workingThread != null) | if (workingThread != null) { | public void canceled(WizardEvent e) {// System.out.println("It is canceled!"); if (workingThread != null) workingThread.interrupt(); this.hide(); this.dispose(); } |
workingThread = null; } | public void canceled(WizardEvent e) {// System.out.println("It is canceled!"); if (workingThread != null) workingThread.interrupt(); this.hide(); this.dispose(); } | |
public JFileChooser(String currentDirectoryPath) | public JFileChooser() | public JFileChooser(String currentDirectoryPath) { setup(null); setCurrentDirectory(fsv.createFileObject(currentDirectoryPath)); } |
setCurrentDirectory(fsv.createFileObject(currentDirectoryPath)); | setCurrentDirectory(null); | public JFileChooser(String currentDirectoryPath) { setup(null); setCurrentDirectory(fsv.createFileObject(currentDirectoryPath)); } |
public Process exec(String[] cmd) throws IOException | public Process exec(String cmdline) throws IOException | public Process exec(String[] cmd) throws IOException { return exec(cmd, null, null); } |
return exec(cmd, null, null); } | return exec(cmdline, null, null); } | public Process exec(String[] cmd) throws IOException { return exec(cmd, null, null); } |
setIconImage(Image icon) { | public synchronized void setIconImage(Image icon) { | setIconImage(Image icon){ this.icon = icon; if (peer != null) ((FramePeer) peer).setIconImage(icon);} |
public WizardPage(int button_flags) { setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); Box pageBox = Box.createVerticalBox(); contentPane = new JPanel(); add(contentPane); add(Box.createGlue()); JSeparator js = new JSeparator(); js.setAlignmentY(Component.BOTTOM_ALIGNMENT); add(js); add(Box.createRigidArea(ne... | public WizardPage() { this(ALL); | public WizardPage(int button_flags) { // set layout as a vertical column setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));// setLayout(new BorderLayout()); Box pageBox = Box.createVerticalBox(); contentPane = new JPanel(); // add the pages contentpane to our wizard page add(contentP... |
setTitle(String title) { | public synchronized void setTitle(String title) { | setTitle(String title){ this.title = title; if (peer != null) ((FramePeer) peer).setTitle(title);} |
super(); | super(kpgName); | protected KeyPairGeneratorAdapter(String kpgName) { super(); this.adaptee = KeyPairGeneratorFactory.getInstance(kpgName); } |
super(); | public UIResource() { } | |
if (parent instanceof JScrollPane) { | public void layoutContainer(Container parent) { if (parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; JViewport viewport = sc.getViewport(); Dimension viewSize = viewport.getViewSize(); int x1 = 0, x2 = 0, x3 = 0, x4 = 0; int y1 = 0, y2... | |
} | public void layoutContainer(Container parent) { if (parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; JViewport viewport = sc.getViewport(); Dimension viewSize = viewport.getViewSize(); int x1 = 0, x2 = 0, x3 = 0, x4 = 0; int y1 = 0, y2... | |
if (parent != null && parent instanceof JScrollPane) { | public Dimension minimumLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getMinimumSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb... | |
return new Dimension(width, height); } return new Dimension(0,0); | Insets i = sc.getInsets(); return new Dimension(width + i.left + i.right, height + i.top + i.bottom); | public Dimension minimumLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getMinimumSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb... |
if (parent != null && parent instanceof JScrollPane) { | public Dimension preferredLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getPreferredSize(); int width = viewportSize.width; int height = viewportSize.height; if... | |
return new Dimension(width, height); | Insets i = sc.getInsets(); return new Dimension(width + i.left + i.right, height + i.left + i.right); | public Dimension preferredLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getPreferredSize(); int width = viewportSize.width; int height = viewportSize.height; if... |
return new Dimension(0,0); } | public Dimension preferredLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getPreferredSize(); int width = viewportSize.width; int height = viewportSize.height; if... | |
public DataCube(Array parentArray) { | public DataCube(ArrayInterface parentArray) { | public DataCube(Array parentArray) { this.parentArray = parentArray; init(); } |
public Array getParentArray() { | public ArrayInterface getParentArray() { | public Array getParentArray() { return parentArray; } |
NoDataValues[0] = parentArray.getNoDataValue(); | String value = (String) null; if (parentArray.getNoDataValue() != null) { value = parentArray.getNoDataValue().toString(); } NoDataValues[0] = value; | public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameStri... |
if (axisList.size() == 0){ | if (axisList.size() == 0 || !this.hasFieldAxis() ){ | public FieldAxis getFieldAxis() { List axisList = getAxes(); if (axisList.size() == 0){ //empty axisList return null; } Object axisObj = axisList.get(0); if (axisObj instanceof FieldAxis) return (FieldAxis) axisObj; else return null; } |
if (endian == null) endian = DEFAULT_ENDIAN; | public String getEndian() { String endian = (String) ((Attribute) attribHash.get(ENDIAN_XML_ATTRIBUTE_NAME)).getAttribValue(); // a safety just in case someone asks a stupid question // if (endian == null) endian = DEFAULT_ENDIAN; return endian; } | |
int availSize = getAvailableSize(splitPane.getSize(), splitPane.getInsets()); int[] newSizes = new int[3]; double weight = splitPane.getResizeWeight(); int oldLen = sizes[0] + sizes[1]; availSize -= sizes[2] + oldLen; int rightAlloc = (int) (availSize * (1 - weight)); int leftAlloc = availSize - rightAlloc; sizes[... | void distributeExtraSpace() { int availSize = getAvailableSize(splitPane.getSize(), splitPane.getInsets()); int[] newSizes = new int[3]; double weight = splitPane.getResizeWeight(); int oldLen = sizes[0] + sizes[1]; // dividers don't change size. ... | |
int width = getInitialLocation(insets); | public void layoutContainer(Container container) { if (container instanceof JSplitPane) { JSplitPane split = (JSplitPane) container; distributeExtraSpace(); Insets insets = split.getInsets(); int width = getInitialLocation(insets); Dimension dims = split.getSize(); for (int i = 0; i < com... | |
for (int i = 0; i < components.length; i += 2) { if (components[i] == null) continue; setComponentToSize(components[i], sizes[i], width, insets, dims); width += sizes[i]; } if (components[1] != null) { setComponentToSize(components[1], sizes[1], width, insets, dims); width += sizes[1]; } | int loc = getInitialLocation(insets); int available = getAvailableSize(dims, insets); sizes[0] = getDividerLocation(split) - loc; sizes[1] = available - sizes[0] - sizes[1]; setComponentToSize(components[0], sizes[0], loc, insets, dims); loc += sizes[0]; setComponentToSize(components[2], sizes[2], loc, insets, dims... | public void layoutContainer(Container container) { if (container instanceof JSplitPane) { JSplitPane split = (JSplitPane) container; distributeExtraSpace(); Insets insets = split.getInsets(); int width = getInitialLocation(insets); Dimension dims = split.getSize(); for (int i = 0; i < com... |
return layoutManager.sizes[0] + layoutManager.getInitialLocation(splitPane.getInsets()); | return dividerLocation; | public int getDividerLocation(JSplitPane jc) { return layoutManager.sizes[0] + layoutManager.getInitialLocation(splitPane.getInsets()); } |
value -= layoutManager.minimumSizeOfComponent(0); | value += layoutManager.minimumSizeOfComponent(0); | public int getMinimumDividerLocation(JSplitPane jc) { int value = layoutManager.getInitialLocation(jc.getInsets()); if (layoutManager.components[0] != null) value -= layoutManager.minimumSizeOfComponent(0); return value; } |
divider.setBorder(UIManager.getBorder("SplitPaneDivider.border")); | protected void installDefaults() { LookAndFeel.installColors(splitPane, "SplitPane.background", "SplitPane.foreground"); LookAndFeel.installBorder(splitPane, "SplitPane.border"); divider = createDefaultDivider(); resetLayoutManager(); nonContinuousLayoutDivider = createDef... | |
location = validLocation(location); Container p = jc.getParent(); Component right = jc.getRightComponent(); Dimension rightPrefSize = right == null ? new Dimension(0, 0) : right.getPreferredSize(); Dimension size = jc.getSize(); if (size.width == 0 && size.height == 0) size = jc.getPreferredSize(); if (getOrientation... | dividerLocation = validLocation(location); | public void setDividerLocation(JSplitPane jc, int location) { location = validLocation(location); Container p = jc.getParent(); Component right = jc.getRightComponent(); Dimension rightPrefSize = right == null ? new Dimension(0, 0) : right.getPreferredSize(); ... |
if (splitPane.getBorder() instanceof UIResource) | protected void uninstallDefaults() { layoutManager = null; splitPane.remove(divider); divider = null; nonContinuousLayoutDivider = null; splitPane.setBackground(null); splitPane.setBorder(null); } | |
public static void paintComponent(Graphics g, Component c, Container p, Rectangle r) { paintComponent(g, c, p, r.x, r.y, r.width, r.height); | public static void paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h) { Container parent = c.getParent(); if (parent != null) parent.remove(c); if (p != null) p.add(c); Shape savedClip = g.getClip(); g.setClip(x, y, w, h); g.translate(x, y); c.paint(g); g.translate(-x, -y); g.setClip(s... | public static void paintComponent(Graphics g, Component c, Container p, Rectangle r) { paintComponent(g, c, p, r.x, r.y, r.width, r.height); } |
public void addSessionView(String tabText,Session session) { | public void addSessionView(String tabText,Session sessionView) { final Session session = sessionView; | public void addSessionView(String tabText,Session session) { if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.grabFocus(); session.resizeMe(); repaint(); if (packFrame) pack(); ... |
session.grabFocus(); | public void addSessionView(String tabText,Session session) { if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.grabFocus(); session.resizeMe(); repaint(); if (packFrame) pack(); ... | |
ses.grabFocus(); ses.resizeMe(); repaint(); | final Session finalSession = ses; SwingUtilities.invokeLater(new Runnable() { public void run() { finalSession.resizeMe(); finalSession.repaint(); } }); | public void addSessionView(String tabText,Session session) { if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.grabFocus(); session.resizeMe(); repaint(); if (packFrame) pack(); ... |
session.grabFocus(); session.resizeMe(); session.repaint(); | SwingUtilities.invokeLater(new Runnable() { public void run() { session.resizeMe(); session.repaint(); session.grabFocus(); } }); | public void addSessionView(String tabText,Session session) { if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.grabFocus(); session.resizeMe(); repaint(); if (packFrame) pack(); ... |
sessionPane.setTitleAt(index,d); } | finalSession.resizeMe(); finalSession.repaint(); } | public void run() { sessionPane.setTitleAt(index,d); } |
public void addTab(String title, Icon icon, Component component) | public void addTab(String title, Icon icon, Component component, String tip) | public void addTab(String title, Icon icon, Component component) { insertTab(title, icon, component, null, tabs.size()); } |
insertTab(title, icon, component, null, tabs.size()); | insertTab(title, icon, component, tip, tabs.size()); | public void addTab(String title, Icon icon, Component component) { insertTab(title, icon, component, null, tabs.size()); } |
repaint(); | public void remove (int index) { Component c = getComponent (index); int layer = getLayer (c); decrLayer (new Integer(layer)); componentToLayer.remove (c); super.remove (index); revalidate(); repaint(); } | |
this.inlineDepth--; | public void endInlinedMethod(VmMethod previousMethod) { if (log) { os.log("End of inlined method"); } // Do some housekeeping helper.setMethod(previousMethod); os.setObjectRef(inlinedMethodInfo.getEndOfInlineLabel()); this.currentMethod = previousMethod; // Push the ty... | |
this.inlineDepth++; | public void startInlinedMethodCode(VmMethod inlinedMethod, int newMaxLocals) { if (log) { os.log("Start of inlined method code"); } if (debug) { BootLog.debug("startInlinedMethodCode(" + inlinedMethod + ")"); } // TODO: check whether this is really needed // For now yes, because a new ba... | |
cm.add(currentMethod, address, offset); | cm.add(currentMethod, address, offset, inlineDepth); | public void startInstruction(int address) { if (debug) { BootLog.debug("#" + address + "\t" + vstack); } if (log) { if (debug) { os.log("#" + address + " VStack: " + vstack.toString()); } else { os.log("#" + address); } } this.curAddress = address; this._curInstrLabel = null; if (startOfBB || setC... |
os.writeLEA(SP, SP, 8); | os.writeLEA(SP, SP, -8); | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getM... |
public final void invokeJavaMethod(VmMethod method) { if (false) { final int staticsIdx = (VmArray.DATA_OFFSET + method.getStaticsIndex()) << 2; os.writeMOV(INTSIZE, Register.EAX, STATICS, staticsIdx); } else { os.writeMOV_Const(Register.EAX, method); } invokeJavaMethod(method.getSignature()); | public final void invokeJavaMethod(String signature) { final int offset = context.getVmMethodNativeCodeField().getOffset(); os.writeCALL(Register.EAX, offset); pushReturnValue(signature); | public final void invokeJavaMethod(VmMethod method) { if (false) { final int staticsIdx = (VmArray.DATA_OFFSET + method.getStaticsIndex()) << 2; os.writeMOV(INTSIZE, Register.EAX, STATICS, staticsIdx); } else { os.writeMOV_Const(Register.EAX, method); } i... |
os.writeLEA(SP, SP, 4); | os.writeLEA(SP, SP, -4); | final void loadTo(EmitterContext ec, Register reg) { assertCondition(reg != null, "Reg != null"); final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); assertCondition(!pool.isFree(reg), "reg not free"); switch (kind) { case Kind.REGIS... |
if (!resolved) { doResolve(clc); resolved = true; } | public void resolve(VmClassLoader clc) { if (!resolved) { doResolve(clc); resolved = true; } } | |
public static int SignatureToType(String signature) { return SignatureToType(signature.charAt(0)); | public static int SignatureToType(char type) { int res; switch (type) { case 'Z': case 'B': case 'C': case 'S': case 'I': res = JvmType.INT; break; case 'F': res = JvmType.FLOAT; break; case 'L': case ';': case '[': res = JvmType.REFERENCE; break; case 'J': res = JvmType.LONG; break; case 'D': res = JvmType.... | public static int SignatureToType(String signature) { return SignatureToType(signature.charAt(0)); } |
public DoubleWordItem createReg(int jvmType, Register lsb, Register msb) { final DoubleWordItem item = (DoubleWordItem) getOrCreate(jvmType); item.initialize(Item.Kind.REGISTER, 0, lsb, msb); | public WordItem createReg(int jvmType, Register reg) { final WordItem item = (WordItem) getOrCreate(jvmType); item.initialize(Item.Kind.REGISTER, reg, 0); | public DoubleWordItem createReg(int jvmType, Register lsb, Register msb) { final DoubleWordItem item = (DoubleWordItem) getOrCreate(jvmType); item.initialize(Item.Kind.REGISTER, 0, lsb, msb); return item; } |
public CompileError(String s) { super(s); | public CompileError() { super(); | public CompileError(String s) { super(s); } |
public abstract void visit_ldc(VmConstClass value); | public abstract void visit_ldc(VmConstString value); | public abstract void visit_ldc(VmConstClass value); |
os.writeLEA(SP, SP, 4); | os.writeLEA(SP, SP, -4); | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); switch (getKind()) { case Kind.REGISTER: os.writePUSH(reg); break; case Kind.LOCAL: os.writePUSH(FP, offsetToFP); break; case Kind.CONSTANT: pushConstant(ec, os); break; case ... |
&& parent.getHeight() > getUI().getMinimumSize(this).height; | && parent.getHeight() >= getUI().getMinimumSize(this).height && parent.getHeight() <= getUI().getMaximumSize(this).height; | public boolean getScrollableTracksViewportHeight() { // Tests show that this returns true when the parent is a JViewport // and has a height > minimum UI height. Container parent = getParent(); return parent instanceof JViewport && parent.getHeight() > getUI().getMinimumSize(this).height; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.