Package javax.swing.plaf

Examples of javax.swing.plaf.FileChooserUI


     */
    public void updateUI() {
        if (isAcceptAllFileFilterUsed()) {
            removeChoosableFileFilter(getAcceptAllFileFilter());
        }
        FileChooserUI ui = ((FileChooserUI)UIManager.getUI(this));
        if (fileSystemView == null) {
            // We were probably deserialized
            setFileSystemView(FileSystemView.getFileSystemView());
        }
        setUI(ui);
View Full Code Here


     */
    public void updateUI() {
  if (isAcceptAllFileFilterUsed()) {
      removeChoosableFileFilter(getAcceptAllFileFilter());
  }
  FileChooserUI ui = ((FileChooserUI)UIManager.getUI(this));
  if (fileSystemView == null) {
      // We were probably deserialized
      setFileSystemView(FileSystemView.getFileSystemView());
  }
  setUI(ui);
View Full Code Here

      String cmd = evt.getActionCommand();

      if (src == backButton) {
    back();
      } else if (src == nextButton) {
    FileChooserUI ui = chooser.getUI();
    if (ui instanceof BasicFileChooserUI) {
        // Workaround for bug 4528663. This is necessary to
        // pick up the contents of the file chooser text field.
        // This will trigger an APPROVE_SELECTION action.
        ((BasicFileChooserUI)ui).getApproveSelectionAction().actionPerformed(null);
View Full Code Here

        chooser.removeActionListener(listener);
        assertEquals(1, chooser.getActionListeners().length);
    }

    public void testGetUpdateUI() throws Exception {
        FileChooserUI ui = chooser.getUI();
        assertNotNull(ui);
        FileChooserUI customUI = new BasicFileChooserUI(chooser);
        chooser.setUI(customUI);
        assertEquals(customUI, chooser.getUI());
        assertNotSame(ui, chooser.getUI());
        chooser.updateUI();
        assertNotSame(customUI, chooser.getUI());
View Full Code Here

            String cmd = evt.getActionCommand();

            if (src == backButton) {
                back();
            } else if (src == nextButton) {
                FileChooserUI ui = chooser.getUI();
                if (ui instanceof BasicFileChooserUI) {
                    // Workaround for bug 4528663. This is necessary to
                    // pick up the contents of the file chooser text field.
                    // This will trigger an APPROVE_SELECTION action.
                    ((BasicFileChooserUI) ui).getApproveSelectionAction().
View Full Code Here

     * returns true.
     * @see java.awt.GraphicsEnvironment#isHeadless
     * @since 1.4
     */
    protected JDialog createDialog(Component parent) throws HeadlessException {
        FileChooserUI ui = getUI();
        String title = ui.getDialogTitle(this);
        putClientProperty(AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY,
                          title);

        JDialog dialog;
        Window window = JOptionPane.getWindowForComponent(parent);
        if (window instanceof Frame) {
            dialog = new JDialog((Frame)window, title, true);
        } else {
            dialog = new JDialog((Dialog)window, title, true);
        }
        dialog.setComponentOrientation(this.getComponentOrientation());

        Container contentPane = dialog.getContentPane();
        contentPane.setLayout(new BorderLayout());
        contentPane.add(this, BorderLayout.CENTER);

        if (JDialog.isDefaultLookAndFeelDecorated()) {
            boolean supportsWindowDecorations =
            UIManager.getLookAndFeel().getSupportsWindowDecorations();
            if (supportsWindowDecorations) {
                dialog.getRootPane().setWindowDecorationStyle(JRootPane.FILE_CHOOSER_DIALOG);
            }
        }
        dialog.getRootPane().setDefaultButton(ui.getDefaultButton(this));
        dialog.pack();
        dialog.setLocationRelativeTo(parent);

        return dialog;
    }
View Full Code Here

     */
    public void updateUI() {
        if (isAcceptAllFileFilterUsed()) {
            removeChoosableFileFilter(getAcceptAllFileFilter());
        }
        FileChooserUI ui = ((FileChooserUI)UIManager.getUI(this));
        if (fileSystemView == null) {
            // We were probably deserialized
            setFileSystemView(FileSystemView.getFileSystemView());
        }
        setUI(ui);
View Full Code Here

        chooser.removeActionListener(listener);
        assertEquals(1, chooser.getActionListeners().length);
    }

    public void testGetUpdateUI() throws Exception {
        FileChooserUI ui = chooser.getUI();
        assertNotNull(ui);
        FileChooserUI customUI = new BasicFileChooserUI(chooser);
        chooser.setUI(customUI);
        assertEquals(customUI, chooser.getUI());
        assertNotSame(ui, chooser.getUI());
        chooser.updateUI();
        assertNotSame(customUI, chooser.getUI());
View Full Code Here

            String cmd = evt.getActionCommand();

            if (src == backButton) {
                back();
            } else if (src == nextButton) {
                FileChooserUI ui = chooser.getUI();
                if (ui instanceof BasicFileChooserUI) {
                    // Workaround for bug 4528663. This is necessary to
                    // pick up the contents of the file chooser text field.
                    // This will trigger an APPROVE_SELECTION action.
                    ((BasicFileChooserUI)ui).getApproveSelectionAction().actionPerformed(null);
View Full Code Here

     */
    public void updateUI() {
        if (isAcceptAllFileFilterUsed()) {
            removeChoosableFileFilter(getAcceptAllFileFilter());
        }
        FileChooserUI ui = ((FileChooserUI)UIManager.getUI(this));
        if (fileSystemView == null) {
            // We were probably deserialized
            setFileSystemView(FileSystemView.getFileSystemView());
        }
        setUI(ui);
View Full Code Here

TOP

Related Classes of javax.swing.plaf.FileChooserUI

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.