bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public void select(int index) { ((JComboBox)jComponent).setSelectedIndex(index); }
public void select(int index) { ((JComboBox)jComponent).setSelectedIndex(index); }
6,364
public abstract void addItem(String item, int index);
public abstract void addItem(String item, int index);
6,365
public static final DateFormat getTimeInstance (int style, Locale loc) { return computeInstance (style, loc, false, true); }
public static final DateFormat getTimeInstance () { return computeInstance (style, loc, false, true); }
6,366
public static final DateFormat getTimeInstance (int style, Locale loc) { return computeInstance (style, loc, false, true); }
public static final DateFormat getTimeInstance (int style, Locale loc) { return getTimeInstance (DEFAULT, Locale.getDefault()); }
6,367
public static Locale[] getAvailableLocales() { /* I only return those for which localized language * or country information exists. * XXX - remove hard coded list, and implement more locales (Sun's JDK 1.4 * has 148 installed locales!). */ return new Locale[] { ENGLISH, FRENCH, GERMAN, new Locale("ga", "") }; }
public static synchronized Locale[] getAvailableLocales() { /* I only return those for which localized language * or country information exists. * XXX - remove hard coded list, and implement more locales (Sun's JDK 1.4 * has 148 installed locales!). */ return new Locale[] { ENGLISH, FRENCH, GERMAN, new Locale("ga", "") }; }
6,368
public static Locale[] getAvailableLocales() { /* I only return those for which localized language * or country information exists. * XXX - remove hard coded list, and implement more locales (Sun's JDK 1.4 * has 148 installed locales!). */ return new Locale[] { ENGLISH, FRENCH, GERMAN, new Locale("ga", "") }; }
public static Locale[] getAvailableLocales() { /* I only return those for which localized language * or country information exists. * XXX - remove hard coded list, and implement more locales (Sun's JDK 1.4 * has 148 installed locales!). */ return new Locale[] { ENGLISH, FRENCH, GERMAN, new Locale("ga", "") }; }
6,369
public static Locale[] getAvailableLocales() { /* I only return those for which localized language * or country information exists. * XXX - remove hard coded list, and implement more locales (Sun's JDK 1.4 * has 148 installed locales!). */ return new Locale[] { ENGLISH, FRENCH, GERMAN, new Locale("ga", "") }; }
public static Locale[] getAvailableLocales() { /* I only return those for which localized language * or country information exists. * XXX - remove hard coded list, and implement more locales (Sun's JDK 1.4 * has 148 installed locales!). */ return new Locale[] { ENGLISH, FRENCH, GERMAN, new Locale("ga", "") }; }
6,370
void clear(int index) { offset = index; this.index = 0; for (int i = 0; i < start.length; i++) { start[i] = end[i] = -1; } next = null; // cut off alternates empty = false; }
void clear(int index) { offset = index; this.index = 0; for (int i = 0; i < start.length; i++) { start[i] = end[i] = -1; } next = null; // cut off alternates }
6,371
InetAddress(byte[] ipaddr, String hostname) { addr = (null == ipaddr) ? null : (byte[]) ipaddr.clone(); hostName = hostname; lookup_time = System.currentTimeMillis(); family = 2; /* AF_INET */ }
InetAddress(byte[] ipaddr, String hostname) { addr = (null == ipaddr) ? null : (byte[]) ipaddr.clone(); hostName = hostname; family = 2; /* AF_INET */ }
6,373
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(hostname, -1); InetAddress[] addresses; // Default to current host if necessary if (hostname == null) { addresses = new InetAddress[1]; addresses[0] = LOCALHOST; return addresses; } // Check the cache for this host before doing a lookup addresses = checkCacheFor(hostname); if (addresses != null) return addresses; // Not in cache, try the lookup byte[][] iplist = VMInetAddress.getHostByName(hostname); if (iplist.length == 0) throw new UnknownHostException(hostname); addresses = new InetAddress[iplist.length]; for (int i = 0; i < iplist.length; i++) { if (iplist[i].length != 4) throw new UnknownHostException(hostname); addresses[i] = new Inet4Address(iplist[i], hostname); } addToCache(hostname, addresses); return addresses; }
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(hostname, -1); InetAddress[] addresses; // Default to current host if necessary if (hostname == null || hostname.equals("")) { addresses = new InetAddress[1]; addresses[0] = LOCALHOST; return addresses; } // Check the cache for this host before doing a lookup addresses = checkCacheFor(hostname); if (addresses != null) return addresses; // Not in cache, try the lookup byte[][] iplist = VMInetAddress.getHostByName(hostname); if (iplist.length == 0) throw new UnknownHostException(hostname); addresses = new InetAddress[iplist.length]; for (int i = 0; i < iplist.length; i++) { if (iplist[i].length != 4) throw new UnknownHostException(hostname); addresses[i] = new Inet4Address(iplist[i], hostname); } addToCache(hostname, addresses); return addresses; }
6,374
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(hostname, -1); InetAddress[] addresses; // Default to current host if necessary if (hostname == null) { addresses = new InetAddress[1]; addresses[0] = LOCALHOST; return addresses; } // Check the cache for this host before doing a lookup addresses = checkCacheFor(hostname); if (addresses != null) return addresses; // Not in cache, try the lookup byte[][] iplist = VMInetAddress.getHostByName(hostname); if (iplist.length == 0) throw new UnknownHostException(hostname); addresses = new InetAddress[iplist.length]; for (int i = 0; i < iplist.length; i++) { if (iplist[i].length != 4) throw new UnknownHostException(hostname); addresses[i] = new Inet4Address(iplist[i], hostname); } addToCache(hostname, addresses); return addresses; }
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(hostname, -1); InetAddress[] addresses; // Default to current host if necessary if (hostname == null) { addresses = new InetAddress[1]; addresses[0] = LOCALHOST; return addresses; } // Check the cache for this host before doing a lookup addresses = checkCacheFor(hostname); if (addresses != null) return addresses; // Not in cache, try the lookup byte[][] iplist = VMInetAddress.getHostByName(hostname); if (iplist.length == 0) throw new UnknownHostException(hostname); addresses = new InetAddress[iplist.length]; for (int i = 0; i < iplist.length; i++) { if (iplist[i].length != 4) throw new UnknownHostException(hostname); addresses[i] = new Inet4Address(iplist[i], hostname); } addToCache(hostname, addresses); return addresses; }
6,375
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(hostname, -1); InetAddress[] addresses; // Default to current host if necessary if (hostname == null) { addresses = new InetAddress[1]; addresses[0] = LOCALHOST; return addresses; } // Check the cache for this host before doing a lookup addresses = checkCacheFor(hostname); if (addresses != null) return addresses; // Not in cache, try the lookup byte[][] iplist = VMInetAddress.getHostByName(hostname); if (iplist.length == 0) throw new UnknownHostException(hostname); addresses = new InetAddress[iplist.length]; for (int i = 0; i < iplist.length; i++) { if (iplist[i].length != 4) throw new UnknownHostException(hostname); addresses[i] = new Inet4Address(iplist[i], hostname); } addToCache(hostname, addresses); return addresses; }
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(hostname, -1); InetAddress[] addresses; // Default to current host if necessary if (hostname == null) { addresses = new InetAddress[1]; addresses[0] = LOCALHOST; return addresses; } // Check the cache for this host before doing a lookup addresses = checkCacheFor(hostname); if (addresses != null) return addresses; // Not in cache, try the lookup byte[][] iplist = VMInetAddress.getHostByName(hostname); if (iplist.length == 0) throw new UnknownHostException(hostname); addresses = new InetAddress[iplist.length]; for (int i = 0; i < iplist.length; i++) { if (iplist[i].length != 4) throw new UnknownHostException(hostname); addresses[i] = new Inet4Address(iplist[i], hostname); } return addresses; }
6,376
Inet4Address(byte[] addr, String host) { this(addr, host, null); }
Inet4Address(byte[] addr) { this(addr, host, null); }
6,378
Inet4Address(byte[] addr, String host) { this(addr, host, null); }
Inet4Address(byte[] addr, String host) { this(addr, host, null); }
6,379
public void actionPerformed(ActionEvent e) { Object value = new Integer(JOptionPane.CLOSED_OPTION); Object[] options = optionPane.getOptions(); if (options != null) value = new Integer(buttonIndex); else { String text = ((JButton) e.getSource()).getText(); if (text.equals(OK_STRING)) value = new Integer(JOptionPane.OK_OPTION); if (text.equals(CANCEL_STRING)) value = new Integer(JOptionPane.CANCEL_OPTION); if (text.equals(YES_STRING)) value = new Integer(JOptionPane.YES_OPTION); if (text.equals(NO_STRING)) value = new Integer(JOptionPane.NO_OPTION); } optionPane.setValue(value); resetInputValue(); Window owner = SwingUtilities.windowForComponent(optionPane); if (owner instanceof JDialog) ((JDialog) owner).dispose(); //else we probably have some kind of internal frame. JInternalFrame inf = (JInternalFrame) SwingUtilities.getAncestorOfClass(JInternalFrame.class, optionPane); if (inf != null) { try { inf.setClosed(true); } catch (PropertyVetoException pve) { } } }
public void actionPerformed(ActionEvent e) { Object value = new Integer(JOptionPane.CLOSED_OPTION); Object[] options = optionPane.getOptions(); if (options != null) value = new Integer(buttonIndex); else { String text = ((JButton) e.getSource()).getText(); if (text.equals(OK_STRING)) value = new Integer(JOptionPane.OK_OPTION); if (text.equals(CANCEL_STRING)) value = new Integer(JOptionPane.CANCEL_OPTION); if (text.equals(YES_STRING)) value = new Integer(JOptionPane.YES_OPTION); if (text.equals(NO_STRING)) value = new Integer(JOptionPane.NO_OPTION); } optionPane.setValue(value); resetInputValue(); Window owner = SwingUtilities.windowForComponent(optionPane); if (owner instanceof JDialog) ((JDialog) owner).dispose(); //else we probably have some kind of internal frame. JInternalFrame inf = (JInternalFrame) SwingUtilities.getAncestorOfClass(JInternalFrame.class, optionPane); if (inf != null) { try { inf.setClosed(true); } catch (PropertyVetoException pve) { } } }
6,380
public ButtonAreaLayout(boolean syncAllWidths, int padding) { this.syncAllWidths = syncAllWidths; this.padding = padding; }
public ButtonAreaLayout(boolean syncAllWidths, int padding) { this.syncAllWidths = syncAllWidths; this.padding = padding; }
6,381
public void addLayoutComponent(String string, Component comp) { // Do nothing. }
public void addLayoutComponent(String string, Component comp) { // Do nothing. }
6,382
private int buttonRowLength(Container c) { Component[] buttonList = c.getComponents(); int buttonLength = 0; int widest = 0; int tallest = 0; for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); buttonLength += dims.width + getPadding(); widest = Math.max(widest, dims.width); tallest = Math.max(tallest, dims.height); } widthOfWidestButton = widest; tallestButton = tallest; int width; if (getSyncAllWidths()) width = widest * buttonList.length + getPadding() * (buttonList.length - 1); else width = buttonLength; Insets insets = c.getInsets(); width += insets.left + insets.right; return width; }
private int buttonRowLength(Container c) { Component[] buttonList = c.getComponents(); int buttonLength = 0; int widest = 0; int tallest = 0; for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); buttonLength += dims.width + getPadding(); widest = Math.max(widest, dims.width); tallest = Math.max(tallest, dims.height); } widthOfWidestButton = widest; tallestButton = tallest; int width; if (getSyncAllWidths()) width = widest * buttonList.length + getPadding() * (buttonList.length - 1); else width = buttonLength; Insets insets = c.getInsets(); width += insets.left + insets.right; return width; }
6,383
public boolean getCentersChildren() { return centersChildren; }
public boolean getCentersChildren() { return centersChildren; }
6,384
public boolean getCentersChildren() { return centersChildren; }
public boolean getCentersChildren() { return centersChildren; }
6,385
public int getPadding() { return padding; }
public int getPadding() { return padding; }
6,386
public boolean getSyncAllWidths() { return syncAllWidths; }
public boolean getSyncAllWidths() { return syncAllWidths; }
6,387
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
6,388
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
6,389
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
6,390
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
6,391
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
6,392
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
6,393
public Dimension preferredLayoutSize(Container c) { int w = buttonRowLength(c); return new Dimension(w, tallestButton); }
public Dimension preferredLayoutSize(Container c) { int w = buttonRowLength(c); return new Dimension(w, tallestButton); }
6,394
public Dimension preferredLayoutSize(Container c) { int w = buttonRowLength(c); return new Dimension(w, tallestButton); }
public Dimension preferredLayoutSize(Container c) { int w = buttonRowLength(c); return new Dimension(w, tallestButton); }
6,395
public void removeLayoutComponent(Component c) { // Do nothing. }
public void removeLayoutComponent(Component c) { // Do nothing. }
6,396
public void setCentersChildren(boolean newValue) { centersChildren = newValue; }
public void setCentersChildren(boolean newValue) { centersChildren = newValue; }
6,397
public void setPadding(int newPadding) { padding = newPadding; }
public void setPadding(int newPadding) { padding = newPadding; }
6,398
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JOptionPane.ICON_PROPERTY) || e.getPropertyName().equals(JOptionPane.MESSAGE_TYPE_PROPERTY)) addIcon(messageAreaContainer); else if (e.getPropertyName().equals(JOptionPane.INITIAL_SELECTION_VALUE_PROPERTY)) resetSelectedValue(); else if (e.getPropertyName().equals(JOptionPane.INITIAL_VALUE_PROPERTY) || e.getPropertyName().equals(JOptionPane.OPTIONS_PROPERTY) || e.getPropertyName().equals(JOptionPane.OPTION_TYPE_PROPERTY)) { Container newButtons = createButtonArea(); optionPane.remove(buttonContainer); optionPane.add(newButtons); buttonContainer = newButtons; } else if (e.getPropertyName().equals(JOptionPane.MESSAGE_PROPERTY) || e.getPropertyName().equals(JOptionPane.WANTS_INPUT_PROPERTY) || e.getPropertyName().equals(JOptionPane.SELECTION_VALUES_PROPERTY)) { optionPane.removeAll(); messageAreaContainer = createMessageArea(); optionPane.add(messageAreaContainer); optionPane.add(buttonContainer); } optionPane.invalidate(); optionPane.repaint(); }
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JOptionPane.ICON_PROPERTY) || e.getPropertyName().equals(JOptionPane.MESSAGE_TYPE_PROPERTY)) addIcon(messageAreaContainer); else if (e.getPropertyName().equals(JOptionPane.INITIAL_SELECTION_VALUE_PROPERTY)) resetSelectedValue(); else if (e.getPropertyName().equals(JOptionPane.INITIAL_VALUE_PROPERTY) || e.getPropertyName().equals(JOptionPane.OPTIONS_PROPERTY) || e.getPropertyName().equals(JOptionPane.OPTION_TYPE_PROPERTY)) { Container newButtons = createButtonArea(); optionPane.remove(buttonContainer); optionPane.add(newButtons); buttonContainer = newButtons; } else if (e.getPropertyName().equals(JOptionPane.MESSAGE_PROPERTY) || e.getPropertyName().equals(JOptionPane.WANTS_INPUT_PROPERTY) || e.getPropertyName().equals(JOptionPane.SELECTION_VALUES_PROPERTY)) { optionPane.removeAll(); messageAreaContainer = createMessageArea(); optionPane.add(messageAreaContainer); optionPane.add(buttonContainer); } optionPane.invalidate(); optionPane.repaint(); }
6,399
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JOptionPane.ICON_PROPERTY) || e.getPropertyName().equals(JOptionPane.MESSAGE_TYPE_PROPERTY)) addIcon(messageAreaContainer); else if (e.getPropertyName().equals(JOptionPane.INITIAL_SELECTION_VALUE_PROPERTY)) resetSelectedValue(); else if (e.getPropertyName().equals(JOptionPane.INITIAL_VALUE_PROPERTY) || e.getPropertyName().equals(JOptionPane.OPTIONS_PROPERTY) || e.getPropertyName().equals(JOptionPane.OPTION_TYPE_PROPERTY)) { Container newButtons = createButtonArea(); optionPane.remove(buttonContainer); optionPane.add(newButtons); buttonContainer = newButtons; } else if (e.getPropertyName().equals(JOptionPane.MESSAGE_PROPERTY) || e.getPropertyName().equals(JOptionPane.WANTS_INPUT_PROPERTY) || e.getPropertyName().equals(JOptionPane.SELECTION_VALUES_PROPERTY)) { optionPane.removeAll(); messageAreaContainer = createMessageArea(); optionPane.add(messageAreaContainer); optionPane.add(buttonContainer); } optionPane.invalidate(); optionPane.repaint(); }
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JOptionPane.ICON_PROPERTY) || e.getPropertyName().equals(JOptionPane.MESSAGE_TYPE_PROPERTY)) addIcon(messageAreaContainer); else if (e.getPropertyName().equals(JOptionPane.INITIAL_SELECTION_VALUE_PROPERTY)) resetSelectedValue(); else if (e.getPropertyName().equals(JOptionPane.INITIAL_VALUE_PROPERTY) || e.getPropertyName().equals(JOptionPane.OPTIONS_PROPERTY) || e.getPropertyName().equals(JOptionPane.OPTION_TYPE_PROPERTY)) { Container newButtons = createButtonArea(); optionPane.remove(buttonContainer); optionPane.add(newButtons); buttonContainer = newButtons; } else if (e.getPropertyName().equals(JOptionPane.MESSAGE_PROPERTY) || e.getPropertyName().equals(JOptionPane.WANTS_INPUT_PROPERTY) || e.getPropertyName().equals(JOptionPane.SELECTION_VALUES_PROPERTY)) { optionPane.removeAll(); messageAreaContainer = createMessageArea(); optionPane.add(messageAreaContainer); optionPane.add(buttonContainer); } optionPane.invalidate(); optionPane.repaint(); }
6,400
protected Container createMessageArea() { JPanel messageArea = new JPanel(); messageArea.setLayout(new BorderLayout()); addIcon(messageArea); JPanel rightSide = new JPanel(); rightSide.setBorder(BorderFactory.createEmptyBorder(0, 11, 17, 0)); rightSide.setLayout(new GridBagLayout()); GridBagConstraints con = createConstraints(); addMessageComponents(rightSide, con, getMessage(), getMaxCharactersPerLineCount(), false); if (optionPane.getWantsInput()) { Object[] selection = optionPane.getSelectionValues(); if (selection == null) inputComponent = new JTextField(15); else if (selection.length < 20) inputComponent = new JComboBox(selection); else inputComponent = new JList(selection); if (inputComponent != null) { addMessageComponents(rightSide, con, inputComponent, getMaxCharactersPerLineCount(), false); resetSelectedValue(); selectInitialValue(optionPane); } } messageArea.add(rightSide, BorderLayout.EAST); return messageArea; }
protected Container createMessageArea() { JPanel messageArea = new JPanel(); messageArea.setLayout(new BorderLayout()); addIcon(messageArea); JPanel rightSide = new JPanel(); rightSide.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); rightSide.setLayout(new GridBagLayout()); GridBagConstraints con = createConstraints(); addMessageComponents(rightSide, con, getMessage(), getMaxCharactersPerLineCount(), false); if (optionPane.getWantsInput()) { Object[] selection = optionPane.getSelectionValues(); if (selection == null) inputComponent = new JTextField(15); else if (selection.length < 20) inputComponent = new JComboBox(selection); else inputComponent = new JList(selection); if (inputComponent != null) { addMessageComponents(rightSide, con, inputComponent, getMaxCharactersPerLineCount(), false); resetSelectedValue(); selectInitialValue(optionPane); } } messageArea.add(rightSide, BorderLayout.EAST); return messageArea; }
6,401
protected Container createMessageArea() { JPanel messageArea = new JPanel(); messageArea.setLayout(new BorderLayout()); addIcon(messageArea); JPanel rightSide = new JPanel(); rightSide.setBorder(BorderFactory.createEmptyBorder(0, 11, 17, 0)); rightSide.setLayout(new GridBagLayout()); GridBagConstraints con = createConstraints(); addMessageComponents(rightSide, con, getMessage(), getMaxCharactersPerLineCount(), false); if (optionPane.getWantsInput()) { Object[] selection = optionPane.getSelectionValues(); if (selection == null) inputComponent = new JTextField(15); else if (selection.length < 20) inputComponent = new JComboBox(selection); else inputComponent = new JList(selection); if (inputComponent != null) { addMessageComponents(rightSide, con, inputComponent, getMaxCharactersPerLineCount(), false); resetSelectedValue(); selectInitialValue(optionPane); } } messageArea.add(rightSide, BorderLayout.EAST); return messageArea; }
protected Container createMessageArea() { JPanel messageArea = new JPanel(); messageArea.setLayout(new BorderLayout()); addIcon(messageArea); JPanel rightSide = new JPanel(); rightSide.setBorder(BorderFactory.createEmptyBorder(0, 11, 17, 0)); rightSide.setLayout(new GridBagLayout()); GridBagConstraints con = createConstraints(); addMessageComponents(rightSide, con, getMessage(), getMaxCharactersPerLineCount(), false); if (optionPane.getWantsInput()) { Object[] selection = optionPane.getSelectionValues(); if (selection == null) inputComponent = new JTextField(15); else if (selection.length < 20) inputComponent = new JComboBox(selection); else inputComponent = new JList(selection); if (inputComponent != null) { addMessageComponents(rightSide, con, inputComponent, getMaxCharactersPerLineCount(), false); resetSelectedValue(); selectInitialValue(optionPane); } } messageArea.add(rightSide, BorderLayout.EAST); return messageArea; }
6,402
protected Container createMessageArea() { JPanel messageArea = new JPanel(); messageArea.setLayout(new BorderLayout()); addIcon(messageArea); JPanel rightSide = new JPanel(); rightSide.setBorder(BorderFactory.createEmptyBorder(0, 11, 17, 0)); rightSide.setLayout(new GridBagLayout()); GridBagConstraints con = createConstraints(); addMessageComponents(rightSide, con, getMessage(), getMaxCharactersPerLineCount(), false); if (optionPane.getWantsInput()) { Object[] selection = optionPane.getSelectionValues(); if (selection == null) inputComponent = new JTextField(15); else if (selection.length < 20) inputComponent = new JComboBox(selection); else inputComponent = new JList(selection); if (inputComponent != null) { addMessageComponents(rightSide, con, inputComponent, getMaxCharactersPerLineCount(), false); resetSelectedValue(); selectInitialValue(optionPane); } } messageArea.add(rightSide, BorderLayout.EAST); return messageArea; }
protected Container createMessageArea() { JPanel messageArea = new JPanel(); messageArea.setLayout(new BorderLayout()); addIcon(messageArea); JPanel rightSide = new JPanel(); rightSide.setBorder(BorderFactory.createEmptyBorder(0, 11, 17, 0)); rightSide.setLayout(new GridBagLayout()); GridBagConstraints con = createConstraints(); addMessageComponents(rightSide, con, getMessage(), getMaxCharactersPerLineCount(), false); if (optionPane.getWantsInput()) { Object[] selection = optionPane.getSelectionValues(); if (selection == null) inputComponent = new JTextField(15); else if (selection.length < 20) inputComponent = new JComboBox(selection); else inputComponent = new JList(selection); if (inputComponent != null) { addMessageComponents(rightSide, con, inputComponent, getMaxCharactersPerLineCount(), false); resetSelectedValue(); selectInitialValue(optionPane); } } messageArea.add(rightSide, BorderLayout.CENTER); return messageArea; }
6,403
protected Object[] getButtons() { if (optionPane.getOptions() != null) return optionPane.getOptions(); switch (optionPane.getOptionType()) { case JOptionPane.YES_NO_OPTION: return new Object[] { YES_STRING, NO_STRING }; case JOptionPane.YES_NO_CANCEL_OPTION: return new Object[] { YES_STRING, NO_STRING, CANCEL_STRING }; case JOptionPane.OK_CANCEL_OPTION: case JOptionPane.DEFAULT_OPTION: return new Object[] { OK_STRING, CANCEL_STRING }; } return null; }
protected Object[] getButtons() { if (optionPane.getOptions() != null) return optionPane.getOptions(); switch (optionPane.getOptionType()) { case JOptionPane.YES_NO_OPTION: return new Object[] { YES_STRING, NO_STRING }; case JOptionPane.YES_NO_CANCEL_OPTION: return new Object[] { YES_STRING, NO_STRING, CANCEL_STRING }; case JOptionPane.OK_CANCEL_OPTION: case JOptionPane.DEFAULT_OPTION: return (optionPane.getWantsInput() ) ? new Object[] { OK_STRING, CANCEL_STRING } : ( optionPane.getMessageType() == JOptionPane.QUESTION_MESSAGE ) ? new Object[] { YES_STRING, NO_STRING, CANCEL_STRING } : new Object[] { OK_STRING }; } return null; }
6,404
protected Object[] getButtons() { if (optionPane.getOptions() != null) return optionPane.getOptions(); switch (optionPane.getOptionType()) { case JOptionPane.YES_NO_OPTION: return new Object[] { YES_STRING, NO_STRING }; case JOptionPane.YES_NO_CANCEL_OPTION: return new Object[] { YES_STRING, NO_STRING, CANCEL_STRING }; case JOptionPane.OK_CANCEL_OPTION: case JOptionPane.DEFAULT_OPTION: return new Object[] { OK_STRING, CANCEL_STRING }; } return null; }
protected Object[] getButtons() { if (optionPane.getOptions() != null) return optionPane.getOptions(); switch (optionPane.getOptionType()) { case JOptionPane.YES_NO_OPTION: return new Object[] { YES_STRING, NO_STRING }; case JOptionPane.YES_NO_CANCEL_OPTION: return new Object[] { YES_STRING, NO_STRING, CANCEL_STRING }; case JOptionPane.OK_CANCEL_OPTION: case JOptionPane.DEFAULT_OPTION: return new Object[] { OK_STRING, CANCEL_STRING }; } return null; }
6,405
public Dimension getPreferredSize(JComponent c) { Dimension d = optionPane.getLayout().preferredLayoutSize(optionPane); Dimension d2 = getMinimumOptionPaneSize(); int w = Math.max(d.width, d2.width); int h = Math.max(d.height, d2.height); return new Dimension(w, h); }
public Dimension getPreferredSize(JComponent c) { Dimension d = optionPane.getLayout().preferredLayoutSize(optionPane); Dimension d2 = getMinimumOptionPaneSize(); int w = Math.max(d.width, d2.width); int h = Math.max(d.height, d2.height); return new Dimension(w, h); }
6,406
protected void installComponents() { // reset it. hasCustomComponents = false; Container msg = createMessageArea(); if (msg != null) { ((JComponent) msg).setBorder(messageBorder); msg.setForeground(messageForeground); messageAreaContainer = msg; optionPane.add(msg); } // FIXME: Figure out if the separator should be inserted here or what // this thing is supposed to do. Note: The JDK does NOT insert another // component at this place. The JOptionPane only has two panels in it // and there actually are applications that depend on this beeing so. Container sep = createSeparator(); if (sep != null) optionPane.add(sep); Container button = createButtonArea(); if (button != null) { ((JComponent) button).setBorder(buttonBorder); buttonContainer = button; optionPane.add(button); } optionPane.setBorder(BorderFactory.createEmptyBorder(12, 12, 11, 11)); optionPane.invalidate(); }
protected void installComponents() { // reset it. hasCustomComponents = false; Container msg = createMessageArea(); if (msg != null) { ((JComponent) msg).setBorder(messageBorder); msg.setForeground(messageForeground); messageAreaContainer = msg; optionPane.add(msg); } // FIXME: Figure out if the separator should be inserted here or what // this thing is supposed to do. Note: The JDK does NOT insert another // component at this place. The JOptionPane only has two panels in it // and there actually are applications that depend on this beeing so. Container sep = createSeparator(); if (sep != null) optionPane.add(sep); Container button = createButtonArea(); if (button != null) { ((JComponent) button).setBorder(buttonBorder); buttonContainer = button; optionPane.add(button); } optionPane.setBorder(BorderFactory.createEmptyBorder(12, 12, 11, 11)); optionPane.invalidate(); }
6,407
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); optionPane.setFont(defaults.getFont("OptionPane.font")); optionPane.setBackground(defaults.getColor("OptionPane.background")); optionPane.setForeground(defaults.getColor("OptionPane.foreground")); optionPane.setBorder(defaults.getBorder("OptionPane.border")); optionPane.setOpaque(true); messageBorder = defaults.getBorder("OptionPane.messageAreaBorder"); messageForeground = defaults.getColor("OptionPane.messageForeground"); buttonBorder = defaults.getBorder("OptionPane.buttonAreaBorder"); minimumSize = defaults.getDimension("OptionPane.minimumSize"); minimumWidth = minimumSize.width; minimumHeight = minimumSize.height; // FIXME: Image icons don't seem to work properly right now. // Once they do, replace the synthetic icons with these ones. /* warningIcon = (IconUIResource) defaults.getIcon("OptionPane.warningIcon"); infoIcon = (IconUIResource) defaults.getIcon("OptionPane.informationIcon"); errorIcon = (IconUIResource) defaults.getIcon("OptionPane.errorIcon"); questionIcon = (IconUIResource) defaults.getIcon("OptionPane.questionIcon"); */ }
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); optionPane.setFont(defaults.getFont("OptionPane.font")); optionPane.setBackground(defaults.getColor("OptionPane.background")); optionPane.setForeground(defaults.getColor("OptionPane.foreground")); optionPane.setBorder(defaults.getBorder("OptionPane.border")); optionPane.setOpaque(true); messageBorder = defaults.getBorder("OptionPane.messageAreaBorder"); messageForeground = defaults.getColor("OptionPane.messageForeground"); buttonBorder = defaults.getBorder("OptionPane.buttonAreaBorder"); minimumSize = defaults.getDimension("OptionPane.minimumSize"); minimumWidth = minimumSize.width; minimumHeight = minimumSize.height; // FIXME: Image icons don't seem to work properly right now. // Once they do, replace the synthetic icons with these ones. /* warningIcon = (IconUIResource) defaults.getIcon("OptionPane.warningIcon"); infoIcon = (IconUIResource) defaults.getIcon("OptionPane.informationIcon"); errorIcon = (IconUIResource) defaults.getIcon("OptionPane.errorIcon"); questionIcon = (IconUIResource) defaults.getIcon("OptionPane.questionIcon"); */ }
6,408
void resetSelectedValue() { if (inputComponent != null) { Object init = optionPane.getInitialSelectionValue(); if (init == null) return; if (inputComponent instanceof JTextField) ((JTextField) inputComponent).setText((String) init); else if (inputComponent instanceof JComboBox) ((JComboBox) inputComponent).setSelectedItem(init); else if (inputComponent instanceof JList) { // ((JList) inputComponent).setSelectedValue(init, true); } } }
void resetSelectedValue() { if (inputComponent != null) { Object init = optionPane.getInitialSelectionValue(); if (init == null) return; if (inputComponent instanceof JTextField) ((JTextField) inputComponent).setText((String) init); else if (inputComponent instanceof JComboBox) ((JComboBox) inputComponent).setSelectedItem(init); else if (inputComponent instanceof JList) { // ((JList) inputComponent).setSelectedValue(init, true); } } }
6,409
public static void debug(String msg) { if (priority > Priority.DEBUG) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.debug()"); e.printStackTrace(); } }
public static void debug (String msg) { if (priority > Priority.DEBUG) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.debug()"); e.printStackTrace(); } }
6,410
public static void debug(String msg) { if (priority > Priority.DEBUG) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.debug()"); e.printStackTrace(); } }
public static void debug(String msg) { if (priority > Priority.DEBUG) return; try { output.write(msg.getBytes()); } catch (IOException e) { System.err.println("error in Log.debug()"); e.printStackTrace(); } }
6,411
public static void error(String msg) { if (priority > Priority.ERROR) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.error()"); e.printStackTrace(); } }
public static void error (String msg) { if (priority > Priority.ERROR) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.error()"); e.printStackTrace(); } }
6,413
public static void error(String msg) { if (priority > Priority.ERROR) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.error()"); e.printStackTrace(); } }
public static void error(String msg) { if (priority > Priority.ERROR) return; try { output.write(msg.getBytes()); } catch (IOException e) { System.err.println("error in Log.error()"); e.printStackTrace(); } }
6,414
public static void info(String msg) { if (priority > Priority.INFO) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.info()"); e.printStackTrace(); } }
public static void info (String msg) { if (priority > Priority.INFO) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.info()"); e.printStackTrace(); } }
6,415
public static void info(String msg) { if (priority > Priority.INFO) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.info()"); e.printStackTrace(); } }
public static void info(String msg) { if (priority > Priority.INFO) return; try { output.write(msg.getBytes()); } catch (IOException e) { System.err.println("error in Log.info()"); e.printStackTrace(); } }
6,416
public static void warn(String msg) { if (priority > Priority.WARN) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.warn()"); e.printStackTrace(); } }
public static void warn (String msg) { if (priority > Priority.WARN) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.warn()"); e.printStackTrace(); } }
6,417
public static void warn(String msg) { if (priority > Priority.WARN) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.warn()"); e.printStackTrace(); } }
public static void warn(String msg) { if (priority > Priority.WARN) return; try { output.write(msg.getBytes()); } catch (IOException e) { System.err.println("error in Log.warn()"); e.printStackTrace(); } }
6,418
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics(); int ascent = metrics.getAscent(); for (int offset = s.offset; offset < (s.offset + s.count); ++offset) { switch (buffer[offset]) { case '\t': // In case we have a tab, we just 'jump' over the tab. // When we have no tab expander we just use the width of 'm'. if (e != null) pixelX = (int) e.nextTabStop((float) pixelX, startOffset + offset - s.offset); else pixelX += metrics.charWidth(' '); break; case '\n': // In case we have a newline, we must draw // the buffer and jump on the next line. g.drawChars(buffer, offset, 1, pixelX, y); pixelY += metrics.getHeight(); pixelX = x; break; default: // Here we draw the char. g.drawChars(buffer, offset, 1, pixelX, pixelY + ascent); pixelX += metrics.charWidth(buffer[offset]); break; } } return pixelX; }
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics(); int ascent = metrics.getAscent(); for (int offset = s.offset; offset < (s.offset + s.count); ++offset) { switch (buffer[offset]) { case '\t': // In case we have a tab, we just 'jump' over the tab. // When we have no tab expander we just use the width of 'm'. if (e != null) pixelX = (int) e.nextTabStop((float) pixelX, startOffset + offset - s.offset); else pixelX += metrics.charWidth(' '); break; case '\n': // In case we have a newline, we must draw // the buffer and jump on the next line. g.drawChars(buffer, offset, 1, pixelX, y); pixelY += metrics.getHeight(); pixelX = x; break; default: // Here we draw the char. g.drawChars(buffer, offset, 1, pixelX, pixelY + ascent); pixelX += metrics.charWidth(buffer[offset]); break; } } return pixelX; }
6,419
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics(); int ascent = metrics.getAscent(); for (int offset = s.offset; offset < (s.offset + s.count); ++offset) { switch (buffer[offset]) { case '\t': // In case we have a tab, we just 'jump' over the tab. // When we have no tab expander we just use the width of 'm'. if (e != null) pixelX = (int) e.nextTabStop((float) pixelX, startOffset + offset - s.offset); else pixelX += metrics.charWidth(' '); break; case '\n': // In case we have a newline, we must draw // the buffer and jump on the next line. g.drawChars(buffer, offset, 1, pixelX, y); pixelY += metrics.getHeight(); pixelX = x; break; default: // Here we draw the char. g.drawChars(buffer, offset, 1, pixelX, pixelY + ascent); pixelX += metrics.charWidth(buffer[offset]); break; } } return pixelX; }
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics(); int ascent = metrics.getAscent(); for (int offset = s.offset; offset < (s.offset + s.count); ++offset) { switch (buffer[offset]) { case '\t': // In case we have a tab, we just 'jump' over the tab. // When we have no tab expander we just use the width of 'm'. if (e != null) pixelX = (int) e.nextTabStop((float) pixelX, startOffset + offset - s.offset); else pixelX += metrics.charWidth(' '); break; case '\n': // In case we have a newline, we must draw // the buffer and jump on the next line. g.drawChars(buffer, offset, 1, pixelX, y); pixelY += metrics.getHeight(); pixelX = x; break; default: // Here we draw the char. g.drawChars(buffer, offset, 1, pixelX, pixelY + ascent); pixelX += metrics.charWidth(buffer[offset]); break; } } return pixelX; }
6,420
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics(); int ascent = metrics.getAscent(); for (int offset = s.offset; offset < (s.offset + s.count); ++offset) { switch (buffer[offset]) { case '\t': // In case we have a tab, we just 'jump' over the tab. // When we have no tab expander we just use the width of 'm'. if (e != null) pixelX = (int) e.nextTabStop((float) pixelX, startOffset + offset - s.offset); else pixelX += metrics.charWidth(' '); break; case '\n': // In case we have a newline, we must draw // the buffer and jump on the next line. g.drawChars(buffer, offset, 1, pixelX, y); pixelY += metrics.getHeight(); pixelX = x; break; default: // Here we draw the char. g.drawChars(buffer, offset, 1, pixelX, pixelY + ascent); pixelX += metrics.charWidth(buffer[offset]); break; } } return pixelX; }
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics(); int ascent = metrics.getAscent(); for (int offset = s.offset; offset < (s.offset + s.count); ++offset) { switch (buffer[offset]) { case '\t': // In case we have a tab, we just 'jump' over the tab. // When we have no tab expander we just use the width of 'm'. if (e != null) pixelX = (int) e.nextTabStop((float) pixelX, startOffset + offset - s.offset); else pixelX += metrics.charWidth(' '); break; case '\n': // In case we have a newline, we must draw // the buffer and jump on the next line. g.drawChars(buffer, offset, 1, pixelX, y); pixelY += metrics.getHeight(); pixelX = x; break; default: // Here we draw the char. g.drawChars(buffer, offset, 1, pixelX, pixelY + ascent); pixelX += metrics.charWidth(buffer[offset]); break; } } return pixelX; }
6,421
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics(); int ascent = metrics.getAscent(); for (int offset = s.offset; offset < (s.offset + s.count); ++offset) { switch (buffer[offset]) { case '\t': // In case we have a tab, we just 'jump' over the tab. // When we have no tab expander we just use the width of 'm'. if (e != null) pixelX = (int) e.nextTabStop((float) pixelX, startOffset + offset - s.offset); else pixelX += metrics.charWidth(' '); break; case '\n': // In case we have a newline, we must draw // the buffer and jump on the next line. g.drawChars(buffer, offset, 1, pixelX, y); pixelY += metrics.getHeight(); pixelX = x; break; default: // Here we draw the char. g.drawChars(buffer, offset, 1, pixelX, pixelY + ascent); pixelX += metrics.charWidth(buffer[offset]); break; } } return pixelX; }
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics(); int ascent = metrics.getAscent(); for (int offset = s.offset; offset < (s.offset + s.count); ++offset) { switch (buffer[offset]) { case '\t': // In case we have a tab, we just 'jump' over the tab. // When we have no tab expander we just use the width of 'm'. if (e != null) pixelX = (int) e.nextTabStop((float) pixelX, startOffset + offset - s.offset); else pixelX += metrics.charWidth(' '); break; case '\n': // In case we have a newline, we must draw // the buffer and jump on the next line. g.drawChars(buffer, offset, 1, pixelX, y); pixelY += metrics.getHeight(); pixelX = x; break; default: // Here we draw the char. g.drawChars(buffer, offset, 1, pixelX, pixelY + ascent); pixelX += metrics.charWidth(buffer[offset]); break; } } return pixelX; }
6,422
public SwingPanelPeer(SwingToolkit toolkit, Panel panel) { super(toolkit, panel, new JPanel()); final JPanel jPanel = (JPanel)jComponent; this.panel = panel; SwingToolkit.add(panel, jPanel); SwingToolkit.copyAwtProperties(panel, jPanel); }
public SwingPanelPeer(SwingToolkit toolkit, Panel panel) { super(toolkit, panel, new JPanel()); final JPanel jPanel = (JPanel)jComponent; this.panel = panel; SwingToolkit.add(panel, jPanel); SwingToolkit.copyAwtProperties(panel, jPanel); }
6,424
public void addAWTComponent(Component awtComponent, JComponent peer) { ((JPanel)jComponent).add(peer); }
public void addAWTComponent(Component awtComponent, JComponent peer) { ((JPanel)jComponent).add(peer); }
6,425
public Insets getInsets() { return ((JPanel)jComponent).getInsets(); }
public Insets getInsets() { return ((JPanel)jComponent).getInsets(); }
6,426
public Insets insets() { return getInsets(); }
public Insets insets() { return getInsets(); }
6,427
public void addLayoutComponent(String string, Component component) { // TODO } // addLayoutComponent()
public void addLayoutComponent(String string, Component component) { // TODO } // addLayoutComponent()
6,428
public float getLayoutAlignmentX(Container target) { return (float) 0.0; // TODO } // getLayoutAlignmentX()
public float getLayoutAlignmentX(Container target) { return (float) 0.0; // TODO } // getLayoutAlignmentX()
6,429
public float getLayoutAlignmentY(Container target) { return (float) 0.0; // TODO } // getLayoutAlignmentY()
public float getLayoutAlignmentY(Container target) { return (float) 0.0; // TODO } // getLayoutAlignmentY()
6,430
public void invalidateLayout(Container target) { // TODO } // invalidateLayout()
public void invalidateLayout(Container target) { // TODO } // invalidateLayout()
6,431
public void layoutContainer(Container target) { // TODO } // layoutContainer()
public void layoutContainer(Container target) { // TODO } // layoutContainer()
6,432
public Dimension maximumLayoutSize(Container target) { return null; // TODO } // maximumLayoutSize()
public Dimension maximumLayoutSize(Container target) { return null; // TODO } // maximumLayoutSize()
6,433
public Dimension minimumLayoutSize(Container target) { return null; // TODO } // minimumLayoutSize()
public Dimension minimumLayoutSize(Container target) { return null; // TODO } // minimumLayoutSize()
6,434
public Dimension preferredLayoutSize(Container target) { return null; // TODO } // preferredLayoutSize()
public Dimension preferredLayoutSize(Container target) { return null; // TODO } // preferredLayoutSize()
6,435
public void removeLayoutComponent(Component component) { // TODO } // removeLayoutComponent()
public void removeLayoutComponent(Component component) { // TODO } // removeLayoutComponent()
6,436
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | | | p | | p | | -------------- -------------- */ Dimension e = minSize(editor); Dimension n = minSize(next); Dimension p = minSize(previous); Dimension s = spinner.getPreferredSize(); int x = l2r ? i.left : i.right; int y = i.top; int w = Math.max(p.width, n.width); int h = Math.max(p.height, n.height); h = Math.max(h, e.height / 2); int e_width = s.width - w; if (l2r) { setBounds(editor, x, y + (s.height - e.height) / 2, e_width, e.height); x += e_width; setBounds(next, x, y, w, h); y += h; setBounds(previous, x, y, w, h); } else { setBounds(next, x, y + (s.height - e.height) / 2, w, h); y += h; setBounds(previous, x, y, w, h); x += w; y -= h; setBounds(editor, x, y, e_width, e.height); } } }
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | | | p | | p | | -------------- -------------- */ Dimension e = minSize(editor); Dimension n = minSize(next); Dimension p = minSize(previous); Dimension s = spinner.getPreferredSize(); int x = l2r ? i.left : i.right; int y = i.top; int w = Math.max(p.width, n.width); int h = Math.max(p.height, n.height); h = Math.max(h, e.height / 2); int e_width = s.width - w; if (l2r) { setBounds(editor, x, y + (s.height - e.height) / 2, e_width, e.height); x += e_width; setBounds(next, x, y, w, h); y += h; setBounds(previous, x, y, w, h); } else { setBounds(next, x, y + (s.height - e.height) / 2, w, h); y += h; setBounds(previous, x, y, w, h); x += w; y -= h; setBounds(editor, x, y, e_width, e.height); } } }
6,438
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | | | p | | p | | -------------- -------------- */ Dimension e = minSize(editor); Dimension n = minSize(next); Dimension p = minSize(previous); Dimension s = spinner.getPreferredSize(); int x = l2r ? i.left : i.right; int y = i.top; int w = Math.max(p.width, n.width); int h = Math.max(p.height, n.height); h = Math.max(h, e.height / 2); int e_width = s.width - w; if (l2r) { setBounds(editor, x, y + (s.height - e.height) / 2, e_width, e.height); x += e_width; setBounds(next, x, y, w, h); y += h; setBounds(previous, x, y, w, h); } else { setBounds(next, x, y + (s.height - e.height) / 2, w, h); y += h; setBounds(previous, x, y, w, h); x += w; y -= h; setBounds(editor, x, y, e_width, e.height); } } }
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | | | p | | p | | -------------- -------------- */ Dimension e = minSize(editor); Dimension n = minSize(next); Dimension p = minSize(previous); Dimension s = spinner.getPreferredSize(); int x = l2r ? i.left : i.right; int y = i.top; int w = Math.max(p.width, n.width); int h = Math.max(p.height, n.height); h = Math.max(h, e.height / 2); int e_width = s.width - w; if (l2r) { setBounds(editor, x, y + (s.height - e.height) / 2, e_width, e.height); x += e_width; setBounds(next, x, y, w, h); y += h; setBounds(previous, x, y, w, h); } else { setBounds(next, x, y + (s.height - e.height) / 2, w, h); y += h; setBounds(previous, x, y, w, h); x += w; y -= h; setBounds(editor, x, y, e_width, e.height); } } }
6,439
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | | | p | | p | | -------------- -------------- */ Dimension e = minSize(editor); Dimension n = minSize(next); Dimension p = minSize(previous); Dimension s = spinner.getPreferredSize(); int x = l2r ? i.left : i.right; int y = i.top; int w = Math.max(p.width, n.width); int h = Math.max(p.height, n.height); h = Math.max(h, e.height / 2); int e_width = s.width - w; if (l2r) { setBounds(editor, x, y + (s.height - e.height) / 2, e_width, e.height); x += e_width; setBounds(next, x, y, w, h); y += h; setBounds(previous, x, y, w, h); } else { setBounds(next, x, y + (s.height - e.height) / 2, w, h); y += h; setBounds(previous, x, y, w, h); x += w; y -= h; setBounds(editor, x, y, e_width, e.height); } } }
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | | | p | | p | | -------------- -------------- */ Dimension e = minSize(editor); Dimension n = minSize(next); Dimension p = minSize(previous); Dimension s = spinner.getPreferredSize(); int x = l2r ? i.left : i.right; int y = i.top; int w = Math.max(p.width, n.width); int h = Math.max(p.height, n.height); h = Math.max(h, e.height / 2); int e_width = s.width - w; if (l2r) { setBounds(editor, x, y + (s.height - e.height) / 2, e_width, e.height); x += e_width; setBounds(next, x, y, w, h); y += h; setBounds(previous, x, y, w, h); } else { setBounds(next, x, y + (s.height - e.height) / 2, w, h); y += h; setBounds(previous, x, y, w, h); x += w; y -= h; setBounds(editor, x, y, e_width, e.height); } } }
6,440
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | | | p | | p | | -------------- -------------- */ Dimension e = minSize(editor); Dimension n = minSize(next); Dimension p = minSize(previous); Dimension s = spinner.getPreferredSize(); int x = l2r ? i.left : i.right; int y = i.top; int w = Math.max(p.width, n.width); int h = Math.max(p.height, n.height); h = Math.max(h, e.height / 2); int e_width = s.width - w; if (l2r) { setBounds(editor, x, y + (s.height - e.height) / 2, e_width, e.height); x += e_width; setBounds(next, x, y, w, h); y += h; setBounds(previous, x, y, w, h); } else { setBounds(next, x, y + (s.height - e.height) / 2, w, h); y += h; setBounds(previous, x, y, w, h); x += w; y -= h; setBounds(editor, x, y, e_width, e.height); } } }
publicvoidlayoutContainer(Containerparent){synchronized(parent.getTreeLock()){ Insetsi=parent.getInsets(); booleanl2r=parent.getComponentOrientation().isLeftToRight(); /* ---------------------------- ||n||n|| |e|-|or|-|e| ||p||p|| ---------------------------- */ Dimensione=minSize(editor); Dimensionn=minSize(next); Dimensionp=minSize(previous); Dimensions=spinner.getPreferredSize(); intx=l2r?i.left:i.right; inty=i.top; intw=Math.max(p.width,n.width); inth=Math.max(p.height,n.height); h=Math.max(h,e.height/2); inte_width=s.width-w; if(l2r) { setBounds(editor,x,y+(s.height-e.height)/2,e_width, e.height); x+=e_width; setBounds(next,x,y,w,h); y+=h; setBounds(previous,x,y,w,h); } else { setBounds(next,x,y+(s.height-e.height)/2,w,h); y+=h; setBounds(previous,x,y,w,h); x+=w; y-=h; setBounds(editor,x,y,e_width,e.height); }}}
6,441
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | | | p | | p | | -------------- -------------- */ Dimension e = minSize(editor); Dimension n = minSize(next); Dimension p = minSize(previous); Dimension s = spinner.getPreferredSize(); int x = l2r ? i.left : i.right; int y = i.top; int w = Math.max(p.width, n.width); int h = Math.max(p.height, n.height); h = Math.max(h, e.height / 2); int e_width = s.width - w; if (l2r) { setBounds(editor, x, y + (s.height - e.height) / 2, e_width, e.height); x += e_width; setBounds(next, x, y, w, h); y += h; setBounds(previous, x, y, w, h); } else { setBounds(next, x, y + (s.height - e.height) / 2, w, h); y += h; setBounds(previous, x, y, w, h); x += w; y -= h; setBounds(editor, x, y, e_width, e.height); } } }
publicvoidlayoutContainer(Containerparent){synchronized(parent.getTreeLock()){ Insetsi=parent.getInsets(); booleanl2r=parent.getComponentOrientation().isLeftToRight(); /* ---------------------------- ||n||n|| |e|-|or|-|e| ||p||p|| ---------------------------- */ Dimensione=minSize(editor); Dimensionn=minSize(next); Dimensionp=minSize(previous); Dimensions=spinner.getPreferredSize(); intx=l2r?i.left:i.right; inty=i.top; intw=Math.max(p.width,n.width); inth=Math.max(p.height,n.height); h=Math.max(h,e.height/2); inte_width=s.width-w; if(l2r) { setBounds(editor,x,y+(s.height-e.height)/2,e_width, e.height); x+=e_width; setBounds(next,x,y,w,h); y+=h; setBounds(previous,x,y,w,h); } else { setBounds(next,x,y+(s.height-e.height)/2,w,h); y+=h; setBounds(previous,x,y,w,h); x+=w; y-=h; setBounds(editor,x,y,e_width,e.height); }}}
6,442
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | | | p | | p | | -------------- -------------- */ Dimension e = minSize(editor); Dimension n = minSize(next); Dimension p = minSize(previous); Dimension s = spinner.getPreferredSize(); int x = l2r ? i.left : i.right; int y = i.top; int w = Math.max(p.width, n.width); int h = Math.max(p.height, n.height); h = Math.max(h, e.height / 2); int e_width = s.width - w; if (l2r) { setBounds(editor, x, y + (s.height - e.height) / 2, e_width, e.height); x += e_width; setBounds(next, x, y, w, h); y += h; setBounds(previous, x, y, w, h); } else { setBounds(next, x, y + (s.height - e.height) / 2, w, h); y += h; setBounds(previous, x, y, w, h); x += w; y -= h; setBounds(editor, x, y, e_width, e.height); } } }
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | | | p | | p | | -------------- -------------- */ Dimension e = minSize(editor); Dimension n = minSize(next); Dimension p = minSize(previous); Dimension s = spinner.getPreferredSize(); int x = l2r ? i.left : i.right; int y = i.top; int w = Math.max(p.width, n.width); int h = Math.max(p.height, n.height); h = Math.max(h, e.height / 2); int e_width = s.width - w; if (l2r) { setBounds(editor, x, y + (s.height - e.height) / 2, e_width, e.height); x += e_width; setBounds(next, x, y, w, h); y += h; setBounds(previous, x, y, w, h); } else { setBounds(next, x, y + (s.height - e.height) / 2, w, h); y += h; setBounds(previous, x, y, w, h); x += w; y -= h; setBounds(editor, x, y, e_width, e.height); } } }
6,443
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | | | p | | p | | -------------- -------------- */ Dimension e = minSize(editor); Dimension n = minSize(next); Dimension p = minSize(previous); Dimension s = spinner.getPreferredSize(); int x = l2r ? i.left : i.right; int y = i.top; int w = Math.max(p.width, n.width); int h = Math.max(p.height, n.height); h = Math.max(h, e.height / 2); int e_width = s.width - w; if (l2r) { setBounds(editor, x, y + (s.height - e.height) / 2, e_width, e.height); x += e_width; setBounds(next, x, y, w, h); y += h; setBounds(previous, x, y, w, h); } else { setBounds(next, x, y + (s.height - e.height) / 2, w, h); y += h; setBounds(previous, x, y, w, h); x += w; y -= h; setBounds(editor, x, y, e_width, e.height); } } }
publicvoidlayoutContainer(Containerparent){synchronized(parent.getTreeLock()){ Insetsi=parent.getInsets(); booleanl2r=parent.getComponentOrientation().isLeftToRight(); /* ---------------------------- ||n||n|| |e|-|or|-|e| ||p||p|| ---------------------------- */ Dimensione=minSize(editor); Dimensionn=minSize(next); Dimensionp=minSize(previous); Dimensions=spinner.getPreferredSize(); intx=l2r?i.left:i.right; inty=i.top; intw=Math.max(p.width,n.width); inth=Math.max(p.height,n.height); h=Math.max(h,e.height/2); inte_width=s.width-w; if(l2r) { setBounds(editor,x,y+(s.height-e.height)/2,e_width, e.height); x+=e_width; setBounds(next,x,y,w,h); y+=h; setBounds(previous,x,y,w,h); } else { setBounds(next,x,y+(s.height-e.height)/2,w,h); y+=h; setBounds(previous,x,y,w,h); x+=w; y-=h; setBounds(editor,x,y,e_width,e.height); }}}
6,444
public Dimension minimumLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getMinimumSize(); d.width += tmp.width; d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (next != null) { Dimension tmp = next.getMinimumSize(); nextWidth = tmp.width; otherHeight += tmp.height; } if (previous != null) { Dimension tmp = previous.getMinimumSize(); previousWidth = tmp.width; otherHeight += tmp.height; } d.height = Math.max(d.height, otherHeight); d.width += Math.max(nextWidth, previousWidth); return d; }
public Dimension minimumLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getMinimumSize(); d.width += tmp.width; d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; if (next != null) { Dimension tmp = next.getMinimumSize(); nextWidth = tmp.width; otherHeight += tmp.height; } if (previous != null) { Dimension tmp = previous.getMinimumSize(); previousWidth = tmp.width; otherHeight += tmp.height; } d.height = Math.max(d.height, otherHeight); d.width += Math.max(nextWidth, previousWidth); return d; }
6,445
public Dimension minimumLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getMinimumSize(); d.width += tmp.width; d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (next != null) { Dimension tmp = next.getMinimumSize(); nextWidth = tmp.width; otherHeight += tmp.height; } if (previous != null) { Dimension tmp = previous.getMinimumSize(); previousWidth = tmp.width; otherHeight += tmp.height; } d.height = Math.max(d.height, otherHeight); d.width += Math.max(nextWidth, previousWidth); return d; }
public Dimension minimumLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getMinimumSize(); d.width += tmp.width; d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (next != null) { Dimension tmp = next.getMinimumSize(); nextWidth = tmp.width; } if (previous != null) { Dimension tmp = previous.getMinimumSize(); previousWidth = tmp.width; } d.height = Math.max(d.height, otherHeight); d.width += Math.max(nextWidth, previousWidth); return d; }
6,446
public Dimension minimumLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getMinimumSize(); d.width += tmp.width; d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (next != null) { Dimension tmp = next.getMinimumSize(); nextWidth = tmp.width; otherHeight += tmp.height; } if (previous != null) { Dimension tmp = previous.getMinimumSize(); previousWidth = tmp.width; otherHeight += tmp.height; } d.height = Math.max(d.height, otherHeight); d.width += Math.max(nextWidth, previousWidth); return d; }
public Dimension minimumLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getMinimumSize(); d.width += tmp.width; d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (next != null) { Dimension tmp = next.getMinimumSize(); nextWidth = tmp.width; } if (previous != null) { Dimension tmp = previous.getMinimumSize(); previousWidth = tmp.width; } d.height = Math.max(d.height, otherHeight); d.width += Math.max(nextWidth, previousWidth); return d; }
6,447
public Dimension minimumLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getMinimumSize(); d.width += tmp.width; d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (next != null) { Dimension tmp = next.getMinimumSize(); nextWidth = tmp.width; otherHeight += tmp.height; } if (previous != null) { Dimension tmp = previous.getMinimumSize(); previousWidth = tmp.width; otherHeight += tmp.height; } d.height = Math.max(d.height, otherHeight); d.width += Math.max(nextWidth, previousWidth); return d; }
public Dimension minimumLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getMinimumSize(); d.width += tmp.width; d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (next != null) { Dimension tmp = next.getMinimumSize(); nextWidth = tmp.width; otherHeight += tmp.height; } if (previous != null) { Dimension tmp = previous.getMinimumSize(); previousWidth = tmp.width; otherHeight += tmp.height; } d.width += Math.max(nextWidth, previousWidth); return d; }
6,448
public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (next != null) { Dimension tmp = next.getPreferredSize(); nextWidth = tmp.width; otherHeight += tmp.height; } if (previous != null) { Dimension tmp = previous.getPreferredSize(); previousWidth = tmp.width; otherHeight += tmp.height; } d.height = Math.max(d.height, otherHeight); d.width += Math.max(nextWidth, previousWidth); return d; }
public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; if (next != null) { Dimension tmp = next.getPreferredSize(); nextWidth = tmp.width; otherHeight += tmp.height; } if (previous != null) { Dimension tmp = previous.getPreferredSize(); previousWidth = tmp.width; otherHeight += tmp.height; } d.height = Math.max(d.height, otherHeight); d.width += Math.max(nextWidth, previousWidth); return d; }
6,449
public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (next != null) { Dimension tmp = next.getPreferredSize(); nextWidth = tmp.width; otherHeight += tmp.height; } if (previous != null) { Dimension tmp = previous.getPreferredSize(); previousWidth = tmp.width; otherHeight += tmp.height; } d.height = Math.max(d.height, otherHeight); d.width += Math.max(nextWidth, previousWidth); return d; }
public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (next != null) { Dimension tmp = next.getPreferredSize(); nextWidth = tmp.width; } if (previous != null) { Dimension tmp = previous.getPreferredSize(); previousWidth = tmp.width; } d.height = Math.max(d.height, otherHeight); d.width += Math.max(nextWidth, previousWidth); return d; }
6,450
public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (next != null) { Dimension tmp = next.getPreferredSize(); nextWidth = tmp.width; otherHeight += tmp.height; } if (previous != null) { Dimension tmp = previous.getPreferredSize(); previousWidth = tmp.width; otherHeight += tmp.height; } d.height = Math.max(d.height, otherHeight); d.width += Math.max(nextWidth, previousWidth); return d; }
public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (next != null) { Dimension tmp = next.getPreferredSize(); nextWidth = tmp.width; } if (previous != null) { Dimension tmp = previous.getPreferredSize(); previousWidth = tmp.width; } d.height = Math.max(d.height, otherHeight); d.width += Math.max(nextWidth, previousWidth); return d; }
6,451
public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (next != null) { Dimension tmp = next.getPreferredSize(); nextWidth = tmp.width; otherHeight += tmp.height; } if (previous != null) { Dimension tmp = previous.getPreferredSize(); previousWidth = tmp.width; otherHeight += tmp.height; } d.height = Math.max(d.height, otherHeight); d.width += Math.max(nextWidth, previousWidth); return d; }
public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (next != null) { Dimension tmp = next.getPreferredSize(); nextWidth = tmp.width; otherHeight += tmp.height; } if (previous != null) { Dimension tmp = previous.getPreferredSize(); previousWidth = tmp.width; otherHeight += tmp.height; } d.width += Math.max(nextWidth, previousWidth); return d; }
6,452
public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (next != null) { Dimension tmp = next.getPreferredSize(); nextWidth = tmp.width; otherHeight += tmp.height; } if (previous != null) { Dimension tmp = previous.getPreferredSize(); previousWidth = tmp.width; otherHeight += tmp.height; } d.height = Math.max(d.height, otherHeight); d.width += Math.max(nextWidth, previousWidth); return d; }
Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; publicInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; DimensionInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; preferredLayoutSize(ContainerInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; parent)Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; {Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; DimensionInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; dInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; =Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; newInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Dimension();Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; ifInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; (editorInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; !=Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; null)Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; { Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; DimensionInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; tmpInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; =Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; editor.getPreferredSize(); Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; d.widthInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; +=Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Math.max(tmp.width,Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; 40); Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; d.heightInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; =Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; tmp.height;Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; }Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; intInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; nextWidthInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; =Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; 0;Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; intInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; previousWidthInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; =Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; 0;Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; intInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; otherHeightInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; =Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; 0;Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; ifInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; (nextInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; !=Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; null)Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; { Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; DimensionInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; tmpInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; =Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; next.getPreferredSize(); Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; nextWidthInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; =Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; tmp.width; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; otherHeightInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; +=Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; tmp.height;Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; }Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; ifInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; (previousInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; !=Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; null)Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; { Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; DimensionInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; tmpInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; =Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; previous.getPreferredSize(); Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; previousWidthInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; =Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; tmp.width; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; otherHeightInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; +=Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; tmp.height;Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; }Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; d.heightInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; =Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Math.max(d.height,Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; otherHeight);Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; d.widthInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; +=Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Math.max(nextWidth,Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; previousWidth);Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; returnInsets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; d;Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; }
6,453
protected PropertyChangeListener createPropertyChangeListener() { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { // FIXME: Add check for enabled property change. Need to // disable the buttons. if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) evt.getOldValue(), (JComponent) evt.getNewValue()); } }; }
protected PropertyChangeListener createPropertyChangeListener() { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { // FIXME: Add check for enabled property change. Need to // disable the buttons. if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) evt.getOldValue(), (JComponent) evt.getNewValue()); } }; }
6,454
protected PropertyChangeListener createPropertyChangeListener() { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { // FIXME: Add check for enabled property change. Need to // disable the buttons. if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) evt.getOldValue(), (JComponent) evt.getNewValue()); } }; }
protected PropertyChangeListener createPropertyChangeListener() { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { // FIXME: Add check for enabled property change. Need to // disable the buttons. if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) evt.getOldValue(), (JComponent) evt.getNewValue()); } }; }
6,455
public void propertyChange(PropertyChangeEvent evt) { // FIXME: Add check for enabled property change. Need to // disable the buttons. if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) evt.getOldValue(), (JComponent) evt.getNewValue()); }
public void propertyChange(PropertyChangeEvent evt) { // FIXME: Add check for enabled property change. Need to // disable the buttons. if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) evt.getOldValue(), (JComponent) evt.getNewValue()); }
6,456
public void propertyChange(PropertyChangeEvent evt) { // FIXME: Add check for enabled property change. Need to // disable the buttons. if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) evt.getOldValue(), (JComponent) evt.getNewValue()); }
public void propertyChange(PropertyChangeEvent evt) { // FIXME: Add check for enabled property change. Need to // disable the buttons. if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) evt.getOldValue(), (JComponent) evt.getNewValue()); }
6,457
protected void specificIOStyleToXDF( OutputStream outputstream,String indent) { boolean niceOutput = sPrettyXDFOutput; //write out the tags info String[] tags = getAxisTags(); List axisList = parentArray.getAxisList(); String axisId; String tag; int stop = axisList.size(); synchronized (axisList) { for (int i = 0; i <stop; i++) { axisId = ((AxisInterface) axisList.get(i)).getAxisId(); tag = tags[i]; if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "<" + TagToAxisNodeName + " axisIdRef=\"" + axisId + "\"" + " tag = \"" + tag + "\"/>"); } } }
protected void specificIOStyleToXDF( OutputStream outputstream,String indent) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); //write out the tags info String[] tags = getAxisTags(); List axisList = parentArray.getAxisList(); String axisId; String tag; int stop = axisList.size(); synchronized (axisList) { for (int i = 0; i <stop; i++) { axisId = ((AxisInterface) axisList.get(i)).getAxisId(); tag = tags[i]; if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "<" + TagToAxisNodeName + " axisIdRef=\"" + axisId + "\"" + " tag = \"" + tag + "\"/>"); } } }
6,459
ICC_ProfileGray() { super(ColorSpace.CS_GRAY); }
ICC_ProfileGray(int cspace) { super(ColorSpace.CS_GRAY); }
6,460
ICC_ProfileGray() { super(ColorSpace.CS_GRAY); }
ICC_ProfileGray() { super(cspace); whitePoint = getXYZData(icSigMediaWhitePointTag); }
6,461
public float getGamma() { return 0; }
public float getGamma() { short[] data = getCurve(icSigGrayTRCTag); if (data == null) throw new IllegalArgumentException("Couldn't read Gray TRC data."); if (data.length != 1) throw new ProfileDataException("TRC is a table, not a gamma value."); double gamma = (double) (data[0] & (0xFFFF)) / 256.0; return (float) gamma; }
6,462
public float[] getMediaWhitePoint() { return null; }
public float[] getMediaWhitePoint() { float[] wp = new float[3]; wp[0] = whitePoint[0]; wp[1] = whitePoint[1]; wp[2] = whitePoint[2]; return wp; }
6,463
public short[] getTRC() { return null; }
public short[] getTRC() { short[] data = getCurve(icSigGrayTRCTag); if (data == null) throw new IllegalArgumentException("Couldn't read Gray TRC data."); if (data.length <= 1) throw new ProfileDataException("Gamma value, not a TRC table."); return data; }
6,464
ICC_Profile(int profileID) { this.profileID = profileID; }
ICC_Profile(int profileID) { header = null; tagTable = null; createProfile(profileID); }
6,465
public SwingCheckboxPeer(SwingToolkit toolkit, Checkbox checkBox) { super(toolkit, checkBox, new JCheckBox()); this.checkBox = checkBox; final JCheckBox jcb = (JCheckBox)jComponent; SwingToolkit.add(checkBox, jcb); SwingToolkit.copyAwtProperties(checkBox, jcb); jcb.setText(checkBox.getLabel()); setState(checkBox.getState()); }
public SwingCheckboxPeer(SwingToolkit toolkit, Checkbox checkBox) { super(toolkit, checkBox, new JCheckBox()); this.checkBox = checkBox; final JCheckBox jcb = (JCheckBox)jComponent; SwingToolkit.add(checkBox, jcb); SwingToolkit.copyAwtProperties(checkBox, jcb); jcb.setText(checkBox.getLabel()); setState(checkBox.getState()); }
6,466
public void setLabel(String label) { ((JCheckBox)jComponent).setText(label); }
public void setLabel(String label) { ((JCheckBox)jComponent).setText(label); }
6,467
public void setState(boolean state) { ((JCheckBox)jComponent).setSelected(state); }
public void setState(boolean state) { ((JCheckBox)jComponent).setSelected(state); }
6,468
private void paintSimple(Graphics g, JViewport v, Component view, Point pos, Rectangle viewBounds, Rectangle portBounds) { Rectangle oldClip = g.getClipBounds(); g.setClip(portBounds); g.translate (-pos.x, -pos.y); try { view.paint(g); } finally { g.translate (pos.x, pos.y); g.setClip (oldClip); } }
private void paintSimple(Graphics g, JViewport v, Component view, Point pos, Rectangle viewBounds, Rectangle portBounds) { Rectangle oldClip = g.getClipBounds(); g.setClip(new Rectangle(0, 0, portBounds.width, portBounds.height)); g.translate (-pos.x, -pos.y); try { view.paint(g); } finally { g.translate (pos.x, pos.y); g.setClip (oldClip); } }
6,469