Package javax.swing

Examples of javax.swing.JToolBar$AccessibleJToolBar


    **/
    public DrawingFrame()
    {
        super("Service-Based Host");

        m_toolbar = new JToolBar("Toolbar");
        m_panel = new JPanel();
        m_panel.setBackground(Color.WHITE);
        m_panel.setLayout(null);
        m_panel.setMinimumSize(new Dimension(400, 400));
        m_panel.addMouseListener(this);
View Full Code Here


            e.printStackTrace();
        }
    }

    private JToolBar initToolBar() {
        final JToolBar toolBar = new JToolBar();
        toolBar.setFloatable(false);
        toolBar.add(openFileAction);
        toolBar.add(openURLAction);
        toolBar.add(exportAction);
        toolBar.add(refreshAction);
        watchToggle = new JToggleButton();
        watchToggle.setAction(watchAction);
        watchToggle.setText("");
        toolBar.add(watchToggle);
        toolBar.addSeparator();
        zoomComboBox = new JComboBox<String>(new String[] {"1%", "5%", "10%", "50%", "100%", "200%", "300%", "500%", "1000%", "5000%"});
        zoomComboBox.setSelectedIndex(2);
        zoomComboBox.setAction(zoomAction);
        zoomComboBox.setEditable(true);
        zoomComboBox.setMaximumSize(zoomComboBox.getPreferredSize());
        toolBar.add(zoomComboBox);
        toolBar.addSeparator();
        toolBar.add(aboutAction);
        return toolBar;
    }
View Full Code Here

     * @param newToolBar
     *            the tool bar to be set in the header
     */
    public void setToolBar(JToolBar newToolBar)
    {
        JToolBar oldToolBar = getToolBar();
        if (oldToolBar == newToolBar) {
            return;
        }
        if (oldToolBar != null) {
            headerPanel.remove(oldToolBar);
View Full Code Here

    final JPanel        butPane;
    final WindowAdapter      winListener;
    final String        className    = getClass().getName();
    final AudioFileDescr    displayAFD    = doc.getDisplayDescr();
    final JButton        ggPeakReset;
    final JToolBar        tbMonitoring;
    final TimeLabel        lbTime;
    final MessageFormat      frmtPeak    = new MessageFormat( getResourceString( "msgPeak" ), Locale.US ); // XXX Locale.US
    final Object[]        peakArgs    = new Object[1];
    final JRootPane        rp        = getRootPane();
    final InputMap        imap      = rp.getInputMap( JComponent.WHEN_IN_FOCUSED_WINDOW );
    final ActionMap        amap      = rp.getActionMap();
    final JButton        ggAbort, ggRecord, ggStop, ggClose;
    final int          myMeta      = BasicMenuFactory.MENU_SHORTCUT == InputEvent.CTRL_MASK ?
      InputEvent.CTRL_MASK | InputEvent.SHIFT_MASK : BasicMenuFactory.MENU_SHORTCUT;  // META on Mac, CTRL+SHIFT on PC

    // use same encoding as parent document
    encodingString = (displayAFD.sampleFormat == AudioFileDescr.FORMAT_INT ? "int" : "float") +
             String.valueOf( displayAFD.bitsPerSample );
//encodingString = "float32";

    audioPrefs  = app.getUserPrefs().node( PrefsUtil.NODE_AUDIO );
    classPrefs  = app.getUserPrefs().node( className.substring( className.lastIndexOf( '.' ) + 1 ));
   
    recPane    = new SpringPanel( 4, 2, 4, 2 );
//    affp    = new AudioFileFormatPane( AudioFileFormatPane.ENCODING );
//    recPane.gridAdd( new JLabel( getResourceString( "labelFormat" ), SwingConstants.RIGHT ), 0, 1 );
//    recPane.gridAdd( affp, 1, 1 );
    ggRecordConfig  = new PrefComboBox();
    ggRecordConfig.setFocusable( false );
    lbPeak      = new JLabel();
    actionPeakReset  = new ActionPeakReset();
    ggPeakReset    = new JButton( actionPeakReset );
    ggPeakReset.setFocusable( false );
    lbTime      = new TimeLabel();
    tbMonitoring  = new JToolBar();
    tbMonitoring.setFloatable( false );
    ggMonitoring  = new JToggleButton( new ActionMonitoring() );
    ggMonitoring.setFocusable( false );
    tbMonitoring.add( ggMonitoring );
    recPane.gridAdd( lbTime, 1, 0, -2, 1 );
    recPane.gridAdd( new JLabel( getResourceString( "labelRecInputs" ), SwingConstants.RIGHT ), 0, 1 );
    recPane.gridAdd( ggRecordConfig, 1, 1, -1, 1 );
    recPane.gridAdd( tbMonitoring, 2, 1 );
    recPane.gridAdd( new JLabel( getResourceString( "labelHeadroom" ) + " :", SwingConstants.RIGHT ), 0, 2 );
View Full Code Here

        sp.setPreferredSize(new Dimension(SUB_COL_WIDTH + TYPE_WIDTH + 20, 300));
        sp.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder("Subscription:"), BorderFactory.createLoweredBevelBorder()));
       
        subscriptionPanel.add(sp, BorderLayout.CENTER);
       
        JToolBar toolBar = new JToolBar();
        toolBar.add(subscribeAllAction);
        toolBar.add(unsubscribeAllAction);       
        toolBar.add(commitAction);
        toolBar.add(autoCommit);
       
        subscriptionPanel.add(toolBar, BorderLayout.SOUTH);
       
        panel.add(subscriptionPanel, BorderLayout.EAST);
       
        sp = new JScrollPane(eventTable);
        sp.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder("Events:"), BorderFactory.createLoweredBevelBorder()));
        panel.add(sp, BorderLayout.CENTER);
       
        JPanel statusLabelPanel = new JPanel(new BorderLayout());
       
        statusLabel.setText("OK");
        statusLabelPanel.add(statusLabel, BorderLayout.CENTER);
        statusLabelPanel.setBorder(BorderFactory.createLoweredBevelBorder());
        panel.add(statusLabelPanel, BorderLayout.SOUTH);
       
        toolBar = new JToolBar();
        toolBar.add(connectAction);
        toolBar.add(disconnectAction);
        toolBar.addSeparator();
        toolBar.add(clearAction);
        toolBar.add(showDetailsAction);
        getContentPane().add(toolBar, BorderLayout.NORTH);
       
        JMenuBar mb = new JMenuBar();
       
        JMenu menu = new JMenu("File");
