Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


oracle.dss.util.gui
Class FontButton

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.AbstractButton
                          |
                          +--javax.swing.JButton
                                |
                                +--oracle.dss.util.gui.FontButton
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.ItemSelectable, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, javax.swing.SwingConstants

public class FontButton
extends javax.swing.JButton
implements java.awt.event.ActionListener, java.beans.PropertyChangeListener

Button and panel for changing font attributes. Sets font, alignment, and color.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent

 

Field Summary
static java.lang.String PROPERTY_CANCELLED
          true if user clicks Cancel instead of OK.

 

Fields inherited from class javax.swing.AbstractButton
BORDER_PAINTED_CHANGED_PROPERTY, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY

 

Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW

 

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT

 

Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST

 

Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

 

Constructor Summary
FontButton()
          Default constructor.
FontButton(javax.swing.ImageIcon icon, java.lang.String str)
          Constructor that sets an icon for the button and the string for the button face.
FontButton(java.lang.String str)
          Constructor that sets the string for the button face.

 

Method Summary
 void applyFontPane()
          Initializes the variables in this class.
 java.awt.Color[][] getColorPalette()
          Retrieves the grid of colors to be used by font foreground and background color choosers.
 java.awt.Color getComponentBackground()
          Retrieves the background color that is selected in the dialog.
 java.awt.Font getComponentFont()
          Retrieves the font that is selected in the dialog.
 java.awt.Color getComponentForeground()
          Retrieves the foreground color that is set in the dialog.
 oracle.bali.ewt.chooser.font.FontPane getFontPane()
          Gets the FontPane for the dialog.
 oracle.bali.ewt.help.HelpProvider getHelpProvider()
          Retrieves the Help provider for the panel that this button displays.
 int getPaneHorizontalAlignment()
          Retrieves the horizontal alignment that is set in the dialog.
 int getPaneVerticalAlignment()
          Retrieves the vertical alignment of the font dialog.
 int getTextRotation()
          Retrieves the current text rotation.
 boolean isStrikeThroughStyle()
          Indicates whether the font has the strike-through property selected.
 boolean isUnderlineStyle()
          Indicates whether the font has underline property selected in the font pane.
 void setAlignmentButtonMask(int alignment)
          Specifies which alignment button appear in the dialog.
 void setColorComponentMask(int buttons)
          Specifies which color buttons appear in the dialog.
 void setColorPalette(java.awt.Color[][] colors)
          Specifies the grid of colors to use in color palettes of font foreground and background color choosers.
 void setComponentBackground(java.awt.Color c)
          Specifies the background color in the dialog.
 void setComponentFont(java.awt.Font f)
          Specifies the font for the dialog.
 void setComponentForeground(java.awt.Color c)
          Specifies the foreground color in the dialog.
 void setDialogTitle(java.lang.String str)
          Specifies the title for the Font Dialog.
 void setHelpProvider(oracle.bali.ewt.help.HelpProvider helpProvider)
          Specifies the Help provider for the panel that this button displays.
 void setPaneHorizontalAlignment(int alignment)
          Specifies the horizontal alignment property of the font dialog that this button displays.
 void setPaneLocale(java.util.Locale loc)
          Specifies the locale of the font pane that this button displays.
 void setPaneVerticalAlignment(int alignment)
          Specifies the vertical alignment of the dialog that this button displays.
 void setRotationButtonMask(int buttonMask)
          Specifies which text rotation buttons appear in the dialog.
 void setStrikeThroughStyle(boolean yesNo)
          Specifies whether to select the strikethrough property.
 void setStyleButtonMask(int style)
          Specifies which style buttons appear in the dialog.
 void setText(java.lang.String str)
          Specifies the title for this button, adding ellipses.
 void setTextRotation(int rotation)
          Specifies text rotation.
 void setUnderlineStyle(boolean yesNo)
          Specifies whether to select the underline property.

 

Methods inherited from class javax.swing.JButton
getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, removeNotify, setDefaultCapable, updateUI

 

Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addItemListener, doClick, doClick, getAction, getActionCommand, getDisabledIcon, getDisabledSelectedIcon, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getLabel, getMargin, getMnemonic, getModel, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, isBorderPainted, isContentAreaFilled, isFocusPainted, isFocusTraversable, isRolloverEnabled, isSelected, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setEnabled, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setLabel, setMargin, setMnemonic, setMnemonic, setModel, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setUI, setVerticalAlignment, setVerticalTextPosition

 

Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update

 

Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, validate

 

Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, contains, createImage, createImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Methods inherited from interface java.awt.event.ActionListener
actionPerformed

 

Methods inherited from interface java.beans.PropertyChangeListener
propertyChange

 

Field Detail

PROPERTY_CANCELLED

public static final java.lang.String PROPERTY_CANCELLED
true if user clicks Cancel instead of OK. Check this value before you call "get" methods to set the properties of the object from which this dialog is invoked.
Constructor Detail

FontButton

