Oracle Forms 9i Samples and Demos


oracle.forms.demos.enhancedItems
Class RolloverButton

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--oracle.ewt.lwAWT.LWComponent
                    |
                    +--oracle.ewt.lwAWT.AbstractPainterComponent
                          |
                          +--oracle.ewt.lwAWT.AbstractButton
                                |
                                +--oracle.ewt.button.PushButton
                                      |
                                      +--oracle.forms.ui.VButton
                                            |
                                            +--oracle.forms.demos.enhancedItems.RolloverButton
All Implemented Interfaces:
javax.accessibility.Accessible, oracle.ewt.lwAWT.DoubleBufferer, oracle.ewt.help.HelpCapable, java.awt.image.ImageObserver, oracle.ewt.lwAWT.ImmediatePainter, oracle.forms.ui.IView, oracle.ewt.lwAWT.KeyProcessor, java.awt.MenuContainer, java.io.Serializable, oracle.ewt.lwAWT.VirtualComponent

public class RolloverButton
extends oracle.forms.ui.VButton

Oracle Forms Server 9i PJC Example

This is a PJC that implements a web style Rollover image button where the image changes when the user moves the mouse over the component. The standard Forms oracle.forms.ui.VButton is subclassed so only the additional functionality is required to be added. We register two new forms properties, IMAGE_NAME_ON and IMAGE_NAME_OFF. These properties form the the URL of the image files that the button will display. These properties will be set by PL/SQL trigger code or can be set by defining the LABEL of the button with the prefix [ROLLOVER] followed by the ON inage and OFF image names separated by a comma

Version:
1.0 09/13/1999 created
Author:
Steve Button, Duncan Mills
See Also:
Serialized Form

Inner classes inherited from class oracle.ewt.lwAWT.AbstractButton
oracle.ewt.lwAWT.AbstractButton.AccessibleAbstractButton
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
static oracle.forms.properties.ID IMAGE_NAME_OFF
          the property registered to specify the off image to be used
static oracle.forms.properties.ID IMAGE_NAME_ON
          the property registered to specify the on image to be used
 
Fields inherited from class oracle.ewt.lwAWT.LWComponent
DEFAULT_BORDERPAINTER, DEFAULT_COLOR, DEFAULT_FONT, DEFAULT_PAINTER, MNEMONIC_CHAR_NONE, MNEMONIC_INDEX_NONE
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface oracle.forms.ui.IView
DEFAULT_COLOR
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
RolloverButton()
           
 
Method Summary
 java.lang.Object getProperty(oracle.forms.properties.ID pid)
          Implementation of IView interface which returns the value of a requested property
 void init(oracle.forms.handler.IHandler handler)
          Implementation of IView interface which provides an initialization opportunity for the component
 void log(java.lang.String msg)
          Utility function to print out a debug message to the Java Console
 boolean setProperty(oracle.forms.properties.ID property, java.lang.Object value)
          Implementation of IView interface which sets a requested property to a given value If the property being set is LABEL then special processing is undertaken.
 
Methods inherited from class oracle.forms.ui.VButton
add, addListener, destroy, getDefaultName, remove, removeAll, removeListener, repaint, setLabel
 
Methods inherited from class oracle.ewt.button.PushButton
activate, addActionListener, createAccessibleContext, doesKeyCausePress, getButtonUI, getImageSet, getLabel, getPaintData, getPainter, getPaintState, getUIClassID, interiorContains, isArmed, isDefault, isLeftmost, isRightmost, paramString, processActionEvent, processEventImpl, processFocusEvent, removeActionListener, setArmed, setDefault, setImage, setImageSet, setLeftmost, setPainter, setRightmost
 
Methods inherited from class oracle.ewt.lwAWT.AbstractButton
disable, isFocusable, isFocusTraversable, isInteracting, postProcessKey, processKeyEvent, processMouseDragged, processMouseEvent, processMouseExited, processMouseMotionEvent, processMouseMoved, processMousePressed, processMouseReleased, requestFocus, setFocusable, setInteracting, simulatePush, terminateInteraction
 
Methods inherited from class oracle.ewt.lwAWT.AbstractPainterComponent
getInvalidateFlags, getMaximumSize, getMinimumSize, getPreferredSize, getRepaintFlags, isInteriorTransparent, paintInterior
 