View Full Code Here

  @RunsInEDT
  private static void setNotRecognizedCellRendererTo(final JTable table) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        setCellRendererComponent(table, new JToolBar());
      }
    });
  }
View Full Code Here

  @RunsInEDT
  private static void setNotRecognizedRendererComponent(final JList list) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        list.setCellRenderer(new CustomCellRenderer(new JToolBar()));
      }
    });
  }
View Full Code Here

  @RunsInEDT
  private static void setNotRecognizedRendererComponent(final JComboBox comboBox) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        comboBox.setRenderer(new CustomCellRenderer(new JToolBar()));
      }
    });
  }
View Full Code Here

    @RunsInEDT
    public JToolBar createNew() {
      return execute(new GuiQuery<JToolBar>() {
        @Override
        protected JToolBar executeInEDT() {
          JToolBar toolBar = new JToolBar();
          toolBar.setOrientation(orientation);
          toolBar.setName(name);
          return toolBar;
        }
      });
    }
View Full Code Here

   *
   * @author <a href="mailto:shushanlee@msn.com">liss</a>
   * @return
   */
  private JToolBar buildToolBar() {
    JToolBar toolBar = new JToolBar("工具栏");
    toolBar.setFloatable(false);
//    toolBar.setBackground(java.awt.Color.GREEN);

    final ButtonGroup buttonGroup = new ButtonGroup();
    JToggleButton homeBtn = new JToggleButton(IconUtils.createImageIcon(ICON_CLASS_PATH + "home.png"));
    JToggleButton generatorBtn = new JToggleButton(IconUtils.createImageIcon(ICON_CLASS_PATH + "jarbundler.png"));
    JToggleButton designerBtn = new JToggleButton(IconUtils.createImageIcon(ICON_CLASS_PATH + "design.png"));
    JToggleButton templateBtn = new JToggleButton(IconUtils.createImageIcon(ICON_CLASS_PATH + "template.png"));
    JToggleButton viewBtn = new JToggleButton(IconUtils.createImageIcon(ICON_CLASS_PATH + "Cube.png"));
    this.logoLabel = new JLabel(IconUtils.createImageIcon(IMAGE_CLASS_PATH + "xgenerator.png"));
    this.logoLabel.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseClicked(MouseEvent e) {
        buttonGroup.clearSelection();
        logoLabel.requestFocusInWindow();
      }
    });
   
    homeBtn.setText("首页");
    homeBtn.setToolTipText("首页");
    homeBtn.setHorizontalTextPosition(JButton.CENTER);
    homeBtn.setHorizontalAlignment(JButton.CENTER);
    homeBtn.setVerticalTextPosition(JButton.BOTTOM);
   
    generatorBtn.setText("代码生成器");
    generatorBtn.setToolTipText("元数据代码生成器");
    generatorBtn.setHorizontalTextPosition(JButton.CENTER);
    generatorBtn.setHorizontalAlignment(JButton.CENTER);
    generatorBtn.setVerticalTextPosition(JButton.BOTTOM);
    generatorBtn.setVerticalTextPosition(JButton.BOTTOM);
    generatorBtn.setActionCommand(MenuAdapter.METADATA_GENERATOR_COMMAND);
    generatorBtn.addActionListener(this.menuAction);

    designerBtn.setText("查询设计器");
    designerBtn.setToolTipText("查询设计器");
    designerBtn.setHorizontalTextPosition(JButton.CENTER);
    designerBtn.setHorizontalAlignment(JButton.CENTER);
    designerBtn.setVerticalTextPosition(JButton.BOTTOM);
   
    templateBtn.setText("模板管理");
    templateBtn.setToolTipText("模板管理");
    templateBtn.setHorizontalTextPosition(JButton.CENTER);
    templateBtn.setHorizontalAlignment(JButton.CENTER);
    templateBtn.setVerticalTextPosition(JButton.BOTTOM);
   
    viewBtn.setText("布局排版");
    viewBtn.setToolTipText("界面布局排版");
    viewBtn.setHorizontalTextPosition(JButton.CENTER);
    viewBtn.setHorizontalAlignment(JButton.CENTER);
    viewBtn.setVerticalTextPosition(JButton.BOTTOM);

    buttonGroup.add(homeBtn);
    buttonGroup.add(generatorBtn);
    buttonGroup.add(designerBtn);
    buttonGroup.add(templateBtn);
    buttonGroup.add(viewBtn);

    toolBar.add(homeBtn);
    toolBar.addSeparator();
    toolBar.add(generatorBtn);
    toolBar.add(designerBtn);
    toolBar.addSeparator();
    toolBar.add(templateBtn);
    toolBar.add(viewBtn);
    toolBar.add(logoLabel);
   
    toolBar.setComponentPopupMenu(buildPopupMenu());
   
    return toolBar;
  }
View Full Code Here

TOP

Related Classes of javax.swing.JToolBar$AccessibleJToolBar

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.