Package org.jdesktop.swingx

Examples of org.jdesktop.swingx.JXLabel


        public void focusGained(FocusEvent e)
        {
        }
      });
 
      JXLabel label = new JXLabel("  " + name);
      label.setAlignmentX(.5f);
     
      gridBagConstraints = new GridBagConstraints();
      gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
      gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
      gridBagConstraints.weightx = .25;
View Full Code Here


private Component doInit() {
  //JXPanel xpnAll = new JXPanel();
  //xpnAll.setLayout(new BorderLayout());

  // create a label
  final JXLabel _xlb1_ = new JXLabel();
  final JXLabel _xlb2_ = new JXLabel();
 
 
  _xlb1_.setFont(new Font("Segoe UI", Font.BOLD, 14));
  _xlb1_.setText("task pane item 1 : a label 1");
  _xlb1_.setIcon(Images.NetworkDisconnected.getIcon(32, 32));
  _xlb1_.setHorizontalAlignment(JXLabel.LEFT);
  //_xlb1_.setBackgroundPainter(getPainter());
  // ---
  _xlb2_.setFont(new Font("Segoe UI", Font.BOLD, 14));
  _xlb2_.setText("task pane item 2 : a label 2");
  _xlb2_.setIcon(Images.NetworkDisconnected.getIcon(32, 32));
  _xlb2_.setHorizontalAlignment(JXLabel.LEFT);
  //_xlb2_.setBackgroundPainter(getPainter());
  // ---

  // tweak with the UI defaults for the taskpane and taskpanecontainer
  _changeUIdefaults_();
View Full Code Here

  JXPanel panel = new JXPanel();
  //JPanel panel = new JPanel();
  panel.setLayout(new BorderLayout());

  // create a label
  final JXLabel label = new JXLabel();
  label.setFont(new Font("Segoe UI", Font.BOLD, 14));
  label.setText("task pane item 1 : a label");
  label.setIcon(Images.NetworkDisconnected.getIcon(32, 32));
  label.setHorizontalAlignment(JXLabel.LEFT);
  label.setBackgroundPainter(getPainter());

  // tweak with the UI defaults for the taskpane and taskpanecontainer
  changeUIdefaults();

  // create a taskpanecontainer
  JXTaskPaneContainer taskpanecontainer = new JXTaskPaneContainer();

  // create a taskpane, and set it's title and icon
  JXTaskPane taskpane = new JXTaskPane();
  taskpane.setTitle("My Tasks");
  taskpane.setIcon(Images.Quit.getIcon(24, 24));

  // add various actions and components to the taskpane
  taskpane.add(label);
  taskpane.add(new AbstractAction() {
    {
      putValue(Action.NAME, "task pane item 2 : an action");
      putValue(Action.SHORT_DESCRIPTION, "perform an action");
      putValue(Action.SMALL_ICON, Images.NetworkConnected.getIcon(32, 32));
    }
    public void actionPerformed(ActionEvent e) {
      label.setText("an action performed");
    }
  });

  // add the task pane to the taskpanecontainer
  taskpanecontainer.add(taskpane);
View Full Code Here

    }
   
   
    private JComponent createThirdCard() {
        JComponent thirdCard = new JXPanel();
        thirdCard.add(new
                JXLabel("The quick brown fox\n jumped over the lazy dog."));
        return thirdCard;
    }
View Full Code Here

    this.putClientProperty(SubstanceLookAndFeel.COLORIZATION_FACTOR, 1.0);

    this.setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));

    this.descriptionLabel = new JXLabel();
    this.descriptionLabel.setOpaque(false);
    this.descriptionLabel.setFont(this.descriptionLabel.getFont().deriveFont(12.0f));
    this.typeLabel = new JXLabel();
    this.typeLabel.setOpaque(false);
    this.typeLabel.setFont(this.typeLabel.getFont().deriveFont(Font.ITALIC, 10.0f));

    this.add(Box.createHorizontalStrut(1));
    this.add(this.descriptionLabel);
