Package org.apache.pivot.wtk

Examples of org.apache.pivot.wtk.Insets


        inactiveColor = Color.GRAY;
        selectionColor = Color.LIGHT_GRAY;
        selectionBackgroundColor = Color.BLACK;
        inactiveSelectionColor = Color.LIGHT_GRAY;
        inactiveSelectionBackgroundColor = Color.BLACK;
        margin = new Insets(4);
        wrapText = true;
        tabWidth = 4;
    }
View Full Code Here


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

        setMargin(new Insets(margin));
    }
View Full Code Here

    /**
     * Sets the amount of space between the edge of the TextArea and its text
     */
    public final void setMargin(int margin) {
        setMargin(new Insets(margin));
    }
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

    /**
     * Sets the amount of space to leave between the edge of the StackPane and its components,
     * uniformly on all four edges.
     */
    public final void setPadding(int padding) {
        setPadding(new Insets(padding));
    }
View Full Code Here

* Renders cell contents as a string using a text area (which supports line feeds,
* which the default label-based table view cell renderer does not).
*/
public class TableViewTextAreaCellRenderer extends TextArea implements TableView.CellRenderer {
    public TableViewTextAreaCellRenderer() {
        getStyles().put("margin", new Insets(2));
    }
View Full Code Here

        // Get the text bounds
        Bounds textBounds = nodeRenderer.getTextBounds();

        // Calculate the bounds of what is being edited
        Insets padding = (Insets)textInput.getStyles().get("padding");
        Bounds editBounds = new Bounds(nodeBounds.x + textBounds.x - (padding.left + 1),
            nodeBounds.y, nodeBounds.width - textBounds.x + (padding.left + 1),
            nodeBounds.height);

        // Scroll to make the node as visible as possible
View Full Code Here

        // Calculate the text bounds
        Bounds textBounds = itemRenderer.getTextBounds();

        // Calculate the bounds of what is being edited
        Insets padding = (Insets)textInput.getStyles().get("padding");
        Bounds editBounds = new Bounds(itemBounds.x + textBounds.x - (padding.left + 1),
            itemBounds.y, itemBounds.width - textBounds.x + (padding.left + 1),
            itemBounds.height);

        // Scroll to make the item as visible as possible
View Full Code Here

    public static boolean DEFAULT_SHOW_ICON = false;

    public ListViewItemRenderer() {
        getStyles().put("horizontalAlignment", HorizontalAlignment.LEFT);
        getStyles().put("verticalAlignment", VerticalAlignment.CENTER);
        getStyles().put("padding", new Insets(2, 3, 2, 3));

        add(imageView);
        add(label);

        imageView.setPreferredSize(DEFAULT_ICON_WIDTH, DEFAULT_ICON_HEIGHT);
View Full Code Here

    /**
     * Sets the amount of space that will be reserved around the inside edges of the
     * table pane.
     */
    public final void setPadding(int padding) {
        setPadding(new Insets(padding));
    }
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.