Class ApplicationContext.DisplayHost

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
    Enclosing class:
    ApplicationContext

    public static class ApplicationContext.DisplayHost
    extends java.awt.Component
    Native display host. This is the Pivot interface with AWT.
    See Also:
    Serialized Form
    • Nested Class Summary

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

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      • Fields inherited from class java.awt.Component

        accessibleContext, 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 Description
      DisplayHost()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.AWTEvent getCurrentAWTEvent()  
      Display getDisplay()  
      java.awt.im.InputMethodRequests getInputMethodRequests()  
      double getScale()  
      void paint​(java.awt.Graphics graphics)  
      void print​(java.awt.Graphics graphics)  
      protected void processComponentEvent​(java.awt.event.ComponentEvent event)  
      protected void processEvent​(java.awt.AWTEvent event)  
      protected void processFocusEvent​(java.awt.event.FocusEvent event)  
      protected void processInputMethodEvent​(java.awt.event.InputMethodEvent event)  
      protected void processKeyEvent​(java.awt.event.KeyEvent event)  
      protected void processMouseEvent​(java.awt.event.MouseEvent event)  
      protected void processMouseMotionEvent​(java.awt.event.MouseEvent event)  
      protected void processMouseWheelEvent​(java.awt.event.MouseWheelEvent event)  
      void repaint​(int x, int y, int width, int height)  
      void scaleDown()
      Use this method to zoom out of the application's main window (that is, to make all the text and components visually smaller).
      void scaleUp()
      Use this method to zoom in to the application's main window (that is, make all the text and components look visually bigger).
      void setBufferedImagePaintEnabled​(boolean enabled)  
      void setScale​(double newScale)
      Use this method to scale up or down (that is zoom in or out) the entire application's display.
      void setVolatileImagePaintEnabled​(boolean enabled)
      Under some conditions, e.g.
      void update​(java.awt.Graphics graphics)  
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, 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, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, 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, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, processHierarchyBoundsEvent, processHierarchyEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
      • Methods inherited from class java.lang.Object

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

      • DisplayHost

        public DisplayHost()
    • Method Detail

      • getInputMethodRequests

        public java.awt.im.InputMethodRequests getInputMethodRequests()
        Overrides:
        getInputMethodRequests in class java.awt.Component
      • getDisplay

        public Display getDisplay()
      • getCurrentAWTEvent

        public java.awt.AWTEvent getCurrentAWTEvent()
      • getScale

        public double getScale()
        Returns:
        The current scale (or zoom) factor for the entire application's display.
        See Also:
        setScale(double)
      • setScale

        public void setScale​(double newScale)
        Use this method to scale up or down (that is zoom in or out) the entire application's display.

        For the main application window, use this (and related) methods to scale the display, but for any contained windows a ScaleDecorator must be used instead.

        Parameters:
        newScale - The new scale (zoom) factor for the entire display.
        See Also:
        scaleUp(), scaleDown(), getScale()
      • scaleUp

        public void scaleUp()
        Use this method to zoom in to the application's main window (that is, make all the text and components look visually bigger).

        The scale is increased in discrete steps for each call to this method: 1, 1.25, 1.5, 2.0, then whole integer values up to a maximum of 12.

        See Also:
        setScale(double), scaleDown(), getScale()
      • scaleDown

        public void scaleDown()
        Use this method to zoom out of the application's main window (that is, to make all the text and components visually smaller).

        The scale is decreased in discrete steps for each call to this method: next whole integer down for values above 2.0, then 2.0, 1.5, 1.25, then finally 1.

        See Also:
        setScale(double), scaleUp(), getScale()
      • setVolatileImagePaintEnabled

        public void setVolatileImagePaintEnabled​(boolean enabled)
        Under some conditions, e.g. running under Linux in an applet, volatile buffering can reduce performance.
        Parameters:
        enabled - Whether or not to use volatile image painting.
      • setBufferedImagePaintEnabled

        public void setBufferedImagePaintEnabled​(boolean enabled)
      • repaint

        public void repaint​(int x,
                            int y,
                            int width,
                            int height)
        Overrides:
        repaint in class java.awt.Component
      • paint

        public void paint​(java.awt.Graphics graphics)
        Overrides:
        paint in class java.awt.Component
      • update

        public void update​(java.awt.Graphics graphics)
        Overrides:
        update in class java.awt.Component
      • print

        public void print​(java.awt.Graphics graphics)
        Overrides:
        print in class java.awt.Component
      • processEvent

        protected void processEvent​(java.awt.AWTEvent event)
        Overrides:
        processEvent in class java.awt.Component
      • processComponentEvent

        protected void processComponentEvent​(java.awt.event.ComponentEvent event)
        Overrides:
        processComponentEvent in class java.awt.Component
      • processFocusEvent

        protected void processFocusEvent​(java.awt.event.FocusEvent event)
        Overrides:
        processFocusEvent in class java.awt.Component
      • processInputMethodEvent

        protected void processInputMethodEvent​(java.awt.event.InputMethodEvent event)
        Overrides:
        processInputMethodEvent in class java.awt.Component
      • processMouseEvent

        protected void processMouseEvent​(java.awt.event.MouseEvent event)
        Overrides:
        processMouseEvent in class java.awt.Component
      • processMouseMotionEvent

        protected void processMouseMotionEvent​(java.awt.event.MouseEvent event)
        Overrides:
        processMouseMotionEvent in class java.awt.Component
      • processMouseWheelEvent

        protected void processMouseWheelEvent​(java.awt.event.MouseWheelEvent event)
        Overrides:
        processMouseWheelEvent in class java.awt.Component
      • processKeyEvent

        protected void processKeyEvent​(java.awt.event.KeyEvent event)
        Overrides:
        processKeyEvent in class java.awt.Component