View Full Code Here

     */
    protected void createDemo() {
        setLayout(new BorderLayout());
        setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
       
        label = new JXLabel();
        label.setName("contents");
        add(label);
       
        JPanel p = new JPanel();
        add(p, BorderLayout.SOUTH);
View Full Code Here

        JXPanel pc1 = new JXPanel(new BorderLayout());

        JXPanel pf = new JXPanel();
        // pf.setLayout(new DialogLayout(20, 5));
        pf.setBorder(new EmptyBorder(8, 5, 8, 0));
        pf.add(new JXLabel("Buscar:"));

        txtBuscar1 = new JTextField();
        txtBuscar1.setPreferredSize(new Dimension(100, txtBuscar1.getPreferredSize().height));
        docBusqueda = txtBuscar1.getDocument();

        pf.add(txtBuscar1);
        pc1.add(pf, BorderLayout.CENTER);

        JXPanel po = new JXPanel(new GridLayout(2, 2, 8, 2));
        po.setBorder(new TitledBorder(new EtchedBorder(), "Options"));

        JCheckBox chkWord = new JCheckBox("Palabra completa");
        chkWord.setMnemonic('p');
        m_modelWord = chkWord.getModel();
        po.add(chkWord);

        ButtonGroup bg = new ButtonGroup();
        JRadioButton rdUp = new JRadioButton("Hacia arriba");
        rdUp.setMnemonic('r');
        m_modelUp = rdUp.getModel();
        bg.add(rdUp);
        po.add(rdUp);

        JCheckBox chkCase = new JCheckBox("Contiene");
        chkCase.setMnemonic('c');
        m_modelCase = chkCase.getModel();
        po.add(chkCase);

        JRadioButton rdDown = new JRadioButton("Hacia abajo", true);
        rdDown.setMnemonic('b');
        m_modelDown = rdDown.getModel();
        bg.add(rdDown);
        po.add(rdDown);
        pc1.add(po, BorderLayout.SOUTH);

        p1.add(pc1, BorderLayout.CENTER);

        JXPanel p01 = new JXPanel(new FlowLayout());
        JXPanel p = new JXPanel(new GridLayout(2, 1, 2, 8));

        ActionListener findAction = new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                findNext(false, true);
            }
        };
        JButton btFind = new JButton("Siguiente");
        btFind.addActionListener(findAction);
        btFind.setMnemonic('S');
        p.add(btFind);

        ActionListener closeAction = new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                setVisible(false);
            }
        };
        JButton btClose = new JButton("Cerrar");
        btClose.addActionListener(closeAction);
        btClose.setDefaultCapable(true);
        p.add(btClose);
        p01.add(p);
        p1.add(p01, BorderLayout.EAST);

        tabbedPaneBuscarReemplazar.addTab("Buscar", p1);

        // "Replace" panel
        JXPanel p2 = new JXPanel(new BorderLayout());

        JXPanel pc2 = new JXPanel(new BorderLayout());

        JXPanel pc = new JXPanel();
        // pc.setLayout(new BoxLayout(20, 5));
        pc.setBorder(new EmptyBorder(8, 5, 8, 0));

        pc.add(new JXLabel("Buscar:"));
        txtBuscar2 = new JTextField();
        txtBuscar2.setDocument(docBusqueda);
        txtBuscar2.setPreferredSize(new Dimension(100, txtBuscar2.getPreferredSize().height));
        pc.add(txtBuscar2);

        pc.add(new JXLabel("Reemplazar:"));
        JTextField txtReplace = new JTextField();
        txtReplace.setPreferredSize(new Dimension(100, txtReplace.getPreferredSize().height));
        docReemplazar = txtReplace.getDocument();
        pc.add(txtReplace);
        pc2.add(pc, BorderLayout.CENTER);
View Full Code Here

     this.svnCmd = comandoRecibo;
     this.svnCmd.addCmdListener(this);
    }
   
    private void initComponents() {
        label = new JXLabel(nombre, imageIconActivado,JXLabel.HORIZONTAL);
        label.setDisabledIcon(imageIconDesactivado);
        label.addMouseListener(new MouseAdapter(){
            public void mouseClicked(MouseEvent e) {
                if(activado) actuar();
            }
View Full Code Here

    this.messagesPanel = new JPanel();
    this.messagesPanel.setPreferredSize(new Dimension(10, 30));
    scrollPane.setColumnHeaderView(this.messagesPanel);

    this.lblMessages = new JXLabel();
    this.lblMessages.setLineWrap(true);
    this.messagesPanel.add(this.lblMessages);

    this.toolBar = new JToolBar();
    this.add(this.toolBar,BorderLayout.SOUTH);
View Full Code Here

    final JXPanel top = new JXPanel();
    top.setLayout(new VerticalLayout(5));
    top.add(Util.createBoxLayoutPanel(BoxLayout.X_AXIS, btnStart, btnReset,
            Box.createHorizontalGlue(), chkUpdate, Box.createHorizontalGlue(), btnMinimize));
    top.add(Util.createBoxLayoutPanel(BoxLayout.X_AXIS, new JXLabel("Description: "),
            txtDescription));

    add(top, BorderLayout.NORTH);
    add(label);
  }
View Full Code Here

TOP

Related Classes of org.jdesktop.swingx.JXLabel

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.