Package javax.swing

Examples of javax.swing.JToggleButton


   
        Vector featExts = new Vector();
        Vector featWeights = new Vector();
    for(int i = 0; i < featureCheckBoxes.size(); i++
        {
      JToggleButton cb = (JToggleButton)featureCheckBoxes.elementAt(i);

            try
            {
                if (cb.isSelected())
                {
                  FeatureExtractor fe = (FeatureExtractor)(Class.forName("com.meapsoft.featextractors." + cb.getText())
          .newInstance());
          if (fe instanceof MetaFeatureExtractor)
            metaFE = true;
          else
            regularFE = true;
View Full Code Here


    if (m_pluginPerspectiveLookup.size() > 0) {

      // add the main perspective first
      String titleM = m_mainKFPerspective.getPerspectiveTitle();
      Icon icon = m_mainKFPerspective.getPerspectiveIcon();
      JToggleButton tBut = new JToggleButton(titleM, icon, true);
      tBut.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          KFPerspective current = (KFPerspective)m_perspectiveHolder.getComponent(0);
          current.setActive(false);
          m_perspectiveHolder.remove(0);
          m_perspectiveHolder.add((JComponent)m_perspectives.get(0),
View Full Code Here

      if (toAdd instanceof JComponent) {
        toAdd.setLoaded(true);
        m_perspectives.add(toAdd);
        String titleM = toAdd.getPerspectiveTitle();
        Icon icon = toAdd.getPerspectiveIcon();
        JToggleButton tBut = null;
        if (icon != null) {
          tBut = new JToggleButton(titleM, icon, false);
        } else {
          tBut = new JToggleButton(titleM, false);
        }
        tBut.setToolTipText(toAdd.getPerspectiveTipText());
        final int theIndex = index;
        tBut.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            setActivePerspective(theIndex);
          }
        });
        m_perspectiveToolBar.add(tBut);
View Full Code Here

        m_pasteB.setToolTipText("Paste from clipboard");
        m_deleteB = new JButton(new ImageIcon(loadImage(BeanVisual.ICON_PATH +
        "delete.png")));
        m_deleteB.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 0));
        m_deleteB.setToolTipText("Delete selected");
        m_snapToGridB = new JToggleButton(new ImageIcon(loadImage(BeanVisual.ICON_PATH +
        "shape_handles.png")));
        //m_snapToGridB.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 0));
        m_snapToGridB.setToolTipText("Snap to grid");
        /*Dimension d = m_snapToGridB.getPreferredSize();
        d = new Dimension((int)d.getWidth() * 8, (int)d.getHeight()*8);
 
View Full Code Here

        contentPane.add(bandsPane, BorderLayout.CENTER);

        JPanel controlsPane = new JPanel();
        controlsPane.setLayout(new BoxLayout(controlsPane, BoxLayout.X_AXIS));

        enableButton = new JToggleButton("Enable");
        enableButton.setMnemonic('e');
        controlsPane.add(enableButton);

        controlsPane.add(Box.createHorizontalGlue());
View Full Code Here

        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%"});
View Full Code Here

    private void initToolbar()
    {
        toolbar = new JPanel();
        toolbar.setLayout(new FlowLayout(FlowLayout.LEFT));

        toolbar.add(new JToggleButton(addEntite) {

            {
                setText("");
                addMouseListener(Main.statusbar.getHandler());
            }
        });

        toolbar.add(new JToggleButton(addAssociation) {

            {
                setText("");
                addMouseListener(Main.statusbar.getHandler());
            }
        });

        toolbar.add(btnLien = new JToggleButton(addLien) {

            {
                setText("");               
                addMouseListener(Main.statusbar.getHandler());
            }
        });
       
        toolbar.add(btnCurseur = new JToggleButton(changeCurseur) {

            {
                setText("");
                setSelected(true);
                doClick() ;   // #505822
View Full Code Here

        bi.setText("");
        this.add(bi);

        this.add(new JToolBar.Separator());

        tree = new JToggleButton(Main.globalActionCollection.getAction(Constantes.SHOWHIDE_NAVIGATOR));
        tree.addMouseListener(handler);
        tree.setText("");
        this.add(tree);

        this.add(new JToolBar.Separator());
View Full Code Here

    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 );
View Full Code Here

    this.doc    = doc;

    b        = new JToggleButton[ 3 ];
    bg        = new ButtonGroup();
    for( int i = 0; i < 3; i++ ) {
      b[ i ]    = new JToggleButton( this );
      GraphicsUtil.setToolIcons( b[ i ], GraphicsUtil.createToolIcons( GraphicsUtil.ICON_INSERTMODE + i ));
      bg.add( b[ i ]);
    }
   
    bg.setSelected( b[ doc.getEditMode() ].getModel(), true );
View Full Code Here

TOP

Related Classes of javax.swing.JToggleButton

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.