: Download: FAQ: Licensing: Support: Contact ME
LwVCL Home
Introduction
Overview
Screen Shots
On-line Demos
Requirements
Further Plans
Docs
Tutorial
How-to (PDF)
API
FAQ
Download
Latest version

Home > J2SE > API

Overview  Package   Class  Tree  Deprecated  Index  Help 

org.zaval.lw
Class LwFontPanel

java.lang.Object
  |
  +--org.zaval.lw.LwCanvas
        |
        +--org.zaval.lw.LwPanel
              |
              +--org.zaval.lw.LwFontPanel
All Implemented Interfaces:
java.util.EventListener, Layoutable, LayoutContainer, LwActionListener, LwComponent, LwContainer, TextListener, Validationable

public class LwFontPanel
extends LwPanel
implements LwActionListener, TextListener

This panel provides ability to cutomize font. Register an action listener to be notified whenever a selected font has been changed.

The panel reads fields titles as the following LwVCL resources:
fd.family font family list title
fd.style font style panel title
fd.size font size field title
fd.bold bold style checkbox title
fd.italic italic style checkbox title
fd.sample font sample panel title


Fields inherited from class org.zaval.lw.LwPanel
children
 
Fields inherited from class org.zaval.lw.LwCanvas
bits, bottom, height, isValidValue, left, parent, psHeight, psWidth, right, skins, temporary, top, width, x, y
 
Constructor Summary
LwFontPanel()
          Constructs a font panel.
 
Method Summary
 void actionPerformed(java.lang.Object target, java.lang.Object data)
          Invoked when an action event occurred.
 void addActionListener(LwActionListener l)
          Adds the specified action listener to receive action events from this component.
protected  LwLayout getDefaultLayout()
          Gets the default layout manager that is set with the container during initialization.
 java.awt.Font getSelectedFont()
          Gets the current selected font.
 void removeActionListener(LwActionListener l)
          Removes the specified action listener so it no longer receives action events from this component.
 void setSelectedFont(java.awt.Font font)
          Sets the specified font as the selected color.
 void textInserted(TextEvent e)
          Invoked when a new text has been inserted in the text.
 void textRemoved(TextEvent e)
          Invoked when a part of the text has been removed.
 void textUpdated(TextEvent e)
          Invoked when the text has been updated.
 
Methods inherited from class org.zaval.lw.LwPanel
add, add, calcPreferredSize, count, get, getLayoutOffset, getLwComponentAt, getLwLayout, getPreferredSize, indexOf, insert, insert, invalidate, isInvalidatedByChild, laidout, paintOnTop, remove, remove, removeAll, setBackground, setLwLayout, setOpaque, setSize, toFront, updateCashedPs, validate
 
Methods inherited from class org.zaval.lw.LwCanvas
calcInsets, canHaveFocus, customize, cvp, getBackground, getBottom, getBounds, getHeight, getInsets, getLeft, getLocation, getLwParent, getOrigin, getPSImpl, getRight, getSize, getTop, getViewMan, getVisiblePart, getWidth, getX, getY, hasFocus, isEnabled, isOpaque, isValid, isVisible, paint, recalc, repaint, repaint, repaint, requestFocus, setEnabled, setInsets, setLocation, setLwParent, setPSSize, setViewMan, setVisible, update, viewManChanged, vrp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.zaval.lw.LwComponent
canHaveFocus, getBackground, getLwParent, getOrigin, getViewMan, getVisiblePart, isEnabled, isOpaque, paint, repaint, repaint, repaint, setEnabled, setInsets, setLwParent, setViewMan, setVisible, update
 
Methods inherited from interface org.zaval.lw.Layoutable
getBounds, getHeight, getInsets, getLocation, getSize, getWidth, getX, getY, isVisible, setLocation
 
Methods inherited from interface org.zaval.util.Validationable
isValid
 

Constructor Detail

LwFontPanel

public LwFontPanel()
Constructs a font panel.
Method Detail

addActionListener

public void addActionListener(LwActionListener l)
Adds the specified action listener to receive action events from this component. The action event is performed whenever a selected has been changed. The action event stores the new font value in the event data field.
Parameters:
l - the specified action listener.

removeActionListener

public void removeActionListener(LwActionListener l)
Removes the specified action listener so it no longer receives action events from this component.
Parameters:
l - the specified action listener.

getSelectedFont

public java.awt.Font getSelectedFont()
Gets the current selected font.
Returns:
a current selected font.

setSelectedFont

public void setSelectedFont(java.awt.Font font)
Sets the specified font as the selected color.
Parameters:
font - the specified font to set as selected.

actionPerformed

public void actionPerformed(java.lang.Object target,
                            java.lang.Object data)
Description copied from interface: LwActionListener
Invoked when an action event occurred.
Specified by:
actionPerformed in interface LwActionListener
Following copied from interface: org.zaval.lw.event.LwActionListener
Parameters:
src - the specified source where the event has been originated.
data - the event data.

textRemoved

public void textRemoved(TextEvent e)
Description copied from interface: TextListener
Invoked when a part of the text has been removed.
Specified by:
textRemoved in interface TextListener
Following copied from interface: org.zaval.data.event.TextListener
Parameters:
e - the text event.

textInserted

public void textInserted(TextEvent e)
Description copied from interface: TextListener
Invoked when a new text has been inserted in the text.
Specified by:
textInserted in interface TextListener
Following copied from interface: org.zaval.data.event.TextListener
Parameters:
e - the text event.

textUpdated

public void textUpdated(TextEvent e)
Description copied from interface: TextListener
Invoked when the text has been updated.
Specified by:
textUpdated in interface TextListener
Following copied from interface: org.zaval.data.event.TextListener
Parameters:
e - the text event.

getDefaultLayout

protected LwLayout getDefaultLayout()
Description copied from class: LwPanel
Gets the default layout manager that is set with the container during initialization. This implementation of the method returns LwRastLayout as the default layout manager, the layout manager is got as a static object by "def.lay" key.
Overrides:
getDefaultLayout in class LwPanel
Following copied from class: org.zaval.lw.LwPanel
Returns:
a layout manager.


: up