Package com.barrybecker4.ui.components

Examples of com.barrybecker4.ui.components.GradientButton


     * @return image and sound buttons in a panel.
     */
    private JPanel createMediaButtons() {
        JPanel buttonPanel = new JPanel(new FlowLayout());

        showImageButton_ = new GradientButton("Image");
        showImageButton_.addActionListener(this);
        showImageButton_.setEnabled(scene_.getImage() != null);

        playSoundButton_ = new GradientButton("Sound");
        playSoundButton_.addActionListener(this);
        playSoundButton_.setEnabled(scene_.hasSound());

        buttonPanel.add(showImageButton_);
        buttonPanel.add(playSoundButton_);
View Full Code Here


        Player p1 = controller.getPlayers().getPlayer1();
        Player p2 = controller.getPlayers().getPlayer2();

        human1Button_ = new JRadioButton( human, p1.isHuman() );
        computer1Button_ = new JRadioButton( computer, !p2.isHuman() );
        editOptions1Button_ = new GradientButton(editWeights);
        editOptions1Button_.setEnabled(!p1.isHuman());
        JPanel firstP =
                createPlayerEntry( getPlayer1Label(), human1Button_, computer1Button_, editOptions1Button_);

        human2Button_ = new JRadioButton( human, p2.isHuman());
        computer2Button_ = new JRadioButton( computer, !p2.isHuman() );
        editOptions2Button_ = new GradientButton( editWeights );
        editOptions2Button_.setEnabled( !p2.isHuman() );
        JPanel secondP =
                createPlayerEntry( getPlayer2Label(), human2Button_, computer2Button_, editOptions2Button_);

        firstP.setAlignmentX( Component.LEFT_ALIGNMENT );
View Full Code Here

    public void setMainController(TwoPlayerController mainController) {
         mainController_ = mainController;
    }

    private JButton addButton( String label, String tooltip, boolean enabled) {
        JButton b = new GradientButton();
        b.setText( label );
        b.setToolTipText( tooltip );
        b.setEnabled(enabled);
        b.addActionListener( this );
        add(b);
        return b;
    }
View Full Code Here

    @Override
    protected JPanel createButtonsPanel() {
        JPanel buttonsPanel = new JPanel( new FlowLayout() );

        okButton_ = new GradientButton();
        initBottomButton( okButton_, GameContext.getLabel("OK"), GameContext.getLabel("ACCEPT_PLAYER_OPTIONS") );
        initBottomButton(cancelButton, GameContext.getLabel("CANCEL"), GameContext.getLabel("CANCEL_EDITS") );

        buttonsPanel.add( okButton_ );
        buttonsPanel.add(cancelButton);
View Full Code Here

    /**
     * create a toolbar button.
     */
    @Override
    public GradientButton createToolBarButton( String text, String tooltip, Icon icon ) {
        GradientButton button = super.createToolBarButton(text, tooltip, icon);
        button.setMaximumSize( new Dimension(52, 52));
        return button;
    }
View Full Code Here

    }

    /** handles the button clicks */
    class NavBarListener implements ActionListener {
        public void actionPerformed(ActionEvent e) {
            GradientButton src = (GradientButtone.getSource();

            if (src == moveLeftButton_) {
                navListener.pan(Direction.LEFT);
            }
            else if (src == moveRightButton_)  {
View Full Code Here

    public TopControlPanel(PuzzleController<P, M> controller, AlgorithmEnum<P, M>[] algorithmValues) {
        controller_ = controller;
        algorithmValues_ = algorithmValues;

        setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
        solveButton_ = new GradientButton(AppContext.getLabel("SOLVE"));
                solveButton_.addActionListener(this);

        add(solveButton_);
        add(createAlgorithmDropdown());
        add(Box.createHorizontalGlue());
View Full Code Here

                                                  GameContext.getLabel("ONLINE_DLG_TITLE")));

        JPanel headerPanel = new JPanel(new BorderLayout());
        JPanel buttonsPanel = new JPanel(new BorderLayout());

        createTableButton_ = new GradientButton(GameContext.getLabel("CREATE_TABLE"));
        createTableButton_.setToolTipText( GameContext.getLabel("CREATE_TABLE_TIP") );
        createTableButton_.addActionListener(this);
        buttonsPanel.add(createTableButton_, BorderLayout.EAST);

        namePanel_ = new NamePanel();
View Full Code Here

     */
    @Override
    protected JPanel createButtonsPanel() {
        JPanel buttonsPanel = new JPanel( new FlowLayout() );

        okButton_ = new GradientButton();
        initBottomButton( okButton_, GameContext.getLabel("OK"), GameContext.getLabel("PLACE_ORDER_TIP") );
        //initBottomButton( cancelButton, GameContext.getLabel("CANCEL"), GameContext.getLabel("CANCEL") );

        buttonsPanel.add( okButton_ );
        //buttonsPanel.add( cancelButton );
View Full Code Here

        JPanel headerPanel = new JPanel(new BorderLayout());
        JLabel titleLabel = new JLabel(GameContext.getLabel("PLAYERS"));
        JPanel buttonsPanel = new JPanel(new BorderLayout());

        addButton_ = new GradientButton(GameContext.getLabel("ADD"));
        addButton_.setToolTipText( GameContext.getLabel("ADD_TIP") );
        addButton_.addActionListener(this);
        removeButton_ = new GradientButton(GameContext.getLabel("REMOVE"));
        removeButton_.setToolTipText( GameContext.getLabel("REMOVE_PLAYER_TIP") );
        removeButton_.addActionListener(this);
        removeButton_.setEnabled(false);
        buttonsPanel.add(addButton_, BorderLayout.WEST);
        buttonsPanel.add(removeButton_, BorderLayout.EAST);
View Full Code Here

TOP

Related Classes of com.barrybecker4.ui.components.GradientButton

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.