|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IFactory
UIFactory Interface to create Platform and technology independent Components. It is designed for use with AWT, Swing, SWT, JSP, JSF,... .
The directive for implementation is:
| Method Summary | |
|---|---|
IBorderLayout |
createBorderLayout()
Creates a new instance of IBorderLayout. |
IButton |
createButton()
Creates a new instance of IButton. |
ICellFormat |
createCellFormat(IColor pBackground,
IColor pForeground,
IFont pFont,
IImage pImage,
Style pStyle,
int pLeftIndent)
Creates a new instance of ICellFormat. |
IChart |
createChart()
Creates a new instance of IChart. |
ICheckBox |
createCheckBox()
Creates a new instance of ICheckBox. |
ICheckBoxCellEditor |
createCheckBoxCellEditor()
Creates a new instance of ICheckBoxCellEditor. |
ICheckBoxMenuItem |
createCheckBoxMenuItem()
Creates a new instance of ICheckBoxMenuItem. |
IChoiceCellEditor |
createChoiceCellEditor()
Creates a new instance of IChoiceCellEditor. |
IColor |
createColor(int pRGBA)
Creates an sRGB color with the specified combined RGBA value consisting of the alpha component in bits 24-31, the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7. |
IComponent |
createCustomComponent(java.lang.Object pCustomComponent)
Creates a new Instance of IComponent that contains any Custom Component. |
IContainer |
createCustomContainer(java.lang.Object pCustomContainer)
Creates a new Instance of IContainer that contains any Custom Container. |
IDateCellEditor |
createDateCellEditor()
Creates a new instance of IDateCellEditor. |
IDesktopPanel |
createDesktopPanel()
Creates a new instance of IDesktopPanel. |
IDimension |
createDimension(int pWidth,
int pHeight)
Creates a new instance of IDimension with the given with and height. |
IEditor |
createEditor()
Creates a new instance of IEditor. |
IFlowLayout |
createFlowLayout()
Creates a new instance of IFlowLayout. |
IFont |
createFont(java.lang.String pName,
int pStyle,
int pSize)
Creates a new instance of IFont from the specified name,
style and point size. |
IFormLayout |
createFormLayout()
Creates a new instance of IFormLayout. |
IFrame |
createFrame()
Creates a new instance of IFrame. |
IGridLayout |
createGridLayout(int columns,
int rows)
Creates a new instance of IGridLayout. |
IGroupPanel |
createGroupPanel()
Creates a new instance of IGroupPanel. |
IIcon |
createIcon()
Creates a new instance of IIcon. |
IImageViewer |
createImageViewer()
Creates a new instance of IImageViewer. |
IInsets |
createInsets(int pTop,
int pLeft,
int pBottom,
int pRight)
Creates a new instance of IInsets. |
IInternalFrame |
createInternalFrame(IDesktopPanel pDesktop)
Creates a new instance of IInternalFrame. |
ILabel |
createLabel()
Creates a new instance of ILabel. |
ILinkedCellEditor |
createLinkedCellEditor()
Creates a new instance of ILinkedCellEditor. |
IMenu |
createMenu()
Creates a new instance of IMenu. |
IMenuBar |
createMenuBar()
Creates a new instance of IMenuBar. |
IMenuItem |
createMenuItem()
Creates a new instance of IMenuItem. |
INumberCellEditor |
createNumberCellEditor()
Creates a new instance of INumberCellEditor. |
IPanel |
createPanel()
Creates a new instance of IPanel. |
IPasswordField |
createPasswordField()
Creates a new instance of IPasswordField. |
IPoint |
createPoint(int pX,
int pY)
Creates a new instance of IPoint with the given x and y. |
IPopupMenu |
createPopupMenu()
Creates a new instance of IPopupMenu. |
IRadioButton |
createRadioButton()
Creates a new instance of IRadioButton. |
IRectangle |
createRectangle(int pX,
int pY,
int pWidth,
int pHeight)
Creates a new instance of IRectangle with the given x, y, width and height. |
IScrollPanel |
createScrollPanel()
Creates a new instance of IScrollPanel. |
ISeparator |
createSeparator()
Creates a new instance of ISeparator. |
ISplitPanel |
createSplitPanel()
Creates a new instance of ISplitPanel. |
ITable |
createTable()
Creates a new instance of ITable. |
ITabsetPanel |
createTabsetPanel()
Creates a new instance of ITabsetPanel. |
ITextArea |
createTextArea()
Creates a new instance of ITextArea. |
ITextCellEditor |
createTextCellEditor()
Creates a new instance of ITextCellEditor. |
ITextField |
createTextField()
Creates a new instance of ITextField. |
IToggleButton |
createToggleButton()
Creates a new instance of IToggleButton. |
IToolBar |
createToolBar()
Creates a new instance of IToolBar. |
IToolBarPanel |
createToolBarPanel()
Creates a new instance of IToolBarPanel. |
ITree |
createTree()
Creates a new instance of ITree. |
IWindow |
createWindow()
Creates a new instance of IWindow. |
java.lang.String[] |
getAvailableFontFamilyNames()
Returns an array containing the names of all font families in this GraphicsEnvironment localized for the default locale,
as returned by Locale.getDefault(). |
ICellEditor |
getDefaultCellEditor(java.lang.Class<?> pClass)
Gets the default ICellEditor for the given class. |
IImage |
getImage(java.lang.String pImageName)
Searches the image if it is available as: File ClassLoader resource. |
IImage |
getImage(java.lang.String pImageName,
byte[] pData)
Creates an image from byte data. |
java.lang.String |
getImageMapping(java.lang.String pMappingName)
Gets the image name for the given mapping name. |
java.lang.String[] |
getImageMappingNames()
Gets all used mapping names. |
ICursor |
getPredefinedCursor(int pType)
Gets a ICursor object with the specified type. |
java.lang.Object |
getProperty(java.lang.String pName)
Gets the value of the property with the given name. |
IColor |
getSystemColor(java.lang.String pType)
This encapsulate symbolic colors representing the color of native GUI objects on a system. |
ICursor |
getSystemCustomCursor(java.lang.String pCursorName)
Returns a system-specific custom ICursor object matching the
specified name. |
void |
invokeAndWait(java.lang.Runnable pRunnable)
Causes pRunnable.run() to be executed synchronously on the event dispatching thread. |
java.lang.Thread |
invokeInThread(java.lang.Runnable pRunnable)
Causes pRunnable.run() to be executed asynchronously in a new thread. |
void |
invokeLater(java.lang.Runnable pRunnable)
Causes pRunnable.run() to be executed asynchronously on the event dispatching thread. |
void |
setDefaultCellEditor(java.lang.Class<?> pClass,
ICellEditor pCellEditor)
Sets the default ICellEditor for the given class. |
void |
setImageMapping(java.lang.String pMappingName,
java.lang.String pImageName)
Gets the image name for the given mapping name. |
void |
setProperty(java.lang.String pName,
java.lang.Object pValue)
Sets the given value with the given name as property. |
void |
setSystemColor(java.lang.String pType,
IColor pSystemColor)
Sets the given IColor as SystemColor. |
| Method Detail |
|---|
java.lang.String[] getAvailableFontFamilyNames()
GraphicsEnvironment localized for the default locale,
as returned by Locale.getDefault().
Typical usage would be for presentation to a user for selection of a particular family name. An application can then specify this name when creating a font, in conjunction with a style, such as bold or italic, giving the font system flexibility in choosing its own best match among multiple fonts in the same font family.
String containing font family names
localized for the default locale, or a suitable alternative
name if no name exists for this locale.IFont,
IFont.getFamily()
IFont createFont(java.lang.String pName,
int pStyle,
int pSize)
IFont from the specified name,
style and point size.
The font name can be a font face name or a font family name.
It is used together with the style to find an appropriate font face.
When a font family name is specified, the style argument is used to
select the most appropriate face from the family. When a font face
name is specified, the face's style and the style argument are
merged to locate the best matching font from the same family.
For example if face name "Arial Bold" is specified with style
IFont.ITALIC, the font system looks for a face in the
"Arial" family that is bold and italic, and may associate the font
instance with the physical font face "Arial Bold Italic".
The style argument is merged with the specified face's style, not
added or subtracted.
This means, specifying a bold face and a bold style does not
double-embolden the font, and specifying a bold face and a plain
style does not lighten the font.
If no face for the requested style can be found, the font system
may apply algorithmic styling to achieve the desired style.
For example, if ITALIC is requested, but no italic
face is available, glyphs from the plain face may be algorithmically
obliqued (slanted).
Font name lookup is case insensitive, using the case folding rules of the US locale.
If the name parameter represents something other than a
logical font, i.e. is interpreted as a physical font face or family, and
this cannot be mapped by the implementation to a physical font or a
compatible alternative, then the font system will map the Font
to a standard font.
pName - the font name. This can be a font face name or a font
family name, and may represent either a logical font or a physical
font found in this GraphicsEnvironment.pStyle - the style constant for the IFont
The style argument is an integer bitmask that may
be PLAIN, or a bitwise union of BOLD and/or ITALIC
(for example, ITALIC or BOLD|ITALIC).
If the style argument does not conform to one of the expected
integer bitmasks then the style is set to PLAIN.pSize - the point size of the IFont
IFontIFont,
getAvailableFontFamilyNames()IColor createColor(int pRGBA)
pHasalpha argument is false, alpha
is defaulted to 255.
pRGBA - the combined RGBA components
IColorIColor,
IColor.getRed(),
IColor.getGreen(),
IColor.getBlue(),
IColor.getAlpha(),
IColor.getRGBA()IColor getSystemColor(java.lang.String pType)
SystemColor object with a non-symbolic Color object,
getRGB should be used rather than equals.
Note that the way in which these system colors are applied to GUI objects may vary slightly from platform to platform since GUI objects may be rendered differently on each platform.
pType - the color type.
IColorIColor
void setSystemColor(java.lang.String pType,
IColor pSystemColor)
IColor as SystemColor.
If pSystemColor is null the
original SystemColor is restored.
pType - the color type.pSystemColor - the IColorIColorICursor getPredefinedCursor(int pType)
ICursor object with the specified type.
pType - the type of cursor
ICursorICursorICursor getSystemCustomCursor(java.lang.String pCursorName)
ICursor object matching the
specified name. Cursor names are, for example: "Invalid.16x16"
pCursorName - a string describing the desired system-specific custom cursor
ICursorIImage getImage(java.lang.String pImageName)
pImageName - the name of a resource containing pixel data
in a recognized file format.
IImage which gets its pixel data from
the specified file.IImage
IImage getImage(java.lang.String pImageName,
byte[] pData)
pImageName - the name for the image. The name will be used
for cache mechanism. If the name is set to null
then the cache will ignore the image.pData - the image data
java.lang.String getImageMapping(java.lang.String pMappingName)
pMappingName - the mapping name.
void setImageMapping(java.lang.String pMappingName,
java.lang.String pImageName)
pMappingName - the mapping name.pImageName - the image name.java.lang.String[] getImageMappingNames()
IPoint createPoint(int pX,
int pY)
IPoint with the given x and y.
pX - the x valuepY - the y value
IPointIPoint
IDimension createDimension(int pWidth,
int pHeight)
IDimension with the given with and height.
pWidth - the widthpHeight - the height
IDimensionIDimension
IRectangle createRectangle(int pX,
int pY,
int pWidth,
int pHeight)
IRectangle with the given x, y, width and height.
pX - the x valuepY - the y valuepWidth - the widthpHeight - the height
IRectangleIRectangle
IInsets createInsets(int pTop,
int pLeft,
int pBottom,
int pRight)
IInsets.
pTop - the toppLeft - the leftpBottom - the bottompRight - the right
IInsetsIInsetsILabel createLabel()
ILabel.
ILabelILabelITextField createTextField()
ITextField.
ITextFieldITextFieldIPasswordField createPasswordField()
IPasswordField.
IPasswordFieldIPasswordFieldITextArea createTextArea()
ITextArea.
ITextAreaITextAreaIIcon createIcon()
IIcon.
IIconIIconIButton createButton()
IButton.
IButtonIButtonIToggleButton createToggleButton()
IToggleButton.
IToggleButtonIToggleButtonICheckBox createCheckBox()
ICheckBox.
ICheckBoxICheckBoxIRadioButton createRadioButton()
IRadioButton.
IRadioButtonIRadioButtonIMenuItem createMenuItem()
IMenuItem.
IMenuItemIMenuItemISeparator createSeparator()
ISeparator.
ISeparatorISeparatorICheckBoxMenuItem createCheckBoxMenuItem()
ICheckBoxMenuItem.
ICheckBoxMenuItemICheckBoxMenuItemIMenu createMenu()
IMenu.
IMenuIMenuIMenuBar createMenuBar()
IMenuBar.
IMenuBarIMenuBarIPopupMenu createPopupMenu()
IPopupMenu.
IPopupMenuIPopupMenuITable createTable()
ITable.
ITableITableITree createTree()
ITree.
ITreeITreeIChart createChart()
IChart.
IChartIChart
ICellFormat createCellFormat(IColor pBackground,
IColor pForeground,
IFont pFont,
IImage pImage,
Style pStyle,
int pLeftIndent)
ICellFormat.
pBackground - the background of the Cell.pForeground - the foreground of the Cell.pFont - the font of the Cell.pImage - the image of the Cell.pStyle - the style definition of the Cell.pLeftIndent - the left indent.
ICellFormatICellFormatIEditor createEditor()
IEditor.
IEditorIEditorICellEditor getDefaultCellEditor(java.lang.Class<?> pClass)
ICellEditor for the given class.
This function should always return an editor.
It should look for best matching editor with Class.isAssignableFrom.
pClass - the class type to be edited.
ICellEditorICellEditor
void setDefaultCellEditor(java.lang.Class<?> pClass,
ICellEditor pCellEditor)
ICellEditor for the given class.
This function should always return an editor.
It should look for best matching editor with Class.isAssignableFrom.
If the given ICellEditor is null, it is removed as editor for the given class.
pClass - the class type to be edited.pCellEditor - the ICellEditorICellEditorIImageViewer createImageViewer()
IImageViewer.
IImageViewerIImageViewerIChoiceCellEditor createChoiceCellEditor()
IChoiceCellEditor.
IChoiceCellEditorIChoiceCellEditorICheckBoxCellEditor createCheckBoxCellEditor()
ICheckBoxCellEditor.
ICheckBoxCellEditorICheckBoxCellEditorIDateCellEditor createDateCellEditor()
IDateCellEditor.
IDateCellEditorIDateCellEditorILinkedCellEditor createLinkedCellEditor()
ILinkedCellEditor.
ILinkedCellEditorILinkedCellEditorINumberCellEditor createNumberCellEditor()
INumberCellEditor.
INumberCellEditorINumberCellEditorITextCellEditor createTextCellEditor()
ITextCellEditor.
ITextCellEditorITextCellEditorIPanel createPanel()
IPanel.
IPanelIPanelIToolBarPanel createToolBarPanel()
IToolBarPanel.
IToolBarPanelIToolBarPanelIGroupPanel createGroupPanel()
IGroupPanel.
IGroupPanelIGroupPanelIScrollPanel createScrollPanel()
IScrollPanel.
IScrollPanelIScrollPanelISplitPanel createSplitPanel()
ISplitPanel.
ISplitPanelISplitPanelITabsetPanel createTabsetPanel()
ITabsetPanel.
ITabsetPanelITabsetPanelIToolBar createToolBar()
IToolBar.
IToolBarIToolBarIDesktopPanel createDesktopPanel()
IDesktopPanel.
IDesktopPanelIDesktopPanelIInternalFrame createInternalFrame(IDesktopPanel pDesktop)
IInternalFrame.
pDesktop - the associated desktop for the internal frame
IInternalFrameIInternalFrameIWindow createWindow()
IWindow.
IWindowIWindowIFrame createFrame()
IFrame.
IFrameIFrameIComponent createCustomComponent(java.lang.Object pCustomComponent)
pCustomComponent - the custom Component.
IComponent custom component.IContainer createCustomContainer(java.lang.Object pCustomContainer)
pCustomContainer - the custom Container.
IContainer custom container.IBorderLayout createBorderLayout()
IBorderLayout.
IBorderLayoutIBorderLayoutIFlowLayout createFlowLayout()
IFlowLayout.
IFlowLayoutIFlowLayoutIFormLayout createFormLayout()
IFormLayout.
IFormLayoutIFormLayout
IGridLayout createGridLayout(int columns,
int rows)
IGridLayout.
columns - the column countrows - the row count
IGridLayoutIGridLayoutvoid invokeLater(java.lang.Runnable pRunnable)
pRunnable.run() to be executed asynchronously on the event dispatching thread.
This will happen after all pending events have been processed. This method
should be used when an application thread needs to update the GUI.
pRunnable - the asynchronous callinvokeAndWait(Runnable)
void invokeAndWait(java.lang.Runnable pRunnable)
throws java.lang.Exception
pRunnable.run() to be executed synchronously on the event dispatching thread. This call blocks
until all pending events have been processed and (then) pRunnable.run() returns.
This method should be used when an application thread needs to update the GUI.
pRunnable - the call
java.lang.Exception - if the call causes an exceptionjava.lang.Thread invokeInThread(java.lang.Runnable pRunnable)
pRunnable.run() to be executed asynchronously in a new thread.
Action calls and UI Calls in the thread should be synchronized with the event dispatching thread
by using invokeLater or invokeAndWait.
To guarantee functionality of invokeLater in Threads, IFactory implementations should use
InvokeLaterThread to create threads. The InvokeLaterThread calls all invokeLater notifications
after the Thread. In thread loops InvokeLaterThread.executeInvokeLater can
be called to invoke thread safe all invokeLater runnables immediate.
This gives the IFactory implementation a chance to decide how and when to run the threads.
pRunnable - the call
Thread in which the Runnable is being executed, the Thread is already running.invokeAndWait(Runnable),
invokeLater(Runnable)java.lang.Object getProperty(java.lang.String pName)
pName - the name of the property.
void setProperty(java.lang.String pName,
java.lang.Object pValue)
pName - the name of the property.pValue - the value of the property.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||