Package pivot.wtk

Examples of pivot.wtk.Tooltip


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

        Tooltip tooltip = (Tooltip)component;

        dropShadowDecorator = new DropShadowDecorator(5, 2, 2);
        tooltip.getDecorators().add(dropShadowDecorator);

        tooltip.setContent(border);
        tooltip.getTooltipListeners().add(this);

        label.setText(tooltip.getText());
    }
View Full Code Here


        label.setText(tooltip.getText());
    }

    @Override
    public void uninstall() {
        Tooltip tooltip = (Tooltip)getComponent();

        tooltip.getDecorators().remove(dropShadowDecorator);
        dropShadowDecorator = null;

        tooltip.setContent(null);
        tooltip.getTooltipListeners().remove(this);
    }
View Full Code Here

    private class CloseHandler implements ComponentMouseListener,
        ComponentMouseButtonListener, ComponentMouseWheelListener,
        ComponentKeyListener {
        // Component mouse events
        public boolean mouseMove(Component component, int x, int y) {
            Tooltip tooltip = (Tooltip)getComponent();
            tooltip.close();
            return false;
        }
View Full Code Here

        public void mouseOut(Component component) {
        }

        public boolean mouseDown(Component component, Mouse.Button button, int x, int y) {
            Tooltip tooltip = (Tooltip)getComponent();
            tooltip.close();
            return false;
        }
View Full Code Here

            return false;
        }

        public boolean mouseWheel(Component component, Mouse.ScrollType scrollType,
            int scrollAmount, int wheelRotation, int x, int y) {
            Tooltip tooltip = (Tooltip)getComponent();
            tooltip.close();
            return false;
        }
View Full Code Here

        public boolean keyTyped(Component component, char character) {
            return false;
        }

        public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation) {
            Tooltip tooltip = (Tooltip)getComponent();
            tooltip.close();
            return false;
        }
View Full Code Here

            String tooltipText = component.getTooltipText();

            // The tooltip text may have been cleared while the timeout was
            // outstanding; if so, don't display the tooltip
            if (tooltipText != null) {
                Tooltip tooltip = new Tooltip(tooltipText);

                // TODO Ensure that the tooltip stays on screen
                Point mouseLocation = component.getDisplay().getMouseLocation();
                tooltip.setLocation(mouseLocation.x + 16, mouseLocation.y);
                tooltip.open(component.getWindow());
            }
        }
View Full Code Here

            String tooltipText = component.getTooltipText();

            // The tooltip text may have been cleared while the timeout was
            // outstanding; if so, don't display the tooltip
            if (tooltipText != null) {
                Tooltip tooltip = new Tooltip(tooltipText);

                // TODO Ensure that the tooltip stays on screen
                Point mouseLocation = component.getDisplay().getMouseLocation();
                tooltip.setLocation(mouseLocation.x + 16, mouseLocation.y);
                tooltip.open(component.getWindow());
            }
        }
View Full Code Here

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

        Tooltip tooltip = (Tooltip)component;

        dropShadowDecorator = new DropShadowDecorator(5, 2, 2);
        tooltip.getDecorators().add(dropShadowDecorator);

        tooltip.setContent(border);
        tooltip.getTooltipListeners().add(this);

        label.setText(tooltip.getText());
    }
View Full Code Here

        label.setText(tooltip.getText());
    }

    @Override
    public void uninstall() {
        Tooltip tooltip = (Tooltip)getComponent();

        tooltip.getDecorators().remove(dropShadowDecorator);
        dropShadowDecorator = null;

        tooltip.setContent(null);
        tooltip.getTooltipListeners().remove(this);
    }
View Full Code Here

TOP

Related Classes of pivot.wtk.Tooltip

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.