Package org.apache.pivot.wtk

Examples of org.apache.pivot.wtk.Bounds.union()


            if (selectedRanges.getLength() > 0) {
                int rangeStart = selectedRanges.get(0).start;
                int rangeEnd = selectedRanges.get(selectedRanges.getLength() - 1).end;

                Bounds selectionBounds = getRowBounds(rangeStart);
                selectionBounds = selectionBounds.union(getRowBounds(rangeEnd));

                Bounds visibleSelectionBounds = tableView.getVisibleArea(selectionBounds);
                if (visibleSelectionBounds.height < selectionBounds.height) {
                    tableView.scrollAreaToVisible(selectionBounds);
                }
View Full Code Here


    // Table view selection detail events
    @Override
    public void selectedRangeAdded(TableView tableView, int rangeStart, int rangeEnd) {
        if (tableView.isValid()) {
            Bounds selectionBounds = getRowBounds(rangeStart);
            selectionBounds = selectionBounds.union(getRowBounds(rangeEnd));
            repaintComponent(selectionBounds);

            // Ensure that the selection is visible
            Bounds visibleSelectionBounds = tableView.getVisibleArea(selectionBounds);
            if (visibleSelectionBounds.height < selectionBounds.height) {
View Full Code Here

    @Override
    public void selectedRangeRemoved(TableView tableView, int rangeStart, int rangeEnd) {
        // Repaint the area containing the removed selection
        if (tableView.isValid()) {
            Bounds selectionBounds = getRowBounds(rangeStart);
            selectionBounds = selectionBounds.union(getRowBounds(rangeEnd));
            repaintComponent(selectionBounds);
        }
    }

    @Override
View Full Code Here

            if (previousSelectedRanges.getLength() > 0) {
                int rangeStart = previousSelectedRanges.get(0).start;
                int rangeEnd = previousSelectedRanges.get(previousSelectedRanges.getLength() - 1).end;

                Bounds previousSelectionBounds = getRowBounds(rangeStart);
                previousSelectionBounds = previousSelectionBounds.union(getRowBounds(rangeEnd));

                repaintComponent(previousSelectionBounds);
            }

            // Repaint the area occupied by the current selection
View Full Code Here

            if (selectedRanges.getLength() > 0) {
                int rangeStart = selectedRanges.get(0).start;
                int rangeEnd = selectedRanges.get(selectedRanges.getLength() - 1).end;

                Bounds selectionBounds = getRowBounds(rangeStart);
                selectionBounds = selectionBounds.union(getRowBounds(rangeEnd));

                repaintComponent(selectionBounds);

                // Ensure that the selection is visible
                Bounds visibleSelectionBounds = tableView.getVisibleArea(selectionBounds);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.