Package com.barrybecker4.ui.table

Examples of com.barrybecker4.ui.table.TableColumnMeta


        return p;
    }

    protected void addDebugLevel(JPanel p) {
        dbgLevelField_ =
                new NumberInput( GameContext.getLabel("DEBUG_LEVEL"), GameContext.getDebugMode(),
                                 GameContext.getLabel("DEBUG_LEVEL_TIP"), 0, 3, true);
        p.add( dbgLevelField_ );
    }
View Full Code Here


        p.setBorder( BorderFactory.createTitledBorder( BorderFactory.createEtchedBorder(), "Board Configuration" ) );
        JLabel label = new JLabel( GameContext.getLabel("BOARD_SIZE") + ": " );
        label.setAlignmentX( Component.LEFT_ALIGNMENT );
        p.add( label );

        rowSizeField_ = new NumberInput(GameContext.getLabel("NUMBER_OF_ROWS"), initialNumRows);
        colSizeField_ = new NumberInput( GameContext.getLabel("NUMBER_OF_COLS"), initialNumCols);

        rowSizeField_.setAlignmentX( Component.LEFT_ALIGNMENT );
        colSizeField_.setAlignmentX( Component.LEFT_ALIGNMENT );
        p.add( rowSizeField_ );
        p.add( colSizeField_ );
View Full Code Here

        ButtonGroup buttonGroup = new ButtonGroup();
        consoleOutputButton_ = createRadioButton("CONSOLE");
        windowOutputButton_ = createRadioButton("SEPARATE_WINDOW");
        fileOutputButton_ = createRadioButton("THIS_FILE");

        p.add( new RadioButtonPanel( consoleOutputButton_, buttonGroup, true ) );
        p.add( new RadioButtonPanel( windowOutputButton_, buttonGroup, false ) );
        p.add( new RadioButtonPanel( fileOutputButton_, buttonGroup, false ) );
        logDestination_ = GameContext.getLogger().getDestination();
        switch (logDestination_) {
            case Log.LOG_TO_CONSOLE:
                consoleOutputButton_.setSelected( true );
                break;
View Full Code Here

     * initialize UI for server.
     */
    private void initUI(String gameName) {
        JPanel panel = new JPanel();
        JLabel label = new JLabel("Commands received over the socket:");
        textArea = new ScrollingTextArea(20, 44);

        panel.setLayout(new BorderLayout());
        panel.setBackground(Color.white);
        panel.add("North", label);
        JScrollPane scrollPane = new JScrollPane(textArea);
View Full Code Here

        Point pos = getPosition(position, cellSize, pieceSize, margin);
        Ellipse2D circle = new Ellipse2D.Float( pos.x, pos.y, pieceSize + 1, pieceSize + 1 );
        int hlOffset = (int) (pieceSize / 2.3 + 0.5)//spec highlight offset
        Color c = getPieceColor(planet);

        RoundGradientPaint rgp = new RoundGradientPaint(
                pos.x + hlOffset, pos.y + hlOffset, Color.white, SPEC_HIGHLIGHT_RADIUS, c );

        g2.setPaint( rgp );
        g2.fill( circle );
View Full Code Here

        // more space needed for the names list.
        columnMeta[PLAYER_NAMES_INDEX].setPreferredWidth(200);
        columnMeta[PLAYER_NAMES_INDEX].setTooltip(PLAYER_NAMES_TIP);

        TableColumnMeta actionCol = columnMeta[JOIN_INDEX];
        actionCol.setTooltip("Select which table you want to joint");

        TableButton joinCellEditor = new TableButton(GameContext.getLabel("JOIN"), "id");
        joinCellEditor.addTableButtonListener(tableButtonListener_);
        joinCellEditor.setToolTipText(JOIN_TIP);
        actionCol.setCellRenderer(joinCellEditor);
        actionCol.setCellEditor(joinCellEditor);
        actionCol.setPreferredWidth(70);
    }
View Full Code Here


    @Override
    protected void updateColumnMeta(TableColumnMeta[] columnMeta) {

        TableColumnMeta colorMeta = columnMeta[COLOR_INDEX];
        colorMeta.setCellRenderer(new ColorCellRenderer());
        colorMeta.setCellEditor(new ColorCellEditor(GameContext.getLabel("SELECT_PLAYER_COLOR")));
        colorMeta.setPreferredWidth(25);
        colorMeta.setMinWidth(20);
        colorMeta.setMaxWidth(25);

        columnMeta[COLOR_INDEX].setPreferredWidth(100);
    }
View Full Code Here

    @Override
    protected void updateColumnMeta(TableColumnMeta[] columnMeta) {

        columnMeta[NAME_INDEX].setPreferredWidth(130);
        columnMeta[HUMAN_INDEX].setPreferredWidth(80);
        TableColumnMeta colorColumnMeta = new TableColumnMeta(COLOR, null, 20, 40, 40);
        colorColumnMeta.setCellRenderer(new ColorCellRenderer());
        colorColumnMeta.setCellEditor(new ColorCellEditor(GameContext.getLabel("SELECT_PLAYER_COLOR")));
        columnMeta[COLOR_INDEX] = colorColumnMeta;
    }
View Full Code Here

    }

    @Override
    protected void updateColumnMeta(TableColumnMeta[] columnMeta) {

        TableColumnMeta navigateCol = columnMeta[NAVIGATE_INDEX];

        TableButton navCellEditor = new TableButton(NAVIGATE_INDEX, NAVIGATE_TO_CHILD_BUTTON_ID);

        navCellEditor.addTableButtonListener(tableButtonListener_);
        navCellEditor.setToolTipText("navigate to this scene");
        navigateCol.setCellRenderer(navCellEditor);
        navigateCol.setCellEditor(navCellEditor);
        navigateCol.setPreferredWidth(200);
        navigateCol.setMaxWidth(400);

        columnMeta[CHOICE_DESCRIPTION_INDEX].setPreferredWidth(500);
    }
View Full Code Here


    @Override
    protected void updateColumnMeta(TableColumnMeta[] columnMeta) {

        TableColumnMeta navigateCol = columnMeta[NAVIGATE_INDEX];

        TableButton navCellEditor = new TableButton(NAVIGATE_INDEX, NAVIGATE_TO_PARENT_BUTTON_ID);
        navCellEditor.addTableButtonListener(tableButtonListener_);

        navigateCol.setCellRenderer(navCellEditor);
        navigateCol.setCellEditor(navCellEditor);
        navigateCol.setPreferredWidth(210);
        navigateCol.setMaxWidth(500);

        columnMeta[NUM_CHILDREN_INDEX].setMinWidth(40);
        columnMeta[NUM_CHILDREN_INDEX].setPreferredWidth(100);
    }
View Full Code Here

TOP

Related Classes of com.barrybecker4.ui.table.TableColumnMeta

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.