Documentation of 'jvx.gui.PsToolTip' Java class
PsToolTip ("JavaView Reference Manual")
"JavaView? v5.03.003"
jvx.gui

Class PsToolTip

  • All Implemented Interfaces:
    java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible


    public class PsToolTip
    extends java.awt.Canvas
    implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener
    Assign a tooltip box to a GUI component like Buttons, PuDouble_IPs etc. The tooltip will appear whenever the mouse cursor pauses over that component.

    The tooltip can be assigned to any GUI element that extends the Component class via the following simple code line:
    new PuToolTip(component, "Help text");

    For GUI elements that contain subcomponents (PuDouble_IP, PsPanel, ...) the tooltip can be enabled for the subcomponents as well via the third argument of the constructor PsToolTip(Component, boolean, String). Passing the Tooltip to subcomponents is disabled by default when using PsToolTip(Component, String).

    Since:
    JavaView 3.99.042
    See Also:
    Serialized Form
    Author:
    Felix Kaelberer, Christoph von Tycowicz
    Version:
    21.03.2010, 1.30 revised (kp) Made 1.1-compatible.
    06.10.2009, 1.20 revised (fk) Changed argument order and default settings in constructors.
    29.09.2009, 1.10 revised (fk) Add line limit.
    10.08.2009, 1.00 created (fk)
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.BaselineResizeBehavior
    • Field Summary

      • Fields inherited from class java.awt.Component

        BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
    • Constructor Summary

      Constructors 
      Constructor and Description
      PsToolTip(java.awt.Component owner, boolean bRecursive, java.lang.String tip)
      Construct a new tooltip.
      PsToolTip(java.awt.Component owner, java.lang.String tip)
      Construct a new tooltip.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void mouseClicked(java.awt.event.MouseEvent me) 
      void mouseDragged(java.awt.event.MouseEvent e) 
      void mouseEntered(java.awt.event.MouseEvent me) 
      void mouseExited(java.awt.event.MouseEvent me) 
      void mouseMoved(java.awt.event.MouseEvent me) 
      void mousePressed(java.awt.event.MouseEvent e) 
      void mouseReleased(java.awt.event.MouseEvent e) 
      void paint(java.awt.Graphics g)
      Paint the tooltip box and text.
      void remove()
      Remove the tooltip from its owning component and all subcomponents.
      void setTipText(java.lang.String tip)
      Set the tooltip's help message.
      • Methods inherited from class java.awt.Canvas

        addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PsToolTip

        public PsToolTip(java.awt.Component owner,
                         java.lang.String tip)
        Construct a new tooltip. The constructor line
        new PuToolTip("Help text", component);
        is sufficient to outfit a component with a working tooltip. When you add a component with many child components (like a panel with many buttons) and you don't want all children to have the tooltip as well, use PsToolTip(Component, boolean, String), with "false" as last argument (otherwise the tooltip will be visible on contained components).
        Parameters:
        owner - The GUI component
        tip - The help message for the GUI component.
        See Also:
        PsToolTip(Component, boolean, String)
        Author:
        Felix Kaelberer
        Version:
        06.10.2009, 1.20 revised (fk) changed order of arguments.
        , 06.10.2009, 1.10 revised (fk) redirect to this(tip, owner, true) instead of this(tip, owner, false).
        , 11.08.2009, 1.00 created (fk)
      • PsToolTip

        public PsToolTip(java.awt.Component owner,
                         boolean bRecursive,
                         java.lang.String tip)
        Construct a new tooltip. You can specify if the tooltip should be visible for this component only or for all subcomponents as well. This is helpful GUI elements that are set up of several subcomponents, such as PuDouble_IP.
        Parameters:
        owner - The GUI component
        bRecursive - Specify if the tooltip appears over the subcomponents as well.
        tip - The help message for the GUI component.
        Author:
        Felix Kaelberer
        Version:
        06.10.2009, 1.10 revised (fk) changed order of arguments.
        , 11.08.2009, 1.00 created (fk)
    • Method Detail

      • setTipText

        public void setTipText(java.lang.String tip)
        Set the tooltip's help message.
        Author:
        Felix Kaelberer
        Version:
        03.09.2009, 1.00 created (fk)
      • remove

        public void remove()
        Remove the tooltip from its owning component and all subcomponents.
        Author:
        Felix Kaelberer
        Version:
        03.09.2009, 1.00 created (fk)
      • paint

        public void paint(java.awt.Graphics g)
        Paint the tooltip box and text.
        Overrides:
        paint in class java.awt.Canvas
        Author:
        Felix Kaelberer
        Version:
        03.09.2009, 1.00 created (fk)
      • mouseEntered

        public void mouseEntered(java.awt.event.MouseEvent me)
        Specified by:
        mouseEntered in interface java.awt.event.MouseListener
      • mouseMoved

        public void mouseMoved(java.awt.event.MouseEvent me)
        Specified by:
        mouseMoved in interface java.awt.event.MouseMotionListener
      • mouseExited

        public void mouseExited(java.awt.event.MouseEvent me)
        Specified by:
        mouseExited in interface java.awt.event.MouseListener
      • mouseClicked

        public void mouseClicked(java.awt.event.MouseEvent me)
        Specified by:
        mouseClicked in interface java.awt.event.MouseListener
      • mousePressed

        public void mousePressed(java.awt.event.MouseEvent e)
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
      • mouseReleased

        public void mouseReleased(java.awt.event.MouseEvent e)
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
      • mouseDragged

        public void mouseDragged(java.awt.event.MouseEvent e)
        Specified by:
        mouseDragged in interface java.awt.event.MouseMotionListener
"JavaView? v5.03.003"

"

The software JavaView? is copyright protected. All Rights Reserved.
"

Ads help maintain this website.