oracle.forms.fd
Class FunButton
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.fd.FunButton
- All Implemented Interfaces:
- java.awt.event.FocusListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, oracle.ewt.help.HelpCapable, oracle.ewt.lwAWT.DoubleBufferer, oracle.ewt.lwAWT.ImmediatePainter, oracle.ewt.lwAWT.KeyProcessor, oracle.ewt.lwAWT.VirtualComponent, oracle.forms.ui.IView
public class FunButton
- extends oracle.forms.ui.VButton
- implements java.awt.event.FocusListener
A non rectangular Push Button
- Version:
- 1.5
january 2009 - the TEXT BUTTON takes into acount, now
the text position (left-center-right)
jully 2010 - Shaped buttons can have
image in the background
- Author:
- Francois Degrelle
creation february 2008
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class oracle.ewt.lwAWT.AbstractButton |
oracle.ewt.lwAWT.AbstractButton.AccessibleAbstractButton |
Nested classes/interfaces inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
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 |
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 |
Method Summary |
void |
drawText(int w,
int h,
java.awt.Graphics2D g2)
|
void |
focusGained(java.awt.event.FocusEvent e)
|
void |
focusLost(java.awt.event.FocusEvent e)
|
private static java.awt.Color |
getMixedColor(java.awt.Color c1,
float pct1,
java.awt.Color c2,
float pct2)
|
static boolean |
hasAlpha(java.awt.Image image)
|
void |
init(oracle.forms.handler.IHandler handler)
|
void |
log(java.lang.String msg)
Utility function to print out a debug message to the Java Console |
protected void |
mouseOFF()
|
protected void |
mouseON()
|
void |
paint(java.awt.Graphics g)
---------------------------*
Paint the component
---------------------------- |
private void |
paintBorderGlow(java.awt.Shape shape,
java.awt.Graphics2D g2,
int glowWidth,
boolean bEnabled)
|
private void |
paintBorderShadow(java.awt.Shape shape,
java.awt.Graphics2D g2,
int shadowWidth)
|
protected void |
setBackgroundcolor(java.awt.Color c)
|
protected void |
setBGcolor(java.awt.Color c)
|
protected void |
setBTImage(java.awt.Image i)
|
protected void |
setDirection(int iDirection)
|
protected void |
setEnable(boolean b)
|
protected void |
setFGcolor(java.awt.Color c)
|
protected void |
setFonte(java.awt.Font f)
|
protected void |
setImageOFF(java.awt.Image i)
|
protected void |
setImageON(java.awt.Image i)
|
protected void |
setImagePosition(java.lang.String sPos)
|
private java.awt.Point |
SetImgCoordinate()
|
protected void |
setNumImage(int iNum)
|
boolean |
setProperty(oracle.forms.properties.ID property,
java.lang.Object value)
-------------------------------*
set the needed properties
-------------------------------- |
protected void |
setShadowcolor(java.awt.Color c)
|
protected void |
setTextPosition(int iPos)
|
(package private) java.awt.Color |
toBright(java.awt.Color c,
float factor)
|
static java.awt.image.BufferedImage |
toBufferedImage(java.awt.Image image)
|
(package private) java.awt.Color |
toDark(java.awt.Color c,
float factor)
|
void |
update(java.awt.Graphics g)
|
Methods inherited from class oracle.forms.ui.VButton |
add, addListener, destroy, getDefaultName, getProperty, 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, isDoubleBufferingEnabled, isLocaleDefaulted, isPaintPropagationRequired, isReadingDirectionDefaulted, isTransparent, 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, setDoubleBufferingEnabled, setEnabled, setEWTDropTarget, setFill, setFont, setForeground, setHelpBook, setHelpProvider, setHelpTopic, setLocale, setLookAndFeel, setMnemonicChar, setMnemonicIndex, setReadingDirection, setToolTipValue, setToolTipValue, setUI, setVisible, shiftFrozenDamage, showHelp, unfreezeRepaints, updateAlignment, updateLocale, updateReadingDirection, updateUI, updateUI, updateUI |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getListeners, getMousePosition, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, remove, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFontMetrics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
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 |
Methods inherited from interface oracle.ewt.lwAWT.VirtualComponent |
getBounds, getSize |
SETIMAGEON
private static final oracle.forms.properties.ID SETIMAGEON
SETIMAGEOFF
private static final oracle.forms.properties.ID SETIMAGEOFF
SETDEBUG
private static final oracle.forms.properties.ID SETDEBUG
SETBACKGROUNDCOLOR
private static final oracle.forms.properties.ID SETBACKGROUNDCOLOR
SETBORDERCOLOR
private static final oracle.forms.properties.ID SETBORDERCOLOR
SETROTATION
private static final oracle.forms.properties.ID SETROTATION
SETCIRCLE
private static final oracle.forms.properties.ID SETCIRCLE
SETSCALE
private static final oracle.forms.properties.ID SETSCALE
SETPOLYGON
private static final oracle.forms.properties.ID SETPOLYGON
SETRELIEF
private static final oracle.forms.properties.ID SETRELIEF
SETSHADOWSHIFT
private static final oracle.forms.properties.ID SETSHADOWSHIFT
SETRELIEFALL
private static final oracle.forms.properties.ID SETRELIEFALL
SETRELIEFWIDTH
private static final oracle.forms.properties.ID SETRELIEFWIDTH
SETLOSANGE
private static final oracle.forms.properties.ID SETLOSANGE
SETTEXT
private static final oracle.forms.properties.ID SETTEXT
SETTEXTAT
private static final oracle.forms.properties.ID SETTEXTAT
SETTEXTSHADOW
private static final oracle.forms.properties.ID SETTEXTSHADOW
SETTEXTCOLOR
private static final oracle.forms.properties.ID SETTEXTCOLOR
SETTEXTPOS
private static final oracle.forms.properties.ID SETTEXTPOS
SETTEXTTHICKNESS
private static final oracle.forms.properties.ID SETTEXTTHICKNESS
SETSHADOWCOLOR
private static final oracle.forms.properties.ID SETSHADOWCOLOR
DRAWBORDER
private static final oracle.forms.properties.ID DRAWBORDER
DRAWOUTLINE
private static final oracle.forms.properties.ID DRAWOUTLINE
DRAWBORDERALL
private static final oracle.forms.properties.ID DRAWBORDERALL
DRAWCLIPBORDER
private static final oracle.forms.properties.ID DRAWCLIPBORDER
DRAWCLIPBORDERALL
private static final oracle.forms.properties.ID DRAWCLIPBORDERALL
SETIMAGE
private static final oracle.forms.properties.ID SETIMAGE
SETIMAGEORDER
private static final oracle.forms.properties.ID SETIMAGEORDER
SETIMAGEPOS
private static final oracle.forms.properties.ID SETIMAGEPOS
SETGRADIENT
private static final oracle.forms.properties.ID SETGRADIENT
setSeparator
private static final oracle.forms.properties.ID setSeparator
iStandard
final int iStandard
- See Also:
- Constant Field Values
iPolygon
final int iPolygon
- See Also:
- Constant Field Values
iCircle
final int iCircle
- See Also:
- Constant Field Values
iLosange
final int iLosange
- See Also:
- Constant Field Values
iString
final int iString
- See Also:
- Constant Field Values
iForm
protected int iForm
iBorderGlow
protected int iBorderGlow
bGradient
protected boolean bGradient
sOrder
protected java.lang.String sOrder
fWidth
protected float fWidth
fStroke
protected float fStroke
LeftToRight
public static int LeftToRight
RightToLeft
public static int RightToLeft
UpToDown
public static int UpToDown
DownToUp
public static int DownToUp
UpLeftToDownRight
public static int UpLeftToDownRight
Left
public static int Left
Center
public static int Center
Right
public static int Right
cStart
protected java.awt.Color cStart
cEnd
protected java.awt.Color cEnd
cDefault
protected java.awt.Color cDefault
cFocus
protected java.awt.Color cFocus
cDisable
protected java.awt.Color cDisable
cFG
protected java.awt.Color cFG
cBG
protected java.awt.Color cBG
cBack
protected java.awt.Color cBack
cBorder
protected java.awt.Color cBorder
gradient1
protected java.awt.Color gradient1
gradient2
protected java.awt.Color gradient2
igrDir
protected int igrDir
iTextPos
protected int iTextPos
iImgPos
protected int iImgPos
font
protected java.awt.Font font
clrGlowInnerHi
private java.awt.Color clrGlowInnerHi
clrGlowInnerLo
private java.awt.Color clrGlowInnerLo
clrGlowOuterHi
private java.awt.Color clrGlowOuterHi
clrGlowOuterLo
private java.awt.Color clrGlowOuterLo
m_images
protected java.awt.Image[] m_images
image
protected java.awt.Image image
icon
private javax.swing.ImageIcon icon
tic
private javax.swing.ImageIcon[] tic
iImg
protected int iImg
sImgPos
protected java.lang.String sImgPos
iX
protected int iX
iY
protected int iY
iW
protected int iW
iH
protected int iH
iImgW
protected int iImgW
iImgH
protected int iImgH
tiImgW
protected int[] tiImgW
tiImgH
protected int[] tiImgH
iArcWidth
protected int iArcWidth
iArcHeight
protected int iArcHeight
iDec
protected int iDec
bFocus
protected boolean bFocus
bDefault
protected boolean bDefault
bEnable
protected boolean bEnable
bPressed
protected boolean bPressed
bBorder
protected boolean bBorder
bOutline
protected boolean bOutline
bRelief
protected boolean bRelief
bClipBorder
protected boolean bClipBorder
bReliefAll
protected static boolean bReliefAll
bBorderAll
protected static boolean bBorderAll
bClipBorderAll
protected static boolean bClipBorderAll
iTextPosX
protected int iTextPosX
iTextPosY
protected int iTextPosY
dShadowX
protected double dShadowX
dShadowY
protected double dShadowY
bScale
protected boolean bScale
bLog
protected boolean bLog
poly
protected java.awt.Polygon poly
focusStroke
protected java.awt.BasicStroke focusStroke
dRotation
protected double dRotation
path
protected java.awt.geom.GeneralPath path
m_handler
private oracle.forms.handler.IHandler m_handler
m_codeBase
private java.net.URL m_codeBase
sInitialLabel
private java.lang.String sInitialLabel
cSeparator
private char cSeparator
shape
private java.awt.Shape shape
tshape
private java.awt.Shape tshape
ribbon
private java.awt.Shape ribbon
fontSize
private int fontSize
iShadowThickH
private int iShadowThickH
iShadowThickV
private int iShadowThickV
at
private java.awt.geom.AffineTransform at
text
private java.lang.String text
cShadow
private java.awt.Color cShadow
fTextFont
private java.awt.Font fTextFont
FunButton
public FunButton()
init
public void init(oracle.forms.handler.IHandler handler)
- Specified by:
init
in interface oracle.forms.ui.IView
- Overrides:
init
in class oracle.forms.ui.VButton
setFGcolor
protected void setFGcolor(java.awt.Color c)
setBGcolor
protected void setBGcolor(java.awt.Color c)
setShadowcolor
protected void setShadowcolor(java.awt.Color c)
setBackgroundcolor
protected void setBackgroundcolor(java.awt.Color c)
setDirection
protected void setDirection(int iDirection)
setTextPosition
protected void setTextPosition(int iPos)
setImagePosition
protected void setImagePosition(java.lang.String sPos)
setFonte
protected void setFonte(java.awt.Font f)
setEnable
protected void setEnable(boolean b)
setBTImage
protected void setBTImage(java.awt.Image i)
setImageON
protected void setImageON(java.awt.Image i)
setImageOFF
protected void setImageOFF(java.awt.Image i)
mouseON
protected void mouseON()
mouseOFF
protected void mouseOFF()
setNumImage
protected void setNumImage(int iNum)
paint
public void paint(java.awt.Graphics g)
- ---------------------------*
Paint the component
----------------------------
- Specified by:
paint
in interface oracle.forms.ui.IView
- Overrides:
paint
in class oracle.ewt.lwAWT.LWComponent
update
public void update(java.awt.Graphics g)
- Overrides:
update
in class oracle.ewt.lwAWT.LWComponent
toBufferedImage
public static java.awt.image.BufferedImage toBufferedImage(java.awt.Image image)
hasAlpha
public static boolean hasAlpha(java.awt.Image image)
setProperty
public boolean setProperty(oracle.forms.properties.ID property,
java.lang.Object value)
- -------------------------------*
set the needed properties
--------------------------------
- Specified by:
setProperty
in interface oracle.forms.ui.IView
- Overrides:
setProperty
in class oracle.forms.ui.VButton
SetImgCoordinate
private java.awt.Point SetImgCoordinate()
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
toDark
java.awt.Color toDark(java.awt.Color c,
float factor)
toBright
java.awt.Color toBright(java.awt.Color c,
float factor)
focusGained
public void focusGained(java.awt.event.FocusEvent e)
- Specified by:
focusGained
in interface java.awt.event.FocusListener
focusLost
public void focusLost(java.awt.event.FocusEvent e)
- Specified by:
focusLost
in interface java.awt.event.FocusListener
drawText
public void drawText(int w,
int h,
java.awt.Graphics2D g2)
getMixedColor
private static java.awt.Color getMixedColor(java.awt.Color c1,
float pct1,
java.awt.Color c2,
float pct2)
paintBorderGlow
private void paintBorderGlow(java.awt.Shape shape,
java.awt.Graphics2D g2,
int glowWidth,
boolean bEnabled)
paintBorderShadow
private void paintBorderShadow(java.awt.Shape shape,
java.awt.Graphics2D g2,
int shadowWidth)