26
27 import java.awt.*;
28 import java.awt.event.*;
29 import java.beans.PropertyChangeEvent;
30 import java.beans.PropertyChangeListener;
31 import java.io.*;
32 import java.security.AccessController;
33 import java.security.PrivilegedAction;
34
35 import javax.swing.*;
36 import javax.swing.border.*;
37 import javax.swing.filechooser.*;
38
39 import sun.awt.shell.*;
40 import sun.awt.OSInfo;
41
42 /**
43 * <b>WARNING:</b> This class is an implementation detail and is only
44 * public so that it can be used by two packages. You should NOT consider
45 * this public API.
46 * <p>
47 *
48 * @author Leif Samuelsson
49 */
50 @SuppressWarnings("serial") // JDK-implementation class
51 public class WindowsPlacesBar extends JToolBar
52 implements ActionListener, PropertyChangeListener {
53 JFileChooser fc;
54 JToggleButton[] buttons;
55 ButtonGroup buttonGroup;
56 File[] files;
57 final Dimension buttonSize;
58
59 public WindowsPlacesBar(JFileChooser fc, boolean isXPStyle) {
60 super(JToolBar.VERTICAL);
61 this.fc = fc;
62 setFloatable(false);
63 putClientProperty("JToolBar.isRollover", Boolean.TRUE);
64
65 boolean isXPPlatform = (OSInfo.getOSType() == OSInfo.OSType.WINDOWS &&
66 OSInfo.getWindowsVersion().compareTo(OSInfo.WINDOWS_XP) >= 0);
|
26
27 import java.awt.*;
28 import java.awt.event.*;
29 import java.beans.PropertyChangeEvent;
30 import java.beans.PropertyChangeListener;
31 import java.io.*;
32 import java.security.AccessController;
33 import java.security.PrivilegedAction;
34
35 import javax.swing.*;
36 import javax.swing.border.*;
37 import javax.swing.filechooser.*;
38
39 import sun.awt.shell.*;
40 import sun.awt.OSInfo;
41
42 /**
43 * <b>WARNING:</b> This class is an implementation detail and is only
44 * public so that it can be used by two packages. You should NOT consider
45 * this public API.
46 *
47 * @author Leif Samuelsson
48 */
49 @SuppressWarnings("serial") // JDK-implementation class
50 public class WindowsPlacesBar extends JToolBar
51 implements ActionListener, PropertyChangeListener {
52 JFileChooser fc;
53 JToggleButton[] buttons;
54 ButtonGroup buttonGroup;
55 File[] files;
56 final Dimension buttonSize;
57
58 public WindowsPlacesBar(JFileChooser fc, boolean isXPStyle) {
59 super(JToolBar.VERTICAL);
60 this.fc = fc;
61 setFloatable(false);
62 putClientProperty("JToolBar.isRollover", Boolean.TRUE);
63
64 boolean isXPPlatform = (OSInfo.getOSType() == OSInfo.OSType.WINDOWS &&
65 OSInfo.getWindowsVersion().compareTo(OSInfo.WINDOWS_XP) >= 0);
|