|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.tensegrity.gui.swing.control.preview.AbstractPreview
This abstract class is meant to ease the implementation of a
Preview control based on a JPanel. It covers the
set and get methods for format parameters and is limited to a fixed size,
which is suitable for most cases.
StrokeFormat,
PaintFormat,
FontFormat,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
protected int |
fontColor
The font color. |
protected java.lang.String |
fontFamily
The family name of the font. |
protected boolean |
fontItalic
The flag that indicates italic style. |
protected int |
fontSize
The size of the Font. |
protected boolean |
fontStrikethrough
The flag that indicates strikethrough. |
protected boolean |
fontUnderline
The flag that indicates underlining. |
protected int |
fontWeight
The weight of the font. |
protected int |
markerSize
The size of the marker. |
protected int |
markerType
The type of a marker. |
protected int |
paintColorback
The background color. |
protected int |
paintColorfore
The foreground color. |
protected int |
paintGradientType
The gradient type. |
protected int |
paintPatternType
The pattern type. |
protected int |
paintStyle
The style of a Paint. |
protected java.lang.String |
paintTextureKey
The texture raster key for the raster |
protected int |
paintTransparency
The level of transparency. |
protected boolean |
paintTransparent
The flag that indicates whether to use transparency or not. |
protected java.awt.Dimension |
pSize
Fixed size for Preview elements. |
protected StrokeFormat |
strikethroughStroke
The stroke format for the strikethrough |
protected int |
strokeColor
Color of a Stroke. |
protected double[] |
strokePattern
Pattern of a Stroke. |
protected int |
strokeStyle
Style of a Stroke. |
protected int |
strokeWeight
Weight of a Stroke. |
protected StrokeFormat |
underlineStroke
The stroke format for the underline |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
AbstractPreview()
Constructor for AbstractPreview. |
|
| Method Summary | |
int |
getFontColor()
Method getFontColor returns the color of the currently previewed font. |
java.lang.String |
getFontFamily()
Method getFontFamily returns the name of the currently previewed font. |
boolean |
getFontItalic()
Method getFontItalic returns the flag that indicates that the previewed font is italic. |
int |
getFontSize()
Method getFontSize returns the size of the currently previewed font. |
boolean |
getFontStrikethrough()
Method getFontStrikethrough returns the flag that indicates that the previewed font is strikethrough. |
boolean |
getFontUnderline()
Method getFontUnderline returns the flag that indicates that the previewed font is underlined. |
int |
getFontWeight()
Method getFontWeight returns the weight of the currently previewed font. |
int |
getMarkerSize()
Returns the size of the marker. |
int |
getMarkerType()
Returns the type of the marker. |
int |
getPaintColorback()
Method getPaintColorback returns the current background color of the previewed paint. |
int |
getPaintColorfore()
Method getPaintColorfore returns the current foreground color of the previewed paint. |
int |
getPaintGradientType()
Method getPaintGradientType returns the gradient type as int. |
int |
getPaintPatternType()
Method getPaintPatternType returns pattern type as int. |
int |
getPaintStyle()
Method getPaintStyle returns the current style of the previewed paint. |
java.lang.String |
getPaintTextureKey()
Returns the texture raster key that is used to get the raster from the pool. |
int |
getPaintTransparency()
Method getPaintTransparency returns the level of transparency as an int between zero and 100. |
boolean |
getPaintTransparent()
Method getPaintTransparent returns the flag that indicates whether to use transparency. |
java.awt.Dimension |
getPreferredSize()
|
int |
getStrokeColor()
Method getStrokeColor returns the current color of the previewed stroke. |
int |
getStrokeStyle()
Method getStrokeStyle returns the current style of the previewed stroke. |
int |
getStrokeWeight()
Method getStrokeWeight returns the current weight of the previewed stroke. |
void |
setFontFormat(int fontSize,
int fontWeight,
java.lang.String fontFamily,
int fontColor,
boolean fontItalic,
boolean fontUnderline,
boolean fontStrikethrough,
StrokeFormat underlineStroke,
StrokeFormat strikethroughStroke)
Method setFontFormat sets all font relevant values. |
void |
setMarkerFormat(int type,
int size,
int paintStyle,
int paintColorback,
int paintColorfore,
int paintGradientType,
int paintPatternType,
java.lang.String textureKey,
int paintTransparency,
boolean paintTransparent,
int strokeStyle,
int strokeWeight,
int strokeColor)
Sets the MarkerFormat based on the given parameters. |
void |
setPaintFormat(int paintStyle,
int paintColorback,
int paintColorfore,
int paintGradientType,
int paintPatternType,
java.lang.String paintTextureKey,
int paintTransparency,
boolean paintTransparent)
Method setPaintFormat sets all PaintFormat relevant values. |
void |
setStrokeFormat(int strokeStyle,
int strokeWeight,
int strokeColor,
double[] strokePattern)
Method setStrokeFormat sets all stroke related values. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| 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, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, 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 |
| Field Detail |
protected int strokeStyle
StrokeFormatprotected int strokeWeight
StrokeFormatprotected int strokeColor
StrokeFormatprotected double[] strokePattern
StrokeFormatprotected int paintStyle
PaintFormatprotected int paintColorback
PaintFormatprotected int paintColorfore
PaintFormatprotected int paintGradientType
PaintFormatprotected int paintPatternType
PaintFormatprotected java.lang.String paintTextureKey
protected int paintTransparency
PaintFormatprotected boolean paintTransparent
PaintFormatprotected int fontSize
FontFormatprotected int fontWeight
FontFormatprotected java.lang.String fontFamily
FontFormatprotected int fontColor
FontFormatprotected boolean fontItalic
FontFormatprotected boolean fontUnderline
FontFormatprotected boolean fontStrikethrough
FontFormatprotected int markerType
MarkerFormatprotected int markerSize
MarkerFormatprotected java.awt.Dimension pSize
protected StrokeFormat underlineStroke
protected StrokeFormat strikethroughStroke
| Constructor Detail |
public AbstractPreview()
| Method Detail |
public int getStrokeStyle()
Preview
getStrokeStyle in interface PreviewStrokeFormatpublic int getStrokeWeight()
Preview
getStrokeWeight in interface PreviewStrokeFormatpublic int getStrokeColor()
Preview
getStrokeColor in interface PreviewStrokeFormat
public void setStrokeFormat(int strokeStyle,
int strokeWeight,
int strokeColor,
double[] strokePattern)
Preview
setStrokeFormat in interface PreviewstrokeStyle - the style as int.strokeWeight - the weight as int.strokeColor - the color as int.strokePattern - the pattern as double arrayStrokeFormatpublic int getPaintStyle()
Preview
getPaintStyle in interface PreviewPaintFormatpublic int getPaintColorback()
Preview
getPaintColorback in interface PreviewPaintFormatpublic int getPaintColorfore()
Preview
getPaintColorfore in interface PreviewPaintFormatpublic int getPaintGradientType()
Preview
getPaintGradientType in interface PreviewPaintFormatpublic int getPaintPatternType()
Preview
getPaintPatternType in interface PreviewPaintFormatpublic int getPaintTransparency()
Preview
getPaintTransparency in interface PreviewPaintFormatpublic java.lang.String getPaintTextureKey()
Preview
getPaintTextureKey in interface PreviewPaintFormatpublic boolean getPaintTransparent()
Preview
getPaintTransparent in interface PreviewPaintFormat
public void setPaintFormat(int paintStyle,
int paintColorback,
int paintColorfore,
int paintGradientType,
int paintPatternType,
java.lang.String paintTextureKey,
int paintTransparency,
boolean paintTransparent)
Preview
setPaintFormat in interface PreviewpaintStyle - the style.paintColorback - the background color as rgb int.paintColorfore - the foregound color as rgb int.paintGradientType - the gradient type.paintPatternType - the pattern type.paintTextureKey - the texture raster key.paintTransparency - the level of transparency.paintTransparent - the transparent flag.PaintFormatpublic int getFontSize()
Preview
getFontSize in interface PreviewFontFormatpublic int getFontWeight()
Preview
getFontWeight in interface PreviewFontFormatpublic java.lang.String getFontFamily()
Preview
getFontFamily in interface PreviewFontFormatpublic int getFontColor()
Preview
getFontColor in interface PreviewFontFormatpublic boolean getFontItalic()
Preview
getFontItalic in interface PreviewFontFormatpublic boolean getFontUnderline()
Preview
getFontUnderline in interface PreviewFontFormatpublic boolean getFontStrikethrough()
Preview
getFontStrikethrough in interface PreviewFontFormat
public void setFontFormat(int fontSize,
int fontWeight,
java.lang.String fontFamily,
int fontColor,
boolean fontItalic,
boolean fontUnderline,
boolean fontStrikethrough,
StrokeFormat underlineStroke,
StrokeFormat strikethroughStroke)
Preview
setFontFormat in interface PreviewfontSize - the size as int.fontWeight - the weight as int.fontFamily - the name of the font family as String.fontColor - the color as rgb int.fontItalic - the flag that indicates italic.fontUnderline - the flag that indicates underline.fontStrikethrough - the flag that indicates strikethrough.FontFormatpublic int getMarkerType()
public int getMarkerSize()
public void setMarkerFormat(int type,
int size,
int paintStyle,
int paintColorback,
int paintColorfore,
int paintGradientType,
int paintPatternType,
java.lang.String textureKey,
int paintTransparency,
boolean paintTransparent,
int strokeStyle,
int strokeWeight,
int strokeColor)
type - Type of the marker.size - its size.paintStyle - style for the paint.paintColorback - background color.paintColorfore - foreground color.paintGradientType - gradient type, if style is set properly.paintPatternType - pattern type, if style is set properly.textureKey - The texture raster key or PaintFormat.TEXTURE_NONEpaintTransparency - transparency level.paintTransparent - flag to indicate transparency.strokeStyle - style of the stroke.strokeWeight - weight of the stroke.strokeColor - color of the stroke.public java.awt.Dimension getPreferredSize()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||