public FontButton(javax.swing.ImageIcon icon,
                  java.lang.String str)
Constructor that sets an icon for the button and the string for the button face.
Parameters:
icon - The icon for the face of the button.
str - The string for the face of the button.

FontButton

public FontButton(java.lang.String str)
Constructor that sets the string for the button face.
Parameters:
str - The string for the face of the button.

FontButton

public FontButton()
Default constructor. Uses standard image and text.
Method Detail

setColorPalette

public void setColorPalette(java.awt.Color[][] colors)
Specifies the grid of colors to use in color palettes of font foreground and background color choosers. If the grid of colors is not specified, then a default color palette is used. For example: If you need to provide 228 colors, you could provide an array of size 12 columns and 19 rows.
Parameters:
colors - Colors for the color palette.

getColorPalette

public java.awt.Color[][] getColorPalette()
Retrieves the grid of colors to be used by font foreground and background color choosers.
Returns:
The two-dimesional array of colors for the palette.
See Also:
setColorPalette(java.awt.Color[][])

setHelpProvider

public void setHelpProvider(oracle.bali.ewt.help.HelpProvider helpProvider)
Specifies the Help provider for the panel that this button displays.
Parameters:
helpProvider - The Help provider for this panel.

getHelpProvider

public oracle.bali.ewt.help.HelpProvider getHelpProvider()
Retrieves the Help provider for the panel that this button displays.
Returns:
The Help provider that has been specified for this panel.

setText

public void setText(java.lang.String str)
Specifies the title for this button, adding ellipses.
Overrides:
setText in class javax.swing.AbstractButton
Parameters:
str - String to display on this button. Do not include ellipses.

setDialogTitle

public void setDialogTitle(java.lang.String str)
Specifies the title for the Font Dialog.
Parameters:
str - String to display for the title.

getFontPane

public oracle.bali.ewt.chooser.font.FontPane getFontPane()
Gets the FontPane for the dialog.
Returns:
The font pane that this button creates.

setRotationButtonMask

public void setRotationButtonMask(int buttonMask)
Specifies which text rotation buttons appear in the dialog.
Parameters:
buttonMask - A constant that specifies which text rotation buttons to show. The constants are listed in the See Also section.
See Also:
BIFontPane.BUTTON_ROTATE_AUTO, BIFontPane.BUTTON_ROTATE_0, BIFontPane.BUTTON_ROTATE_90, BIFontPane.BUTTON_ROTATE_270

setStyleButtonMask

public void setStyleButtonMask(int style)
Specifies which style buttons appear in the dialog.
Parameters:
style - A constant that specifies which style buttons to show. The constants are defined in oracle.bali.ewt.chooser.font.FontPane. Because BIFontPane extends FontPane, you access them through BIFontPane. Valid constants are:
  • BUTTON_STYLE_BOLD
  • BUTTON_STYLE_ITALIC
  • BUTTON_STYLE_REGULAR
  • BUTTON_STYLE_STRIKETHROUGH
  • BUTTON_STYLE_SUBSCRIPT
  • BUTTON_STYLE_SUPERSCRIPT
  • BUTTON_STYLE_UNDERLINE

setAlignmentButtonMask

public void setAlignmentButtonMask(int alignment)
Specifies which alignment button appear in the dialog.
Parameters:
alignment - A constant that specifies which alignment buttons to show. The constants are defined in oracle.bali.ewt.chooser.font.FontPane. Because BIFontPane extends FontPane, you access them through BIFontPane. Valid constants are:
  • BUTTON_ALIGNMENT_BOTTOM
  • BUTTON_ALIGNMENT_CENTER
  • BUTTON_ALIGNMENT_END
  • BUTTON_ALIGNMENT_FULL
  • BUTTON_ALIGNMENT_LEFT
  • BUTTON_ALIGNMENT_MIDDLE
  • BUTTON_ALIGNMENT_RIGHT
  • BUTTON_ALIGNMENT_START
  • BUTTON_ALIGNMENT_TOP

setColorComponentMask

public void setColorComponentMask(int buttons)
Specifies which color buttons appear in the dialog.
Parameters:
buttons - A constant that specifies which color buttons to show. The constants are defined in oracle.bali.ewt.chooser.font.FontPane. Because BIFontPane extends FontPane, you access them through BIFontPane. The constants are:
  • COLOR_COMPONENT_BACKGROUND
  • COLOR_COMPONENT_BORDER
  • COLOR_COMPONENT_FOREGROUND

getTextRotation

public int getTextRotation()
Retrieves the current text rotation.
Returns:
A constant that represents the current text rotation. Valid constants are listed in the See Also section.
See Also:
BIFontPane.ROTATE_AUTO, BIFontPane.ROTATE_0, BIFontPane.ROTATE_90, BIFontPane.ROTATE_270

setTextRotation

