Package javax.swing

Examples of javax.swing.JTabbedPane$AccessibleJTabbedPane


    final Container          cp      = getContentPane();
    final Application        app      = AbstractApplication.getApplication();
//    final JPanel          buttonPanel;
    final Box            buttonPanel;
    final JTabbedPane        ggTabPane;
    final String          abCfgID;
    final AudioBoxConfig      abCfg;
    JButton              ggButton;
//    Param              p;

    audioPrefs      = app.getUserPrefs().node( PrefsUtil.NODE_AUDIO );
    abCfgID        = audioPrefs.get( PrefsUtil.KEY_AUDIOBOX, AudioBoxConfig.ID_DEFAULT );
    abCfg        = new AudioBoxConfig( audioPrefs.node( PrefsUtil.NODE_AUDIOBOXES ).node( abCfgID ));

    audioHwChannels[0= abCfg.numInputChannels;
    audioHwChannels[1= abCfg.numOutputChannels;

    ggTabPane      = new JTabbedPane();

    // ---------- tabs ----------

    for( int i = 0; i < NUM_TABS; i++ ) {  // input + output tabs
      fromPrefs( i );
      ggTabPane.addTab( app.getResourceString( i == 0 ? "labelInputs" : "labelOutputs" ), null,
        createTab( i ), null );
    }

    // ---------- generic gadgets ----------

        buttonPanel = Box.createHorizontalBox(); // new JPanel( new FlowLayout( FlowLayout.RIGHT, 4, 4 ));
    buttonPanel.setBorder( BorderFactory.createEmptyBorder( 0, 0, 2, 0 ));
    buttonPanel.add( new HelpButton( "IOSetup" ));
    buttonPanel.add( Box.createHorizontalGlue() );
        ggButton  = new JButton( app.getResourceString( "buttonOk" ));
        ggButton.addActionListener( new ActionListener() {
      public void actionPerformed( ActionEvent e )
      {
        final ControlRoomFrame f;
       
        for( int i = 0; i < NUM_TABS; i++ ) {
          if( !toPrefs( i )) return;
        }
        disposeAndClose();
// XXX ControlRoomFrame cannot rely on prefs since childAdded is
// never fired (probably bug in java or spi)
        f = (ControlRoomFrame) app.getComponent( Main.COMP_CTRLROOM );
        if( f != null ) f.refillIOConfigs();
     
    });
        buttonPanel.add( ggButton );
        ggButton  = new JButton( app.getResourceString( "buttonCancel" ));
        buttonPanel.add( ggButton );
        ggButton.addActionListener( new ActionListener() {
      public void actionPerformed( ActionEvent e )
      {
        disposeAndClose();
      }
    });
    buttonPanel.add( CoverGrowBox.create() );
//    if( app.getUserPrefs().getBoolean( PrefsUtil.KEY_INTRUDINGSIZE, false )) {
//        buttonPanel.add( Box.createHorizontalStrut( 16 ));
//        }

    cp.add( ggTabPane, BorderLayout.CENTER );
        cp.add( buttonPanel, BorderLayout.SOUTH );
    AbstractWindowHandler.setDeepFont( cp );

    // ---------- ----------

    ggTabPane.setSelectedIndex( NUM_TABS - 1 );
    setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE );

    init();
    app.addComponent( Main.COMP_IOSETUP, this );
    }
View Full Code Here


    SpringPanel      p;
    JLabel        lb;
    GridBagLayout    lay;
    GridBagConstraints  con;

    ggTabPane = new JTabbedPane();
        ggTabPane.setTabLayoutPolicy( JTabbedPane.WRAP_TAB_LAYOUT );

    // ----- cursor tab ------
    c        = new JPanel();
    lay        = new GridBagLayout();
View Full Code Here

      }
    };
    tp.addActionListener(kernelChangedListener);
    tp.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));

    tabbedPane = new JTabbedPane();
    tabbedPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    tabbedPane.addTab(app.getMenu("General"), createGeneralSettingsTab());
    tabbedPane.addTab(app.getMenu("Advanced"), createAdvancedSettingsTab());

    // Cancel and Export Button