Methods inherited from class oracle.ewt.lwAWT.LWComponent
accessAccessibleContext, addAnyEventListener, addImpl, addNotify, addPostKeyListener, addPreKeyListener, clipToParents, contains, convertInnerToOuterSize, convertInteriorToOuter, convertOuterToInterior, doLayout, enable, eventMatchesMnemonic, eventMatchesMnemonic, freezeRepaints, getAccessibleContext, getActualAlignment, getActualReadingDirection, getAlignment, getBackground, getBaseClassName, getBorderContext, getBorderInsets, getBorderPainter, getClientProperty, getColorScheme, getDefaultHelpProvider, getDocumentSize, getDoubleBuffer, getEWTDropTarget, getFill, getFocusedComponent, getFont, getForeground, getGraphics, getHelpBook, getHelpProvider, getHelpTopic, getInnerBounds, getInnerHeight, getInnerOrigin, getInnerSize, getInnerWidth, getInsets, getInteriorAlignmentX, getInteriorAlignmentY, getLookAndFeel, getMnemonicChar, getMnemonicIndex, getMnemonicString, getName, getPageBounds, getPaintContext, getPrintPaintContext, getReadingDirection, getToolTipValue, getUI, getUIDefaults, hasFocus, hasGlobalFocus, hasMnemonicModifier, hasWindowFocus, hide, imageUpdate, insets, invalidate, invalidateAndRepaintIfNecessary, isActive, isBorderTransparent, isChildClipped, isClippedBySibling, isLocaleDefaulted, isPaintPropagationRequired, isReadingDirectionDefaulted, isTransparent, paint, paintAll, paintImmediate, paintImmediate, paintImmediateInterior, paintImmediateInterior, paintImmediateUnclipped, paintOverChildren, pointInInterior, pointIsInChild, print, printAll, printPage, processEvent, putClientProperty, redispatchEvent, remove, removeAnyEventListener, removeClientProperty, removeNotify, removePostKeyListener, removePreKeyListener, repaint, repaintInterior, repaintInterior, reshape, setAlignment, setBackground, setColorScheme, setDefaultHelpProvider, setEnabled, setEWTDropTarget, setFill, setFont, setForeground, setHelpBook, setHelpProvider, setHelpTopic, setLocale, setLookAndFeel, setMnemonicChar, setMnemonicIndex, setReadingDirection, setToolTipValue, setToolTipValue, setUI, setVisible, shiftFrozenDamage, showHelp, unfreezeRepaints, update, updateAlignment, updateLocale, updateReadingDirection, updateUI, updateUI, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, getListeners, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, remove, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFontMetrics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, inside, isDisplayable, isDoubleBuffered, isEnabled, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.forms.ui.IView
contains, paint
 
Methods inherited from interface oracle.ewt.lwAWT.VirtualComponent
getBounds, getSize
 

Field Detail

IMAGE_NAME_ON

public static final oracle.forms.properties.ID IMAGE_NAME_ON
the property registered to specify the on image to be used

IMAGE_NAME_OFF

public static final oracle.forms.properties.ID IMAGE_NAME_OFF
the property registered to specify the off image to be used
Constructor Detail

RolloverButton

public RolloverButton()
Method Detail

init

public void init(oracle.forms.handler.IHandler handler)
Implementation of IView interface which provides an initialization opportunity for the component
Overrides:
init in class oracle.forms.ui.VButton
Parameters:
handler - - message handler associated with this view.
See Also:
IView

setProperty

public boolean setProperty(oracle.forms.properties.ID property,
                           java.lang.Object value)
Implementation of IView interface which sets a requested property to a given value If the property being set is LABEL then special processing is undertaken. If the Label is Prefixed with the string [ROLLOVER] then the rest of the label is assumed to be a comma separated list of the ON and OFF icon names If the String after the rollover tag does not contain a pair e.g. no comma then we assume that it's one of the Icons in the JAR which will be called xxx_on and xxx_off where xxx is the supplied string. We then set up the pair for you e.g. a label of [ROLLOVER]firstrec will cause the icons /oracle/forms/demos/images/firstrec_on.gif and /oracle/forms/demos/images/firstrec_off.gif to be loaded If the label does not begin with [ROLLOVER] then we treat it a a normal text label except that leading or trailing round brackets can be used to indicate if that edge of the button is rounded in Oracle look and feel
Overrides:
setProperty in class oracle.forms.ui.VButton
Parameters:
property - property to be set.
value - value of the property id.
Returns:
true if the property could be set, false otherwise.
See Also:
IView

getProperty

public java.lang.Object getProperty(oracle.forms.properties.ID pid)
Implementation of IView interface which returns the value of a requested property
Overrides:
getProperty in class oracle.forms.ui.VButton
Parameters:
pid - the property id that represents the property to be set
Returns:
the value of the property id
See Also:
IView

log

public void log(java.lang.String msg)
Utility function to print out a debug message to the Java Console
Parameters:
msg - string to display, this will be prefixed with the classname of the PJC

Oracle Forms 9i Samples and Demos