public void setTextRotation(int rotation)
Specifies text rotation.
Parameters:
A - constant that represents the rotation of the text. Valid constants are listed in the See Also section.
See Also:
BIFontPane.ROTATE_AUTO, BIFontPane.ROTATE_0, BIFontPane.ROTATE_90, BIFontPane.ROTATE_270

getComponentForeground

public java.awt.Color getComponentForeground()
Retrieves the foreground color that is set in the dialog.
Returns:
The foreground color.

setComponentForeground

public void setComponentForeground(java.awt.Color c)
Specifies the foreground color in the dialog. Normally, this is the foreground color of the object from which the dialog is invoked.
Parameters:
c - The current foreground color.

getComponentBackground

public java.awt.Color getComponentBackground()
Retrieves the background color that is selected in the dialog.
Returns:
The selected background color.

setComponentBackground

public void setComponentBackground(java.awt.Color c)
Specifies the background color in the dialog. Normally, this is the background color of the object from which this dialog is invoked.
Parameters:
c - The current background color.

getComponentFont

public java.awt.Font getComponentFont()
Retrieves the font that is selected in the dialog.
Returns:
The selected font.

setComponentFont

public void setComponentFont(java.awt.Font f)
Specifies the font for the dialog. Normally, this is the font of the object from which this dialog is invoked.
Parameters:
f - The current font.

isUnderlineStyle

public boolean isUnderlineStyle()
Indicates whether the font has underline property selected in the font pane.
Returns:
true if the underline property is selected, false if it is not.

setUnderlineStyle

public void setUnderlineStyle(boolean yesNo)
Specifies whether to select the underline property. Normally, this is the font of the object from which this dialog is invoked.
Parameters:
yesNo - true to select underlining, false to clear it.

isStrikeThroughStyle

public boolean isStrikeThroughStyle()
Indicates whether the font has the strike-through property selected.
Returns:
true if strike-through is selected, false if it is not.

setStrikeThroughStyle

public void setStrikeThroughStyle(boolean yesNo)
Specifies whether to select the strikethrough property. Normally, this is the setting of the object from which the dialog is invoked.
Parameters:
yesNo - true to select strike-through, false to clear it.

getPaneHorizontalAlignment

public int getPaneHorizontalAlignment()
Retrieves the horizontal alignment that is set in the dialog.
Returns:
A constant that specifies the horizontal alignment. The constants are defined in oracle.bali.ewt.chooser.font.FontPane. Because BIFontPane extends FontPane, you access them through BIFontPane. Valid constants are:
  • HORIZONTAL_ALIGNMENT_CENTER
  • HORIZONTAL_ALIGNMENT_END
  • HORIZONTAL_ALIGNMENT_START
  • HORIZONTAL_ALIGNMENT_LEFT
  • HORIZONTAL_ALIGNMENT_RIGHT
  • HORIZONTAL_ALIGNMENT_START

setPaneHorizontalAlignment

public void setPaneHorizontalAlignment(int alignment)
Specifies the horizontal alignment property of the font dialog that this button displays. Normally this is the horizontal alignment of the object from which this dialog is invoked.
Parameters:
alignment - A constant that specifies the current alignment. The constants are defined in oracle.bali.ewt.chooser.font.FontPane. Because BIFontPane extends FontPane, you access them through BIFontPane. Valid constants are:
  • HORIZONTAL_ALIGNMENT_CENTER
  • HORIZONTAL_ALIGNMENT_END
  • HORIZONTAL_ALIGNMENT_START
  • HORIZONTAL_ALIGNMENT_LEFT
  • HORIZONTAL_ALIGNMENT_RIGHT
  • HORIZONTAL_ALIGNMENT_START

getPaneVerticalAlignment

public int getPaneVerticalAlignment()
Retrieves the vertical alignment of the font dialog.
Returns:
A constant that represents vertical alignment. The constants are defined in oracle.bali.ewt.chooser.font.FontPane. Because BIFontPane extends FontPane, you access them through BIFontPane. Valid constants are:
  • VERTICAL_ALIGNMENT_BOTTOM
  • VERTICAL_ALIGNMENT_MIDDLE
  • VERTICAL_ALIGNMENT_TOP

setPaneVerticalAlignment

public void setPaneVerticalAlignment(int alignment)
Specifies the vertical alignment of the dialog that this button displays. Normally this is the vertical alignment of the object from which the dialog is invoked.
Parameters:
alignment - A constant that represents the current vertical alignment. The constants are defined in oracle.bali.ewt.chooser.font.FontPane. Because BIFontPane extends FontPane, you access them through BIFontPane. Valid constants are:
  • VERTICAL_ALIGNMENT_BOTTOM
  • VERTICAL_ALIGNMENT_MIDDLE
  • VERTICAL_ALIGNMENT_TOP

applyFontPane

public void applyFontPane()
Initializes the variables in this class. Called when the user clicks OK in the dialog. You should not need to call this method.

setPaneLocale

public void setPaneLocale(java.util.Locale loc)
Specifies the locale of the font pane that this button displays.

Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


Copyright © 2003, Oracle. All Rights Reserved.