|
||||||||||
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
at.tuwien.ifs.somtoolbox.apps.viewer.controls.PaletteDisplayer
public class PaletteDisplayer
Component to display a Palette.
Nice-to-have features:
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
private boolean |
autoOrientation
|
private Font |
font
|
private double |
maxValue
|
private static int |
MIN_PALETTE_WIDTH
|
private double |
minValue
|
private int |
orientation
|
private Palette |
palette
|
private static long |
serialVersionUID
|
private boolean |
showPercent
|
private boolean |
showScale
|
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 | |
---|---|
PaletteDisplayer()
Create a new PaletteDisplayer. |
|
PaletteDisplayer(Palette palette)
Create a new PaletteDisplayer, displaying the given Palette. |
Method Summary | |
---|---|
Font |
getFont()
Returns the font used for the scale. |
Dimension |
getMinimumSize()
|
int |
getOrientation()
Returns the components orientation. |
Palette |
getPalette()
Get the palette that is displayed. |
Dimension |
getPreferredSize()
|
boolean |
getShowPercent()
|
boolean |
isAutoOrientation()
Returns wheter the Components orientation is automatically adjusted. |
boolean |
isShowScale()
Determines whether a scale is shown or not. |
protected void |
paintComponent(Graphics g)
|
void |
setAutoOrientation(boolean autoOrientation)
Sets wheter the components orientation should be automatically adjusted. |
void |
setFont(Font font)
Sets the Font used for the scale. |
void |
setOrientation(int orientation)
Set the Orientation. |
void |
setPalette(Palette palette)
Set the palette to display. |
void |
setRange(double minValue,
double maxValue)
|
void |
setShowPercent(boolean showPercent)
|
void |
setShowScale(boolean showScale)
Set to |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private static final int MIN_PALETTE_WIDTH
private Palette palette
private boolean showScale
private boolean autoOrientation
private int orientation
private Font font
private boolean showPercent
private double minValue
private double maxValue
Constructor Detail |
---|
public PaletteDisplayer()
public PaletteDisplayer(Palette palette)
palette
- the Palette to display.Method Detail |
---|
public boolean getShowPercent()
public void setShowPercent(boolean showPercent)
protected void paintComponent(Graphics g)
paintComponent
in class JComponent
public boolean isAutoOrientation()
public void setAutoOrientation(boolean autoOrientation)
autoOrientation
- The autoOrientation to set.public Font getFont()
getFont
in interface MenuContainer
getFont
in class Component
public void setFont(Font font)
setFont
in class JComponent
font
- The font to set.public int getOrientation()
SwingConstants.HORIZONTAL
getOrientation()
public void setOrientation(int orientation)
SwingConstants.HORIZONTAL
or SwingConstants.VERTICAL
orientation
- The orientation to set.SwingConstants
public Palette getPalette()
public void setPalette(Palette palette)
palette
- The palette to set.public boolean isShowScale()
public void setShowScale(boolean showScale)
showScale
- The showScale to set.public Dimension getMinimumSize()
getMinimumSize
in class JComponent
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
public void setRange(double minValue, double maxValue)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |