Package javax.swing

Examples of javax.swing.JToolBar$DefaultToolBarLayout


    model = new ConfigDescriptionModel();
    entryList = new JList(model);
    entryList.addListSelectionListener(new ConfigListSelectionListener());

    final JToolBar toolbar = new JToolBar();
    toolbar.setFloatable(false);
    toolbar.add(addEntryAction);
    toolbar.add(removeEntryAction);

    final JPanel panel = new JPanel();
    panel.setMinimumSize(new Dimension(200, 0));
    panel.setLayout(new BorderLayout());
    panel.add(toolbar, BorderLayout.NORTH);
View Full Code Here


    return new Action[]{};
  }

  protected JToolBar buildToolbar(final boolean floatable)
  {
    toolBar = new JToolBar();
    toolBar.setFloatable(floatable);

    final Action[] preActions = getToolbarPreActions();
    if (preActions != null && preActions.length > 0)
    {
View Full Code Here

  }

  public void start() {

    mainFrame = new JFrame("Simple Swing Layout Example");
    toolBar = new JToolBar();
    mainFrame.getContentPane().setLayout(new BorderLayout());
    mainFrame.getContentPane().add(toolBar, BorderLayout.NORTH);
    lblProgress = new JLabel("Progress: ");
    mainFrame.getContentPane().add(lblProgress, BorderLayout.SOUTH);
View Full Code Here

                                                5 ) );
        setContentPane( contentPane );
        contentPane.setLayout( new BoxLayout( contentPane,
                                              BoxLayout.Y_AXIS ) );

        JToolBar toolBar_1 = new JToolBar();
        toolBar_1.setAlignmentX( Component.LEFT_ALIGNMENT );
        contentPane.add( toolBar_1 );

        JToggleButton newFrame = new JToggleButton( "New Window" );
        toolBar_1.add( newFrame );
        newFrame.addActionListener( new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                TextAdventure.createFrame( gameEngine,
                                           JFrame.DISPOSE_ON_CLOSE );
            }
View Full Code Here

                                                5 ) );
        setContentPane( contentPane );
        contentPane.setLayout( new BoxLayout( contentPane,
                                              BoxLayout.Y_AXIS ) );

        JToolBar toolBar_1 = new JToolBar();
        toolBar_1.setAlignmentX( Component.LEFT_ALIGNMENT );
        contentPane.add( toolBar_1 );

        JToggleButton newFrame = new JToggleButton( "New Window" );
        toolBar_1.add( newFrame );
        newFrame.addActionListener( new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                TextAdventure.createFrame( gameEngine,
                                           JFrame.DISPOSE_ON_CLOSE );
            }
View Full Code Here

            p = new JPanel(new BorderLayout());

            // Create the toolbar
            ToolBarFactory tbf = new ToolBarFactory(bundle, this);
            JToolBar tb = tbf.createJToolBar("ToolBar");
            tb.setFloatable(false);
            getContentPane().add(p, BorderLayout.NORTH);
            p.add(tb, BorderLayout.NORTH);
            p.add(new javax.swing.JSeparator(), BorderLayout.CENTER);
            p.add(locationBar = new LocationBar(), BorderLayout.SOUTH);
View Full Code Here

            }
            p = new JPanel(new BorderLayout());

            // Create the toolbar
            ToolBarFactory tbf = new ToolBarFactory(bundle, this);
            JToolBar tb = tbf.createJToolBar("ToolBar");
            tb.setFloatable(false);
            getContentPane().add(p, BorderLayout.NORTH);
            p.add(tb, BorderLayout.NORTH);
            p.add(new javax.swing.JSeparator(), BorderLayout.CENTER);
            p.add(locationBar = new LocationBar(), BorderLayout.SOUTH);
View Full Code Here

    super(null);
  }

  @Override
  protected Component createWidget() {
    JToolBar toolBar = new JToolBar();
    Dimension size = new Dimension(100, 23);
    toolBar.setSize(size);
    toolBar.doLayout();
    toolBar.validate();
    return toolBar;
  }
View Full Code Here

  }


  @Override
  public JComponent cloneWidget() {
    JToolBar copy = (JToolBar) super.cloneWidget();
    int count = getChildCount();
    for (int i = 0; i < count; i++) {
      Component child = getChild(i);
      WidgetAdapter cAdapter = WidgetAdapter.getWidgetAdapter(child);
      copy.add(cAdapter.cloneWidget());
    }
    return copy;
  }
View Full Code Here

  }


  @Override
  protected JComponent newWidget() {
    return new JToolBar();
  }
View Full Code Here

TOP

Related Classes of javax.swing.JToolBar$DefaultToolBarLayout

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.