Package org.apache.pivot.wtk

Examples of org.apache.pivot.wtk.GridPane$GridPaneListenerList


    @Override
    public void install(Component component) {
        super.install(component);

        GridPane gridPane = (GridPane)component;
        gridPane.getGridPaneListeners().add(this);
    }
View Full Code Here


        gridPane.getGridPaneListeners().add(this);
    }

    @Override
    public int getPreferredWidth(int height) {
        GridPane gridPane = (GridPane)getComponent();

        GridPane.RowSequence rows = gridPane.getRows();

        int columnCount = gridPane.getColumnCount();
        int rowCount = rows.getLength();

        Metadata metadata = new Metadata();

        int cellHeight = getCellHeight(height, metadata);
View Full Code Here

        return preferredWidth;
    }

    @Override
    public int getPreferredHeight(int width) {
        GridPane gridPane = (GridPane)getComponent();

        GridPane.RowSequence rows = gridPane.getRows();

        int columnCount = gridPane.getColumnCount();
        int rowCount = rows.getLength();

        Metadata metadata = new Metadata();

        int cellWidth = getCellWidth(width, metadata);
View Full Code Here

        return preferredHeight;
    }

    @Override
    public Dimensions getPreferredSize() {
        GridPane gridPane = (GridPane)getComponent();

        GridPane.RowSequence rows = gridPane.getRows();

        int columnCount = gridPane.getColumnCount();
        int rowCount = rows.getLength();

        Metadata metadata = new Metadata();

        // calculate the maximum preferred cellWidth and cellHeight
View Full Code Here

        return new Dimensions(preferredWidth, preferredHeight);
    }

    @Override
    public int getBaseline(int width, int height) {
        GridPane gridPane = (GridPane)getComponent();

        GridPane.RowSequence rows = gridPane.getRows();

        int columnCount = gridPane.getColumnCount();
        int rowCount = rows.getLength();

        Metadata metadata = new Metadata();

        int cellWidth = getCellWidth(width, metadata);
View Full Code Here

        return baseline;
    }

    @Override
    public void layout() {
        GridPane gridPane = (GridPane)getComponent();

        GridPane.RowSequence rows = gridPane.getRows();

        int columnCount = gridPane.getColumnCount();
        int rowCount = rows.getLength();

        int width = getWidth();
        int height = getHeight();
View Full Code Here

    @Override
    public void paint(Graphics2D graphics) {
        super.paint(graphics);

        GridPane gridPane = (GridPane)getComponent();

        GridPane.RowSequence rows = gridPane.getRows();

        int columnCount = gridPane.getColumnCount();
        int rowCount = rows.getLength();

        int width = getWidth();
        int height = getHeight();
View Full Code Here

    // GridPane.Skin methods

    @Override
    public int getRowAt(int y) {
        GridPane gridPane = (GridPane)getComponent();
        GridPane.RowSequence rows = gridPane.getRows();

        int rowCount = rows.getLength();

        int rowIndex = -1;
        int rowY = padding.top;
View Full Code Here

        return rowIndex;
    }

    @Override
    public Bounds getRowBounds(int row) {
        GridPane gridPane = (GridPane)getComponent();
        GridPane.RowSequence rows = gridPane.getRows();

        int rowCount = rows.getLength();

        if (row < 0
            || row >= rowCount) {
View Full Code Here

        return new Bounds(0, rowY, getWidth(), cellHeight);
    }

    @Override
    public int getColumnAt(int x) {
        GridPane gridPane = (GridPane)getComponent();

        int columnCount = gridPane.getColumnCount();
        int columnIndex = -1;

        for (int j = 0, columnX = padding.left; columnX <= x && j < columnCount; j++) {

            if (x < columnX + cellWidth) {
View Full Code Here

TOP

Related Classes of org.apache.pivot.wtk.GridPane$GridPaneListenerList

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.