View Full Code Here

      setIconImage(LResources.PROPERTIES_ICON.getImage());

      setTitle(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.Pref")); //$NON-NLS-1$
      setLocation(dim.width/3, dim.height/4);

      final JTabbedPane tabbedPane = new JTabbedPane();
      final JPanel pGeneral = new JPanel(new BorderLayout());

      tabbedPane.add(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.general"), createGeneralPanel()); //$NON-NLS-1$
      tabbedPane.add("LaTeX", createLatexPanel()); //$NON-NLS-1$
      tabbedPane.add(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.folders"), createFoldersPanel()); //$NON-NLS-1$
      tabbedPane.add(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.quality"), createQualityPanel()); //$NON-NLS-1$
      tabbedPane.add(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.90"), createDisplayPanel()); //$NON-NLS-1$
      tabbedPane.add(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.grid"), createGridPanel()); //$NON-NLS-1$

    pGeneral.add(tabbedPane, BorderLayout.CENTER);

    getContentPane().add(pGeneral);
      setSize(460, 320);
View Full Code Here

   */
  public AboutDialogueBox() {
    super();
    final int width      = 490;
    final int height    = 440;
    final JTabbedPane tabbedPane   = new JTabbedPane();

    setTitle(LResources.LABEL_ABOUT);

    createMainPanel(tabbedPane);
    createReleaseNotePanel(tabbedPane);
    createContributorsPanel(tabbedPane);
    createSystemPanel(tabbedPane);
    createLicensePanel(tabbedPane);

    tabbedPane.setPreferredSize(new Dimension(510, 290));
     setIconImage(LResources.ABOUT_ICON.getImage());
     getContentPane().add(tabbedPane);

     setSize(width, height);
     final Dimension dim = LSystem.INSTANCE.getScreenDimension();
View Full Code Here

        Container panel;
        panel = getContentPane();
        panel.setLayout(new BorderLayout());

        tabbedPane = new JTabbedPane(JTabbedPane.TOP);

        formPnl = new JPanel();

        enabledModsLbl = new JLabel(I18N.getLocaleString("MODS_EDIT_ENABLED_LABEL"));
        disabledModsLbl = new JLabel(I18N.getLocaleString("MODS_EDIT_DISABLED_LABEL"));
View Full Code Here

  }
 
  private void setupLayout() {
    removeAll();
   
    JTabbedPane tabHolder = new JTabbedPane();
   
    JPanel modelFilePanel = new JPanel();
    modelFilePanel.setLayout(new BorderLayout());
    JPanel tempP1 = new JPanel();
   
    tempP1.setLayout(new GridLayout(5, 2));
    JLabel fileLab = new JLabel("Load/import forecaster", SwingConstants.RIGHT);
    tempP1.add(fileLab); tempP1.add(m_filenameField);
    m_numStepsLab = new JLabel("Number of steps to forecast", SwingConstants.RIGHT);
    tempP1.add(m_numStepsLab); tempP1.add(m_numStepsToForecast);
    m_artificialLab = new JLabel("Number of historical instances " +
        "beyond end of training data", SwingConstants.RIGHT);
    tempP1.add(m_artificialLab); tempP1.add(m_artificialOffset);
    JLabel rebuildLab = new JLabel("Rebuild/reestimate on incoming data",
        SwingConstants.RIGHT);
    tempP1.add(rebuildLab); tempP1.add(m_rebuildForecasterCheck);
    m_saveLab = new JLabel("Save forecaster", SwingConstants.RIGHT);
    tempP1.add(m_saveLab); tempP1.add(m_saveFilenameField);   
   
    modelFilePanel.add(tempP1, BorderLayout.NORTH);
   
    tabHolder.addTab("Model file", modelFilePanel);
   
    add(tabHolder, BorderLayout.CENTER);
   
    JPanel modelPanel = new JPanel();   
    modelPanel.setLayout(new BorderLayout());
    m_modelDisplay.setEditable(false);
    m_modelDisplay.setFont(new Font("Monospaced", Font.PLAIN, 12));
    m_modelDisplay.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    JScrollPane scrollPane = new JScrollPane(m_modelDisplay);
   
    modelPanel.add(scrollPane, BorderLayout.CENTER);
   
    tabHolder.addTab("Model", modelPanel);
   
    JButton okBut = new JButton("OK");
    JButton cancelBut = new JButton("Cancel");
    JPanel butHolder1 = new JPanel();
    butHolder1.setLayout(new GridLayout(1, 2));
View Full Code Here

   *
   * @param name the name of the result from the history list to use
   */
  protected void openResultFrame(String name) {
    StringBuffer buffer = m_history.getNamedBuffer(name);
    JTabbedPane tabbedPane = m_framedOutputMap.get(name);

    if (buffer != null && tabbedPane == null) {
      JTextArea textA = new JTextArea(20, 50);
      textA.setEditable(false);
      textA.setFont(new Font("Monospaced", Font.PLAIN, 12));
      textA.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
      textA.setText(buffer.toString());
      tabbedPane = new JTabbedPane();
      tabbedPane.addTab("Output", new JScrollPane(textA));
      updateComponentTabs(name, tabbedPane);
      m_framedOutputMap.put(name, tabbedPane);
     
      final JFrame jf = new JFrame(name);
      jf.addWindowListener(new WindowAdapter() {
View Full Code Here

    contentPane.add(options(), BorderLayout.CENTER);
    contentPane.add(button(), BorderLayout.SOUTH);
  }

  private Component options() {
    return tabs = new JTabbedPane();
  }
View Full Code Here

    formatter = new JTabbedPaneFormatter();
  }

  @Test
  public void should_format_JTabbedPane_with_tabs_and_selection() {
    JTabbedPane tabbedPane = tabbedPane().withName("tabbedPane").withTabs("One", "Two").withSelection(1).createNew();
    String formatted = formatter.format(tabbedPane);
    assertThat(formatted).contains("javax.swing.JTabbedPane")
                         .contains("name='tabbedPane'")
                         .contains("selectedTabIndex=1")
                         .contains("selectedTabTitle='Two'")
View Full Code Here

TOP

Related Classes of javax.swing.JTabbedPane$AccessibleJTabbedPane

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.