Package org.apache.pivot.wtk

Examples of org.apache.pivot.wtk.Insets


    public TableViewNumberCellRenderer() {
        getStyles().put("horizontalAlignment", HorizontalAlignment.RIGHT);

        // Apply more padding on the right so the right-aligned cells don't
        // appear to run into left-aligned cells in the next column
        getStyles().put("padding", new Insets(2, 2, 2, 6));
    }
View Full Code Here


* Renders cell contents as a string using TextArea. Only really useful when the TableView is using the variableRowHeight style.
*/
public class TableViewTextAreaCellRenderer extends TextArea
    implements TableView.CellRenderer {
    public TableViewTextAreaCellRenderer() {
        getStyles().put("margin", new Insets(2));
    }
View Full Code Here

    /**
     * Sets the padding that will be reserved around the table pane during
     * layout.
     */
    public final void setPadding(int padding) {
        setPadding(new Insets(padding));
    }
View Full Code Here

    public final void setPadding(Dictionary<String, ?> padding) {
        if (padding == null) {
            throw new IllegalArgumentException("padding is null.");
        }

        setPadding(new Insets(padding));
    }
View Full Code Here

        setPadding(new Insets(padding));
    }

    public final void setPadding(int padding) {
        setPadding(new Insets(padding));
    }
View Full Code Here

    protected Label label = new Label();

    public MenuBarItemDataRenderer() {
        getStyles().put("horizontalAlignment", HorizontalAlignment.LEFT);
        getStyles().put("verticalAlignment", VerticalAlignment.CENTER);
        getStyles().put("padding", new Insets(4, 6, 4, 6));

        add(imageView);
        add(label);

        imageView.getStyles().put("backgroundColor", null);
View Full Code Here

    /**
     * Sets the padding that will be reserved around the grid pane during
     * layout.
     */
    public final void setPadding(int padding) {
        setPadding(new Insets(padding));
    }
View Full Code Here

    public final void setPadding(Dictionary<String, ?> padding) {
        if (padding == null) {
            throw new IllegalArgumentException("padding is null.");
        }

        setPadding(new Insets(padding));
    }
View Full Code Here

    protected ImageView imageView = new ImageView();
    protected Label textLabel = new Label();
    protected Label keyboardShortcutLabel = new Label();

    public MenuItemDataRenderer() {
        getStyles().put("padding", new Insets(2));

        getColumns().add(new TablePane.Column(1, true));
        getColumns().add(new TablePane.Column());

        BoxPane boxPane = new BoxPane();
        boxPane.add(imageView);
        boxPane.add(textLabel);
        boxPane.getStyles().put("verticalAlignment", VerticalAlignment.CENTER);
        boxPane.getStyles().put("padding", new Insets(0, 0, 0, 6));

        TablePane.Row row = new TablePane.Row();
        row.add(boxPane);
        row.add(keyboardShortcutLabel);
View Full Code Here

        // Update the image view
        Menu.Item menuItem = (Menu.Item)button;
        Menu menu = (Menu)menuItem.getParent();

        int margin = (Integer)menu.getStyles().get("margin");
        Insets padding = (Insets)getStyles().get("padding");

        imageView.setImage(icon);
        imageView.setPreferredWidth(margin - padding.left * 2);
        imageView.getStyles().put("opacity", button.isEnabled() ? 1.0f : 0.5f);

View Full Code Here

TOP

Related Classes of org.apache.pivot.wtk.Insets

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.