|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JLabel | +--net.aerith.misao.gui.ChartComponent
The ChartComponent
represents a GUI component to show
a star chart.
Inner Class Summary | |
protected class |
ChartComponent.SaveAsListener
The SaveAsListener is a listener class of menu
selection to save the report in the specified catalog. |
protected class |
ChartComponent.SaveListener
The SaveListener is a listener class of menu
selection to save the report in a file. |
Inner classes inherited from class javax.swing.JLabel |
javax.swing.JLabel.AccessibleJLabel |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent,
javax.swing.JComponent.IntVector,
javax.swing.JComponent.KeyboardBinding,
javax.swing.JComponent.KeyboardState |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AWTTreeLock |
Field Summary | |
protected boolean |
basepoint_at_center
True if the (0,0) represents the center of the chart. |
protected PlotProperty |
default_property
The default properties to plot stars. |
protected int |
folding_characters
The number of characters to fold the star data in the dialog. |
protected StarPositionList |
list
The list of stars to plot. |
protected java.awt.Image |
offscreen
The off screen image. |
protected java.awt.Container |
pane
The pane of this component. |
protected java.util.Hashtable |
plot_properties
The properties to plot stars. |
protected javax.swing.JPopupMenu |
popup
The popup menu. |
protected Size |
size
The size of chart. |
protected StarClickListener |
star_click_listener
The listener of star click event. |
Fields inherited from class javax.swing.JLabel |
defaultIcon,
disabledIcon,
disabledIconSet,
horizontalAlignment,
horizontalTextPosition,
iconTextGap,
LABELED_BY_PROPERTY,
labelFor,
mnemonic,
text,
uiClassID,
verticalAlignment,
verticalTextPosition |
Fields inherited from class javax.swing.JComponent |
_bounds,
accessibleContext,
alignmentX,
alignmentY,
ANCESTOR_USING_BUFFER,
ancestorNotifier,
autoscroller,
border,
changeSupport,
clientProperties,
flags,
HAS_FOCUS,
IS_DOUBLE_BUFFERED,
IS_OPAQUE,
IS_PAINTING_TILE,
KEYBOARD_BINDINGS_KEY,
listenerList,
maximumSize,
minimumSize,
NEXT_FOCUS,
paintImmediatelyClip,
paintingChild,
preferredSize,
readObjectCallbacks,
REQUEST_FOCUS_DISABLED,
tmpRect,
TOOL_TIP_TEXT_KEY,
ui,
uiClassID,
UNDEFINED_CONDITION,
vetoableChangeSupport,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Container |
component,
containerListener,
containerSerializedDataVersion,
dispatcher,
layoutMgr,
maxSize,
ncomponents,
serialVersionUID |
Fields inherited from class java.awt.Component |
actionListenerK,
adjustmentListenerK,
appContext,
assert,
background,
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
changeSupport,
componentListener,
componentListenerK,
componentOrientation,
componentSerializedDataVersion,
containerListenerK,
cursor,
dropTarget,
enabled,
eventMask,
focusListener,
focusListenerK,
font,
foreground,
hasFocus,
height,
incRate,
inputMethodListener,
inputMethodListenerK,
isInc,
isPacked,
itemListenerK,
keyListener,
keyListenerK,
LEFT_ALIGNMENT,
locale,
LOCK,
minSize,
mouseListener,
mouseListenerK,
mouseMotionListener,
mouseMotionListenerK,
name,
nameExplicitlySet,
newEventsOnly,
ownedWindowK,
parent,
peer,
peerFont,
popups,
prefSize,
RIGHT_ALIGNMENT,
serialVersionUID,
textListenerK,
TOP_ALIGNMENT,
valid,
visible,
width,
windowListenerK,
x,
y |
Constructor Summary | |
ChartComponent(Size initial_size)
Constructs an empty ChartComponent . |
Method Summary | |
void |
draw(java.awt.Graphics g)
Plots stars in the list on the off screen. |
java.awt.Dimension |
getPreferredSize()
Gets the preferred size, considering the zoom level. |
protected PlotProperty |
getProperty(StarPosition star)
Gets the property of the specified star. |
protected void |
initPopupMenu()
Initializes a popup menu. |
void |
paint(java.awt.Graphics g)
Updates the view. |
protected void |
processMouseEvent(java.awt.event.MouseEvent e)
Invoked when mouse event occurs. |
void |
propertyChanged()
Applies the property change. |
void |
setBasepointAtCenter()
Sets a flag so that (0,0) represents the center of the chart. |
void |
setBasepointAtTopLeft()
Sets a flag so that (0,0) represents the top left corner. |
void |
setDefaultProperty(PlotProperty property)
Sets the default property. |
void |
setProperty(java.lang.String catalog_name,
PlotProperty property)
Sets the property to plot stars of the specified catalog. |
void |
setSize(Size new_size)
Sets the new size. |
void |
setStarClickListener(StarClickListener listener)
Sets the listener of star click event. |
void |
setStarPositionList(StarPositionList new_list)
Sets the new list of stars. |
void |
update(java.awt.Graphics g)
Updates the view. |
Methods inherited from class javax.swing.JLabel |
checkHorizontalKey,
checkVerticalKey,
getAccessibleContext,
getDisabledIcon,
getDisplayedMnemonic,
getHorizontalAlignment,
getHorizontalTextPosition,
getIcon,
getIconTextGap,
getLabelFor,
getText,
getUI,
getUIClassID,
getVerticalAlignment,
getVerticalTextPosition,
paramString,
setDisabledIcon,
setDisplayedMnemonic,
setDisplayedMnemonic,
setHorizontalAlignment,
setHorizontalTextPosition,
setIcon,
setIconTextGap,
setLabelFor,
setText,
setUI,
setVerticalAlignment,
setVerticalTextPosition,
updateUI,
writeObject |
Methods inherited from class javax.swing.JComponent |
_paintImmediately,
|
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
applyOrientation,
countComponents,
deliverEvent,
dispatchEventImpl,
dispatchEventToSelf,
doLayout,
eventEnabled,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents_NoClientCode,
getComponents,
getCursorTarget,
getLayout,
getMouseEventTarget,
getWindow,
initIDs,
insets,
invalidate,
invalidateTree,
isAncestorOf,
layout,
lightweightPrint,
list,
list,
locate,
minimumSize,
nextFocus,
paintComponents,
postProcessKeyEvent,
postsOldMouseEvents,
preferredSize,
preProcessKeyEvent,
print,
printComponents,
printOneComponent,
processContainerEvent,
processEvent,
proxyEnableEvents,
proxyRequestFocus,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setFocusOwner,
setLayout,
transferFocus,
updateCursor,
validate,
validateTree |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
areInputMethodsEnabled,
bounds,
checkImage,
checkImage,
coalesceEvents,
constructComponentName,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
getBackground,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont_NoClientCode,
getFont,
getFontMetrics,
getForeground,
getInputContext,
getInputMethodRequests,
getIntrinsicCursor,
getLocale,
getLocation,
getLocationOnScreen,
getName,
getNativeContainer,
getParent_NoClientCode,
getParent,
getPeer,
getSize,
getToolkit,
getToolkitImpl,
getTreeLock,
getWindowForObject,
gotFocus,
handleEvent,
hide,
imageUpdate,
inside,
isDisplayable,
isEnabled,
isEnabledImpl,
isLightweight,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
printAll,
processComponentEvent,
processInputMethodEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
repaint,
repaint,
repaint,
resize,
resize,
setBounds,
setBounds,
setComponentOrientation,
setDropTarget,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
Field Detail |
protected java.awt.Container pane
protected java.awt.Image offscreen
protected StarPositionList list
protected Size size
protected java.util.Hashtable plot_properties
protected PlotProperty default_property
protected javax.swing.JPopupMenu popup
protected boolean basepoint_at_center
protected int folding_characters
protected StarClickListener star_click_listener
Constructor Detail |
public ChartComponent(Size initial_size)
ChartComponent
.size
- the size of chart.Method Detail |
protected void initPopupMenu()
public void setBasepointAtCenter()
public void setBasepointAtTopLeft()
public void setDefaultProperty(PlotProperty property)
property
- the default property.public void setProperty(java.lang.String catalog_name, PlotProperty property)
catalog_name
- the name of catalog.property
- the property.public void setSize(Size new_size)
new_size
- the new size of the chart.public void setStarPositionList(StarPositionList new_list)
new_list
- the new list of stars.protected PlotProperty getProperty(StarPosition star)
star
- the star position object.public java.awt.Dimension getPreferredSize()
public void setStarClickListener(StarClickListener listener)
listener
- the listener.protected void processMouseEvent(java.awt.event.MouseEvent e)
e
- contains the click position.public void propertyChanged()
public void paint(java.awt.Graphics g)
g
- the Graphics
to update.public void update(java.awt.Graphics g)
g
- the Graphics
to update.public void draw(java.awt.Graphics g)
g
- the Graphics
to draw.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |