Package javax.swing.plaf.basic

Examples of javax.swing.plaf.basic.BasicInternalFrameUI


     * Class under test for void
     *     setUI(InternalFrameUI)
     *     InternalFrameUI getUI()
     */
    public void testSetGetUI() {
        BasicInternalFrameUI ui = new BasicInternalFrameUI(frame);
        frame.setUI(ui);
        assertTrue(frame.getUI() == ui);
    }
View Full Code Here


     * Class under test for void
     *     setUI(InternalFrameUI)
     *     InternalFrameUI getUI()
     */
    public void testSetGetUI() {
        BasicInternalFrameUI ui = new BasicInternalFrameUI(frame);
        frame.setUI(ui);
        assertTrue(frame.getUI() == ui);
    }
View Full Code Here

        // this internal frame is a workaround for key binding problems in JDK1.5
        // todo: this workaround does not seem to work on mac
        if ( System.getProperty( "os.name" ).toLowerCase().indexOf( "mac" ) < 0 ) {
            final JInternalFrame internalFrame = new JInternalFrame();
            internalFrame.setUI( new BasicInternalFrameUI( internalFrame ) {
                protected void installComponents() {
                }
            } );
            internalFrame.setOpaque( false );
            internalFrame.setBackground( null );
View Full Code Here

   
    public void setUndecorated(boolean undecorated)
    {
        if (m_undecorated!=undecorated) {
            m_undecorated=undecorated;
            BasicInternalFrameUI ui=(BasicInternalFrameUI)getUI();
            if (undecorated) {
                putClientProperty("titlePane", ui.getNorthPane());
                putClientProperty("border", getBorder());
                ui.setNorthPane(null);
                setBorder(null);
            } else {
                ui.setNorthPane((JComponent)getClientProperty("titlePane"));
                setBorder((Border)getClientProperty("border"));
                putClientProperty("titlePane", null);
                putClientProperty("border", null);
            }
        }
View Full Code Here

  private void setDecorationsVisible(boolean visible) {
    if (!(Notes.this.getUI() instanceof BasicInternalFrameUI)) {
      return;
    }
    BasicInternalFrameUI ui = (BasicInternalFrameUI) Notes.this.getUI();

    if (visible) {
      ui.getNorthPane().setPreferredSize(null);
    } else {
      ui.getNorthPane().setPreferredSize(new Dimension(0,0));
    }

    Notes.this.revalidate();
    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
View Full Code Here

            + matrix[5]
    );
    config.add(element);

    /* Hide decorations */
    BasicInternalFrameUI ui = (BasicInternalFrameUI) getUI();
    if (ui.getNorthPane().getPreferredSize() == null
            || ui.getNorthPane().getPreferredSize().height == 0) {
      element = new Element("hidden");
      config.add(element);
    }

    return config;
View Full Code Here

          catch (NumberFormatException e) {
            logger.warn("Bad viewport: " + e.getMessage());
            resetViewport();
          } break;
        case "hidden":
          BasicInternalFrameUI ui = (BasicInternalFrameUI) getUI();
          ui.getNorthPane().setPreferredSize(new Dimension(0, 0));
          break;
      }
    }
    return true;
  }
View Full Code Here

    @Override
    public void doAction(final Visualizer visualizer, Simulation simulation) {
      if (!(visualizer.getUI() instanceof BasicInternalFrameUI)) {
        return;
      }
      BasicInternalFrameUI ui = (BasicInternalFrameUI) visualizer.getUI();

      if (ui.getNorthPane().getPreferredSize() == null
              || ui.getNorthPane().getPreferredSize().height == 0) {
        /* Restore window decorations */
        ui.getNorthPane().setPreferredSize(null);
      }
      else {
        /* Hide window decorations */
        ui.getNorthPane().setPreferredSize(new Dimension(0, 0));
      }
      visualizer.revalidate();
      SwingUtilities.invokeLater(new Runnable() {
        @Override
        public void run() {
View Full Code Here

    @Override
    public String getDescription(Visualizer visualizer, Simulation simulation) {
      if (!(visualizer.getUI() instanceof BasicInternalFrameUI)) {
        return "Hide window decorations";
      }
      BasicInternalFrameUI ui = (BasicInternalFrameUI) visualizer.getUI();

      if (ui.getNorthPane().getPreferredSize() == null
              || ui.getNorthPane().getPreferredSize().height == 0) {
        return "Restore window decorations";
      }
      return "Hide window decorations";
    }
View Full Code Here

     * Class under test for void
     *     setUI(InternalFrameUI)
     *     InternalFrameUI getUI()
     */
    public void testSetGetUI() {
        BasicInternalFrameUI ui = new BasicInternalFrameUI(frame);
        frame.setUI(ui);
        assertTrue(frame.getUI() == ui);
    }
View Full Code Here

TOP

Related Classes of javax.swing.plaf.basic.BasicInternalFrameUI

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.