rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public String getUIClassID() { return "JButton"; } | public String getUIClassID() { return "ButtonUI"; } | public String getUIClassID() { //Returns a string that specifies the name of the L&F class that renders this component. return "JButton"; } |
if (! changed) | if (invoker instanceof JMenu) { JMenu menu = (JMenu) invoker; menu.setPopupMenuVisible(changed); } else if (! changed) | public void menuSelectionChanged(boolean changed) { if (! changed) setVisible(false); } |
this.visible = visible; if (old != isVisible()) | if (old != visible) | public void setVisible(final boolean visible) { // Hook up this call so that it gets executed on the event thread in order // to avoid synchronization problems when calling the layout manager. if (! SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeLater(new Runnable() { ... |
if (invoker != null && !(invoker instanceof JMenu)) | if (invoker != null) { if (!(invoker instanceof JMenu)) { MenuElement[] menuEls; if (getSubElements().length > 0) { menuEls = new MenuElement[2]; menuEls[0] = this; menuEls[1] = getSubElements()[0]; } else { menuEls = new MenuElement[1]; menuEls[0] = this; } MenuSelectionManager.defaultManager().setSelectedPath(menuEls... | public void setVisible(final boolean visible) { // Hook up this call so that it gets executed on the event thread in order // to avoid synchronization problems when calling the layout manager. if (! SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeLater(new Runnable() { ... |
MenuElement[] menuEls; if (getSubElements().length > 0) { menuEls = new MenuElement[2]; menuEls[0] = this; menuEls[1] = getSubElements()[0]; } else { menuEls = new MenuElement[1]; menuEls[0] = this; } MenuSelectionManager.defaultManager().setSelectedPath(menuEls); | Point point = ((JMenu)invoker).getPopupMenuOrigin(); popupLocationX = point.x; popupLocationY = point.y; | public void setVisible(final boolean visible) { // Hook up this call so that it gets executed on the event thread in order // to avoid synchronization problems when calling the layout manager. if (! SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeLater(new Runnable() { ... |
this.visible = visible; | public void setVisible(final boolean visible) { // Hook up this call so that it gets executed on the event thread in order // to avoid synchronization problems when calling the layout manager. if (! SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeLater(new Runnable() { ... | |
Object[] changeListeners = changeListenerList.getListenerList(); | Object[] changeListeners = listenerList.getListenerList(); | protected void fireStateChanged() { Object[] changeListeners = changeListenerList.getListenerList(); if (changeEvent == null) changeEvent = new ChangeEvent(this); for (int i = changeListeners.length - 2; i >= 0; i -= 2) { if (changeListeners[i] == ChangeListener.class) ((ChangeListener) changeLi... |
throw new IllegalStateException("Helper is NOT ready"); | throw new IllegalStateException(Messages.getString("SFHelper.9")); | void startSigning() throws IOException { if (this.state != READY) throw new IllegalStateException("Helper is NOT ready"); Manifest oldManifest = jar.getManifest(); this.manifest = oldManifest == null ? new Manifest() : new Manifest(oldManifest); this.sfMainAttr... |
throw new IllegalStateException("Helper is NOT started"); | throw new IllegalStateException(Messages.getString("SFHelper.10")); | void updateEntry(JarEntry entry) throws IOException { if (this.state != STARTED) throw new IllegalStateException("Helper is NOT started"); String name = entry.getName(); InputStream jeis = jar.getInputStream(entry); String hash = util.hashStream(jeis); log.finer("Hash of " + name + " = " + ... |
throw new IllegalStateException("Helper is NOT started"); | throw new IllegalStateException(Messages.getString("SFHelper.10")); | void finishSigning(boolean sectionsOnly) throws IOException { if (state != STARTED) throw new IllegalStateException("Helper is NOT started"); if (sectionsOnly) return; ByteArrayOutputStream baos = new ByteArrayOutputStream(); manifest.write(baos); baos.flush(); String manifestHash = util.... |
throw new IllegalStateException("Helper is NOT finished"); | throw new IllegalStateException(Messages.getString("SFHelper.1")); | void writeSF(JarOutputStream jar) throws IOException { if (this.state != FINISHED) throw new IllegalStateException("Helper is NOT finished"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); JarUtils.writeSFManifest(sfMainAttributes, sfEntries, baos); sfBytes = baos.toByteArray(); log.fi... |
throw new IllegalStateException(".SF file has NOT been generated"); | throw new IllegalStateException(Messages.getString("SFHelper.4")); | void writeDSA(JarOutputStream jar, PrivateKey signerKey, Certificate[] certificates, boolean internalSF) throws IOException, CertificateEncodingException, CRLException { if (this.state != SF_GENERATED) throw new IllegalStateException(".SF file has NOT been generated"); log.finest("+++ ... |
throw new SecurityException("Unknown or unsupported private key algorithm"); | throw new SecurityException(Messages.getString("SFHelper.6")); | void writeDSA(JarOutputStream jar, PrivateKey signerKey, Certificate[] certificates, boolean internalSF) throws IOException, CertificateEncodingException, CRLException { if (this.state != SF_GENERATED) throw new IllegalStateException(".SF file has NOT been generated"); log.finest("+++ ... |
throw new IllegalArgumentException("Not a FrameBuffer device", ex); | throw new IllegalArgumentException("Not a FrameBuffer device " + device.getId()); | public JNodeFrameBufferDevice(Device device) { this.device = device; device.addListener(this); try { this.api = (FrameBufferAPI)device.getAPI(FrameBufferAPI.class); } catch (ApiNotFoundException ex) { throw new IllegalArgumentException("Not a FrameBuffer device", ex); } final FrameBufferConfiguration[] fbCon... |
int x = insets.left; | int preferredWidthAll = 0; for (int index = 0; index < children.length; index++) { preferredWidthAll += children[index].getPreferredSize().width; } double widthFactor = (double) innerSize.width / (double) preferredWidthAll; int widthRemain = innerSize.width; | public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Insets insets = parent.getInsets(); Dimension innerSize = new Dimension(size.width - insets.left - insets.right... |
int width = sz.width; int height = sz.height; int cy = insets.top; if (height > innerSize.height) | Dimension minSize = comp.getMinimumSize(); Dimension maxSize = comp.getMaximumSize(); int width = (int) (sz.width * widthFactor); int height = Math.min(innerSize.height, maxSize.height); if (width < minSize.width) | public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Insets insets = parent.getInsets(); Dimension innerSize = new Dimension(size.width - insets.left - insets.right... |
height = innerSize.height; | width = minSize.width; comp.setSize(width, height); laidOut[index] = true; preferredWidthAll -= sz.width; widthRemain -= width; continue; } if (width > maxSize.width) { width = maxSize.width; comp.setSize(width, height); laidOut[index] = true; preferredWidthAll -= sz.width; widthRemain -= width; continue; } } width... | public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Insets insets = parent.getInsets(); Dimension innerSize = new Dimension(size.width - insets.left - insets.right... |
{ cy = (int) ((innerSize.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); | width = comp.getWidth(); int cy = (int) ((innerSize.height - comp.getHeight()) * comp.getAlignmentY() + insets.top); | public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Insets insets = parent.getInsets(); Dimension innerSize = new Dimension(size.width - insets.left - insets.right... |
int y = insets.top; | int preferredHeightAll = 0; for (int index = 0; index < children.length; index++) { preferredHeightAll += children[index].getPreferredSize().height; } double heightFactor = (double) innerSize.height / (double) preferredHeightAll; int heightRemain = innerSize.height; | public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Insets insets = parent.getInsets(); Dimension innerSize = new Dimension(size.width - insets.left - insets.right... |
int width = sz.width; int height = sz.height; int cx = insets.left; if (width > innerSize.width) | Dimension minSize = comp.getMinimumSize(); Dimension maxSize = comp.getMaximumSize(); int height = (int) (sz.height * heightFactor); int width = Math.min(innerSize.width, maxSize.width); if (height < minSize.height) | public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Insets insets = parent.getInsets(); Dimension innerSize = new Dimension(size.width - insets.left - insets.right... |
width = innerSize.width; | height = minSize.height; comp.setSize(width, height); laidOut[index] = true; preferredHeightAll -= sz.height; heightRemain -= height; continue; } if (height > maxSize.height) { height = maxSize.height; comp.setSize(width, height); laidOut[index] = true; preferredHeightAll -= sz.height; heightRemain -= height; continue... | public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Insets insets = parent.getInsets(); Dimension innerSize = new Dimension(size.width - insets.left - insets.right... |
{ cx = (int) ((innerSize.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); | height = comp.getHeight(); int cx = (int) ((innerSize.width - comp.getWidth()) * comp.getAlignmentX() + insets.left); | public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Insets insets = parent.getInsets(); Dimension innerSize = new Dimension(size.width - insets.left - insets.right... |
Component comp = ev.getComponent(); Dimension newSize = comp.getSize(); Dimension viewportSize = getSize(); boolean revert = false; if (newSize.width > viewportSize.width) { newSize.width = viewportSize.width; revert = true; } if (newSize.height > viewportSize.height) { newSize.height = viewportSize.height; revert = tr... | revalidate(); | public void componentResized(ComponentEvent ev) { // According to some tests that I did with Sun's implementation // this class is supposed to make sure that the view component // is not resized to a larger size than the viewport. // This is not documented anywhere. What I did is: I subclasse... |
updateUI(); | public JViewport() { setOpaque(true); setScrollMode(BLIT_SCROLL_MODE); setLayout(createLayoutManager()); updateUI(); lastPaintPosition = new Point(); cachedBlitFrom = new Point(); cachedBlitTo = new Point(); cachedBlitSize = new Dimension(); cachedBlitPaint = new Rectangle(); } | |
if (backingStoreImage == null || damaged) | if (backingStoreImage == null || sizeChanged) | void paintBackingStore(Graphics g) { // If we have no backing store image yet or the size of the component has // changed, we need to rebuild the backing store. if (backingStoreImage == null || damaged) { backingStoreImage = createImage(getWidth(), getHeight()); Graphics g2 = backingStore... |
sizeChanged = false; | void paintBackingStore(Graphics g) { // If we have no backing store image yet or the size of the component has // changed, we need to rebuild the backing store. if (backingStoreImage == null || damaged) { backingStoreImage = createImage(getWidth(), getHeight()); Graphics g2 = backingStore... | |
damaged = true; | public void reshape(int x, int y, int w, int h) { damaged = true; boolean changed = (x != getX()) || (y != getY()) || (w != getWidth()) || (h != getHeight()); super.reshape(x, y, w, h); if (changed) fireStateChanged(); } | |
} | public void reshape(int x, int y, int w, int h) { damaged = true; boolean changed = (x != getX()) || (y != getY()) || (w != getWidth()) || (h != getHeight()); super.reshape(x, y, w, h); if (changed) fireStateChanged(); } | |
remove(0); | public void setView(Component v) { while (getComponentCount() > 0) { if (viewListener != null) getView().removeComponentListener(viewListener); remove(0); } if (v != null) { if (viewListener == null) viewListener = createViewListener(); v.addComponentL... | |
revalidate(); | public void setView(Component v) { while (getComponentCount() > 0) { if (viewListener != null) getView().removeComponentListener(viewListener); remove(0); } if (v != null) { if (viewListener == null) viewListener = createViewListener(); v.addComponentL... | |
if (getViewPosition().equals(p)) return; | public void setViewPosition(Point p) { Component view = getView(); if (view != null) { Point q = new Point(-p.x, -p.y); view.setLocation(q); isViewSizeSet = false; fireStateChanged(); } repaint(); } | |
if(getFileSystem().isReadOnly()) { throw new ReadOnlyFileSystemException("write in readonly filesystem"); } | public void write(long fileOffset, byte[] src, int off, int len) throws IOException { //synchronize to the inode cache to make sure that the inode does not // get //flushed between reading it and locking it synchronized (((Ext2FileSystem) getFileSystem()).getInodeCache()) { ... | |
PasswordAuthentication(String username, char[] password) { | public PasswordAuthentication(String username, char[] password) { | PasswordAuthentication(String username, char[] password){ this.username = username; this.password = password;} |
getPassword() { return(password); } | public char[] getPassword() { return (password); } | getPassword(){ return(password);} |
getUserName() { return(username); } | public String getUserName() { return (username); } | getUserName(){ return(username);} |
finally { try { if (service!=null && !service.isClosed()) service.close(); } catch (IOException ioex) { } } | void serveStep(Socket service, boolean no_resources) { try { Serving: while (true) { InputStream in = service.getInputStream(); service.setSoTimeout(TOUT_START_READING_MESSAGE); MessageHeader msh_request = new MessageHeader(); try { ... | |
if (para [ i ] [ 0 ].equals(NS_HOST)) ns_host = para [ i ] [ 1 ]; if (para [ i ] [ 0 ].equals(START_READING_MESSAGE)) TOUT_START_READING_MESSAGE = Integer.parseInt(para [ i ] [ 1 ]); if (para [ i ] [ 0 ].equals(WHILE_READING)) TOUT_WHILE_READING = Integer.parseInt(para [ i ] [ 1 ]); if (para [ i ] [ 0 ].equals(AFTER_RE... | if (para[i][0].equals(ORB_ID)) orb_id = para[i][1]; if (para[i][0].equals(SERVER_ID)) server_id = para[i][1]; if (para[i][0].equals(NS_HOST)) ns_host = para[i][1]; if (para[i][0].equals(START_READING_MESSAGE)) TOUT_START_READING_MESSAGE = Integer.parseInt(para[i][1]); if (para[i][0].equals(WHILE_READING)) TOUT_WHILE_... | protected void set_parameters(Applet app, Properties props) { useProperties(props); String[][] para = app.getParameterInfo(); if (para != null) { for (int i = 0; i < para.length; i++) { if (para [ i ] [ 0 ].equals(LISTEN_ON)) Port = Integer.parseInt(para [ i ] [ ... |
if (props.containsKey(ORB_ID)) orb_id = props.getProperty(ORB_ID); if (props.containsKey(SERVER_ID)) server_id = props.getProperty(SERVER_ID); | protected void useProperties(Properties props) { if (props != null) { if (props.containsKey(LISTEN_ON)) Port = Integer.parseInt(props.getProperty(LISTEN_ON)); if (props.containsKey(NS_HOST)) ns_host = props.getProperty(NS_HOST); try { if (props.conta... | |
if (useExponentialNotation) | if (useExponentialNotation && number > 0) | private void formatInternal (double number, FormatBuffer dest, FieldPosition fieldPos) { // A very special case. if (Double.isNaN(number)) { dest.append(symbols.getNaN()); if (fieldPos != null && (fieldPos.getField() == INTEGER_FIELD || fieldPos.getFieldAttribute() == NumberFormat.Field.INTE... |
init(panel, null); | public SwingPanelPeer(Panel panel) { super(panel); } | |
this(createTreeModel(null)); | this(getDefaultTreeModel()); | public JTree() { this(createTreeModel(null)); } |
updateUI(); | public void setModel(TreeModel model) { if (treeModel == model) return; // add treeModelListener to the new model if (treeModelListener == null) treeModelListener = createTreeModelListener(); if (model != null) // as setModel(null) is allowed model.addTreeModelListener(treeModelListener); ... | |
isTimeSet = false; | public void add(int field, int amount) { switch (field) { case YEAR: complete(); fields[YEAR] += amount; isTimeSet = false; break; case MONTH: complete(); int months = fields[MONTH] + amount; fields[YEAR] += months / 12; fields[MONTH] = months % 12; if (fields[MONTH] < 0) ... | |
set(YEAR, fields[YEAR]); set(MONTH, fields[MONTH]); | public void add(int field, int amount) { switch (field) { case YEAR: complete(); fields[YEAR] += amount; isTimeSet = false; break; case MONTH: complete(); int months = fields[MONTH] + amount; fields[YEAR] += months / 12; fields[MONTH] = months % 12; if (fields[MONTH] < 0) ... | |
if (! isSet[MONTH]) | if (! isSet[MONTH] && (! isSet[DAY_OF_WEEK] || isSet[WEEK_OF_YEAR])) | protected synchronized void computeTime() { int millisInDay = 0; int era = fields[ERA]; int year = fields[YEAR]; int month = fields[MONTH]; int day = fields[DAY_OF_MONTH]; int minute = fields[MINUTE]; int second = fields[SECOND]; int millis = fields[MILLISECOND]; int[] month_days = { 31, 28, ... |
if (isSet[DAY_OF_WEEK] || isSet[WEEK_OF_YEAR]) | if (isSet[WEEK_OF_YEAR]) | protected synchronized void computeTime() { int millisInDay = 0; int era = fields[ERA]; int year = fields[YEAR]; int month = fields[MONTH]; int day = fields[DAY_OF_MONTH]; int minute = fields[MINUTE]; int second = fields[SECOND]; int millis = fields[MILLISECOND]; int[] month_days = { 31, 28, ... |
int offs; if ((8 - first) >= getMinimalDaysInFirstWeek()) offs = 1; | int offs = 1; int daysInFirstWeek = getFirstDayOfWeek() - first; if (daysInFirstWeek <= 0) daysInFirstWeek += 7; if (daysInFirstWeek < getMinimalDaysInFirstWeek()) offs += daysInFirstWeek; | protected synchronized void computeTime() { int millisInDay = 0; int era = fields[ERA]; int year = fields[YEAR]; int month = fields[MONTH]; int day = fields[DAY_OF_MONTH]; int minute = fields[MINUTE]; int second = fields[SECOND]; int millis = fields[MILLISECOND]; int[] month_days = { 31, 28, ... |
offs = 1 + (8 - first); | offs -= 7 - daysInFirstWeek; | protected synchronized void computeTime() { int millisInDay = 0; int era = fields[ERA]; int year = fields[YEAR]; int month = fields[MONTH]; int day = fields[DAY_OF_MONTH]; int minute = fields[MINUTE]; int second = fields[SECOND]; int millis = fields[MILLISECOND]; int[] month_days = { 31, 28, ... |
day += fields[DAY_OF_WEEK] - first; | offs = fields[DAY_OF_WEEK] - getFirstDayOfWeek(); if (offs < 0) offs += 7; day += offs; | protected synchronized void computeTime() { int millisInDay = 0; int era = fields[ERA]; int year = fields[YEAR]; int month = fields[MONTH]; int day = fields[DAY_OF_MONTH]; int minute = fields[MINUTE]; int second = fields[SECOND]; int millis = fields[MILLISECOND]; int[] month_days = { 31, 28, ... |
day = 1 + 7 * (fields[WEEK_OF_MONTH] - 1); day += fields[DAY_OF_WEEK] - first; | int offs = 1; int daysInFirstWeek = getFirstDayOfWeek() - first; if (daysInFirstWeek <= 0) daysInFirstWeek += 7; if (daysInFirstWeek < getMinimalDaysInFirstWeek()) offs += daysInFirstWeek; else offs -= 7 - daysInFirstWeek; day = offs + 7 * (fields[WEEK_OF_MONTH] - 1); offs = fields[DAY_OF_WEEK] - getFirstDayOfWeek();... | protected synchronized void computeTime() { int millisInDay = 0; int era = fields[ERA]; int year = fields[YEAR]; int month = fields[MONTH]; int day = fields[DAY_OF_MONTH]; int minute = fields[MINUTE]; int second = fields[SECOND]; int millis = fields[MILLISECOND]; int[] month_days = { 31, 28, ... |
if (stream == null) throw new IllegalArgumentException("null argument"); | public static BufferedImage read(ImageInputStream stream) throws IOException { Iterator providers = getRegistry().getServiceProviders(ImageReaderSpi.class, true); while (providers.hasNext()) { ImageReaderSpi spi = (ImageReaderSpi) providers.next(); if (spi.canDecodeInput(stream)) ... | |
if (im == null || formatName == null || output == null) throw new IllegalArgumentException ("null argument"); | public static boolean write(RenderedImage im, String formatName, File output) throws IOException { return write(im, formatName, new FileOutputStream(output)); } | |
return parent == null ? SystemColor.windowText : parent.getForeground(); | return parent == null ? null : parent.getForeground(); | public Color getForeground() { if (foreground != null) return foreground; return parent == null ? SystemColor.windowText : parent.getForeground(); } |
return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE); | return new Dimension(Short.MAX_VALUE, Short.MAX_VALUE); | public Dimension getMaximumSize() { return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE); } |
boolean wasShowing = isShowing(); | public void hide() { if (isVisible()) { // Avoid NullPointerExceptions by creating a local reference. ComponentPeer currentPeer=peer; if (currentPeer != null) currentPeer.setVisible(false); this.visible = false; // The JDK repaints the component b... | |
if (wasShowing) | public void hide() { if (isVisible()) { // Avoid NullPointerExceptions by creating a local reference. ComponentPeer currentPeer=peer; if (currentPeer != null) currentPeer.setVisible(false); this.visible = false; // The JDK repaints the component b... | |
return parent == null ? true : parent.isShowing(); | return parent == null ? false : parent.isShowing(); | public boolean isShowing() { if (! visible || peer == null) return false; return parent == null ? true : parent.isShowing(); } |
Container parent = getParent (); | Container parent = (this instanceof Container) ? (Container) this : getParent(); | public void requestFocus () { if (isDisplayable () && isShowing () && isFocusable ()) { synchronized (getTreeLock ()) { // Find this Component's top-level ancestor. Container parent = getParent (); while (parent != null && !(parent instanceof... |
if (parent == null) return; | public void requestFocus () { if (isDisplayable () && isShowing () && isFocusable ()) { synchronized (getTreeLock ()) { // Find this Component's top-level ancestor. Container parent = getParent (); while (parent != null && !(parent instanceof... | |
if (isShowing()) | public void show() { // We must set visible before showing the peer. Otherwise the // peer could post paint events before visible is true, in which // case lightweight components are not initially painted -- // Container.paint first calls isShowing () before painting itself // and its children. if... | |
e.printStackTrace(); | public void setExceptionListener(ExceptionListener listener) { exceptionListener = (listener != null) ? listener : new ExceptionListener() { public void exceptionThrown(Exception e) { System.err.println("exception thrown: " + e); e.printStackTrace(); } }; } | |
e.printStackTrace(); | public void exceptionThrown(Exception e) { System.err.println("exception thrown: " + e); e.printStackTrace(); } | |
delegates.put(ArrayList.class, pd); delegates.put(LinkedList.class, pd); delegates.put(Vector.class, pd); delegates.put(HashSet.class, pd); delegates.put(LinkedHashSet.class, pd); delegates.put(TreeSet.class, pd); | delegates.put(AbstractCollection.class, pd); | private static void setupDefaultPersistenceDelegates() { synchronized (delegates) { if (defaultPersistenceDelegate != null) return; delegates.put(Class.class, new ClassPersistenceDelegate()); PersistenceDelegate pd = new PrimitivePersistenceDelegate(); delegates.put(Boole... |
delegates.put(HashMap.class, pd); delegates.put(TreeMap.class, pd); | delegates.put(java.util.AbstractMap.class, pd); | private static void setupDefaultPersistenceDelegates() { synchronized (delegates) { if (defaultPersistenceDelegate != null) return; delegates.put(Class.class, new ClassPersistenceDelegate()); PersistenceDelegate pd = new PrimitivePersistenceDelegate(); delegates.put(Boole... |
delegates.put(java.util.IdentityHashMap.class, pd); delegates.put(java.util.LinkedHashMap.class, pd); delegates.put(java.util.Properties.class, pd); delegates.put(java.awt.RenderingHints.class, pd); delegates.put(java.util.WeakHashMap.class, pd); delegates.put(javax.swing.UIDefaults.class, pd); | private static void setupDefaultPersistenceDelegates() { synchronized (delegates) { if (defaultPersistenceDelegate != null) return; delegates.put(Class.class, new ClassPersistenceDelegate()); PersistenceDelegate pd = new PrimitivePersistenceDelegate(); delegates.put(Boole... | |
if (id == MOUSE_RELEASED) this.modifiersEx &= ~(BUTTON1_DOWN_MASK | BUTTON2_DOWN_MASK | BUTTON3_DOWN_MASK); | public MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int button) { super(source, id, when, modifiers); this.x = x; this.y = y; this.clickCount = clickCount; this.popupTrigger = popupTrigger; t... | |
if ((modifiers & EventModifier.NEW_MASK) != 0) { int mod = modifiers; if ((mod & (ALT_DOWN_MASK | BUTTON2_DOWN_MASK)) != 0) mod |= ALT_DOWN_MASK | BUTTON2_DOWN_MASK; if ((mod & (META_DOWN_MASK | BUTTON3_DOWN_MASK)) != 0) mod |= META_DOWN_MASK | BUTTON3_DOWN_MASK; s.append(",modifiers=").append(getModifiersExText(mod));... | if (modifiersEx != 0) s.append(",extModifiers=").append(getModifiersExText(modifiersEx)); | public String paramString() { StringBuffer s = new StringBuffer(); switch (id) { case MOUSE_CLICKED: s.append("MOUSE_CLICKED,("); break; case MOUSE_PRESSED: s.append("MOUSE_PRESSED,("); break; case MOUSE_RELEASED: s.append("MOUSE_RELEASED,("); break... |
modifiers = EventModifier.extend(modifiers); | modifiersEx = EventModifier.extend(modifiers) & EventModifier.NEW_MASK; | private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); if ((modifiers & EventModifier.OLD_MASK) != 0) { if ((modifiers & BUTTON1_MASK) != 0) button = BUTTON1; else if ((modifiers & BUTTON2_MASK) != 0) button = BUT... |
public String getUIClassID() { return "JPanel"; } | public String getUIClassID() { return "PanelUI"; } | public String getUIClassID() { return "JPanel"; } |
if (Character.isLetter(thisChar)) { | if ((thisChar >= 'A' && thisChar <= 'Z') || (thisChar >= 'a' && thisChar <= 'z')) { | private void compileFormat(String pattern) { // Any alphabetical characters are treated as pattern characters // unless enclosed in single quotes. char thisChar; int pos; int field; FieldSizePair current = null; for (int i=0; i<pattern.length(); i++) { thisChar = pattern.charAt(i); fi... |
tokens.addElement(new FieldSizePair(-1,0)); | tokens.add(new FieldSizePair(-1,0)); | private void compileFormat(String pattern) { // Any alphabetical characters are treated as pattern characters // unless enclosed in single quotes. char thisChar; int pos; int field; FieldSizePair current = null; for (int i=0; i<pattern.length(); i++) { thisChar = pattern.charAt(i); fi... |
tokens.addElement(pattern.substring(i+1,pos+1)); | tokens.add(pattern.substring(i+1,pos+1)); | private void compileFormat(String pattern) { // Any alphabetical characters are treated as pattern characters // unless enclosed in single quotes. char thisChar; int pos; int field; FieldSizePair current = null; for (int i=0; i<pattern.length(); i++) { thisChar = pattern.charAt(i); fi... |
tokens.addElement(pattern.substring(i+1,pos)); | tokens.add(pattern.substring(i+1,pos)); | private void compileFormat(String pattern) { // Any alphabetical characters are treated as pattern characters // unless enclosed in single quotes. char thisChar; int pos; int field; FieldSizePair current = null; for (int i=0; i<pattern.length(); i++) { thisChar = pattern.charAt(i); fi... |
tokens.addElement(new Character(thisChar)); | tokens.add(new Character(thisChar)); | private void compileFormat(String pattern) { // Any alphabetical characters are treated as pattern characters // unless enclosed in single quotes. char thisChar; int pos; int field; FieldSizePair current = null; for (int i=0; i<pattern.length(); i++) { thisChar = pattern.charAt(i); fi... |
tokens.addElement(current); | tokens.add(current); | private void compileFormat(String pattern) { // Any alphabetical characters are treated as pattern characters // unless enclosed in single quotes. char thisChar; int pos; int field; FieldSizePair current = null; for (int i=0; i<pattern.length(); i++) { thisChar = pattern.charAt(i); fi... |
if (o == null) return false; | public boolean equals(Object o) { if (o == null) return false; if (!super.equals(o)) return false; if (!(o instanceof SimpleDateFormat)) return false; SimpleDateFormat sdf = (SimpleDateFormat)o; if (!toPattern().equals(sdf.toPattern())) return false; if (!get2DigitYearStart().eq... | |
if (!toPattern().equals(sdf.toPattern())) | if (defaultCentury != sdf.defaultCentury) | public boolean equals(Object o) { if (o == null) return false; if (!super.equals(o)) return false; if (!(o instanceof SimpleDateFormat)) return false; SimpleDateFormat sdf = (SimpleDateFormat)o; if (!toPattern().equals(sdf.toPattern())) return false; if (!get2DigitYearStart().eq... |
if (!get2DigitYearStart().equals(sdf.get2DigitYearStart())) | if (!toPattern().equals(sdf.toPattern())) | public boolean equals(Object o) { if (o == null) return false; if (!super.equals(o)) return false; if (!(o instanceof SimpleDateFormat)) return false; SimpleDateFormat sdf = (SimpleDateFormat)o; if (!toPattern().equals(sdf.toPattern())) return false; if (!get2DigitYearStart().eq... |
calendar.setTimeZone (tz); | public Date parse (String dateStr, ParsePosition pos) { int fmt_index = 0; int fmt_max = pattern.length(); calendar.clear(); boolean saw_timezone = false; int quote_start = -1; boolean is2DigitYear = false; for (; fmt_index < fmt_max; ++fmt_index) { char ch = pattern.charAt(fmt_index); if (... | |
if (limit_digits) numberFormat.setMaximumIntegerDigits(fmt_count); | public Date parse (String dateStr, ParsePosition pos) { int fmt_index = 0; int fmt_max = pattern.length(); calendar.clear(); boolean saw_timezone = false; int quote_start = -1; boolean is2DigitYear = false; for (; fmt_index < fmt_max; ++fmt_index) { char ch = pattern.charAt(fmt_index); if (... | |
tokens = new Vector(); | tokens = new ArrayList(); | private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); if (serialVersionOnStream < 1) { computeCenturyStart (); serialVersionOnStream = 1; } else // Ensure that defaultCentury gets set. set2DigitYearStart(defau... |
Enumeration e = tokens.elements(); while (e.hasMoreElements()) { output.append(e.nextElement().toString()); | Iterator i = tokens.iterator(); while (i.hasNext()) { output.append(i.next().toString()); | public String toString() { StringBuffer output = new StringBuffer(); Enumeration e = tokens.elements(); while (e.hasMoreElements()) { output.append(e.nextElement().toString()); } return output.toString(); } |
private void withLeadingZeros(int value, int length, StringBuffer buffer) | private void withLeadingZeros(int value, int length, FormatBuffer buffer) | private void withLeadingZeros(int value, int length, StringBuffer buffer) { String valStr = String.valueOf(value); for (length -= valStr.length(); length > 0; length--) buffer.append('0'); buffer.append(valStr); } |
eventSink.reader = reader; | private Document doParse(LSInput input) throws DOMException, LSException { // create event sink if (eventSink != null) { throw new LSException(LSException.PARSE_ERR, "parse in progress"); } InputSource source = getInputSource(input); eventSink = (filter == null) ? new SAXEventSink() :... | |
return "JTree"; | return "TreeUI"; | public String getUIClassID() { return "JTree"; } |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); shadow = defaults.getColor("Separator.shadow"); highlight = defaults.getColor("Separator.highlight"); | shadow = UIManager.getColor("Separator.shadow"); highlight = UIManager.getColor("Separator.highlight"); | protected void installDefaults(JSeparator s) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); shadow = defaults.getColor("Separator.shadow"); highlight = defaults.getColor("Separator.highlight"); s.setOpaque(false); } |
throw new Error ("not implemented"); | return ("scrollpane=" + sp + ", orientation=" + orientation + ", value=" + value + ", minimum=" + minimum + ", maximum=" + maximum + ", visibleAmount=" + visibleAmount + ", unitIncrement=" + unitIncrement + ", blockIncrement=" + blockIncrement); | public String paramString () { throw new Error ("not implemented"); } |
public int getOffset() | protected int getOffset() | public int getOffset() { return 0; } |
throws NotImplementedException | public int getGlyphCharIndex (int glyphIndex) throws NotImplementedException { throw new Error ("not implemented"); } | |
throw new Error ("not implemented"); | return glyphIndex; | public int getGlyphCharIndex (int glyphIndex) throws NotImplementedException { throw new Error ("not implemented"); } |
throws NotImplementedException | public int[] getGlyphCharIndices (int beginGlyphIndex, int numEntries, int[] codeReturn) throws NotImplementedException { throw new Error ("not implemented"); } | |
throw new Error ("not implemented"); | if (codeReturn == null) codeReturn = new int[numEntries]; int i = 0; int j = beginGlyphIndex; while (j < numEntries) codeReturn[i++] = getGlyphCharIndex(j++); return codeReturn; | public int[] getGlyphCharIndices (int beginGlyphIndex, int numEntries, int[] codeReturn) throws NotImplementedException { throw new Error ("not implemented"); } |
throws NotImplementedException | public Rectangle getGlyphPixelBounds (int index, FontRenderContext renderFRC, float x, float y) throws NotImplementedException { throw new Error ("not implemented"); } | |
throw new Error ("not implemented"); | Rectangle bounds = new Rectangle(); Rectangle2D rect = getGlyphVisualBounds(index).getBounds2D(); bounds.x = (int) (rect.getX() + x); bounds.y = (int) (rect.getY() + y); bounds.width = (int) rect.getMaxX() - bounds.x; bounds.height = (int) rect.getMaxY() - bounds.y; return bounds; | public Rectangle getGlyphPixelBounds (int index, FontRenderContext renderFRC, float x, float y) throws NotImplementedException { throw new Error ("not implemented"); } |
throws NotImplementedException | public Rectangle getPixelBounds (FontRenderContext renderFRC, float x, float y) throws NotImplementedException { throw new Error ("not implemented"); } | |
throw new Error ("not implemented"); | Rectangle bounds = new Rectangle(); Rectangle2D rect = getVisualBounds(); bounds.x = (int) (rect.getX() + x); bounds.y = (int) (rect.getY() + y); bounds.width = (int) rect.getMaxX() - bounds.x; bounds.height = (int) rect.getMaxY() - bounds.y; return bounds; | public Rectangle getPixelBounds (FontRenderContext renderFRC, float x, float y) throws NotImplementedException { throw new Error ("not implemented"); } |
map.put("n", "Next threads"); | map.put("n", "Next thread"); | public void fillHelp(Map map) { super.fillHelp(map); map.put("n", "Next threads"); map.put("r", "Reset the list"); } |
rx.initCause(exc); | rx.detail = exc; | protected void activate() throws RemoteException { try { Remote self = actId.activate(false); // This will call UnicastServer.exportObject, replacing null by // the activated object (self) in the object map. exportObject(self); } catch (RemoteException rex) { ... |
Dimension ss = ((JNodeToolkit) Toolkit.getDefaultToolkit()).changeScreenSize(resolution); | ((JNodeToolkit) Toolkit.getDefaultToolkit()).changeScreenSize(resolution); | public void run() { SwingUtilities.invokeLater(new Runnable() { public void run() { final ClassLoader cl = getClass().getClassLoader(); final ExtensionPoint appsEP; if (cl instanceof PluginClassLoader) { appsEP = ((PluginClassLoader) ... |
ctx.adjustDesktopSize(ss.width, ss.height); System.out.println("screenres1: " + ss); System.out.println("screenres2: " + Toolkit.getDefaultToolkit().getScreenSize()); | public void run() { SwingUtilities.invokeLater(new Runnable() { public void run() { final ClassLoader cl = getClass().getClassLoader(); final ExtensionPoint appsEP; if (cl instanceof PluginClassLoader) { appsEP = ((PluginClassLoader) ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.