to.tetramorph.starbase
クラス TimePlacePanel

java.lang.Object
  上位を拡張 java.awt.Component
      上位を拡張 java.awt.Container
          上位を拡張 javax.swing.JComponent
              上位を拡張 javax.swing.JPanel
                  上位を拡張 to.tetramorph.starbase.TimePlacePanel
すべての実装されたインタフェース:
ImageObserver, MenuContainer, Serializable, Accessible

public class TimePlacePanel
extends JPanel

時と場所を入力するためのパネル。 このクラスはpublicである必要はないのだが、publicにしておかないとGUIエディタで 編集することができない。このクラス自身は問題ないのだが、このクラスを使用してい るTimePanel3でエラーが発生する。

関連項目:
直列化された形式

入れ子のクラスの概要
 
クラス javax.swing.JPanel から継承された入れ子のクラス/インタフェース
JPanel.AccessibleJPanel
 
クラス javax.swing.JComponent から継承された入れ子のクラス/インタフェース
JComponent.AccessibleJComponent
 
クラス java.awt.Container から継承された入れ子のクラス/インタフェース
Container.AccessibleAWTContainer
 
クラス java.awt.Component から継承された入れ子のクラス/インタフェース
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
フィールドの概要
 
クラス javax.swing.JComponent から継承されたフィールド
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
クラス java.awt.Component から継承されたフィールド
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
インタフェース java.awt.image.ImageObserver から継承されたフィールド
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
コンストラクタの概要
TimePlacePanel()
          Creates new form TimePlacePanel
 
メソッドの概要
 GregorianCalendar addCalendar(int day, int hour, int minute, int second)
          時間を加算する。
 void addKeyListener(KeyListener l)
          このパネル内のボタンとフィールドすべてにキーリスナを登録する。
 GregorianCalendar getCalendar()
          パネル内の日付と日時とタイムゾーンからをGregorianCalendarを作成して返す。
 Date getDate()
          フォームの日付情報を取得する。
 String getERA()
          日付が紀元前か紀元後かを返す。
 Double getLatitude()
          緯度フィールドの値を返す。
 Double getLongitude()
          経度フィールドの値を返す。
 String getPlaceName()
          地名フィールドの値を返す。
 Time getTime()
          時刻フィールドの値を返す。
 TimePlace getTimePlace(TimePlace tp)
          入力フィールドの値を引数tpに書き込み、tpの参照を返す。
 TimeZone getTimeZone()
          タイムゾーンフィールドの値を返す。
 void setCalendar(GregorianCalendar cal)
          カレンダーオブジェクトの値をセットする。
 void setDate(GregorianCalendar gcal)
          日付(ERA・年・月・日)をセットする。
 void setDefault()
          デフォルトの観測地、タイムゾーンと、現在の日時でフィールドを満たす。
 void setEnabled(boolean b)
          このパネルのEnabled状態をセットする。
 void setLatitude(Double value)
          緯度フィールドに値をセットする
 void setLongitude(Double value)
          経度フィールドに値をセットする。
 void setPlace(Place p)
          場所をセットする
 void setPlaceName(String placeName)
          地名フィールドに値をセットする。
 void setTime(GregorianCalendar gcal)
          カレンダーオブジェクトで時間フィールドをセットする。
 void setTime(Time time)
          時刻フィールドに時刻をセット
 void setTimePlace(TimePlace tp)
          occに含まれる日付、時間、地名、緯度、経度、タイムゾーンを各フィールドにセットする。
 void setTimeZone(TimeZone tz)
          タイムゾーンフィールドに値をセットする。
 
クラス javax.swing.JPanel から継承されたメソッド
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
クラス javax.swing.JComponent から継承されたメソッド
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
クラス java.awt.Container から継承されたメソッド
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
クラス java.awt.Component から継承されたメソッド
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

TimePlacePanel

public TimePlacePanel()
Creates new form TimePlacePanel

メソッドの詳細

setCalendar

public void setCalendar(GregorianCalendar cal)
カレンダーオブジェクトの値をセットする。 日付フィールド、時刻フィールド、タイムゾーンフィールドを一括でセット。

パラメータ:
cal - カレンダーオブジェクトによる日付

getCalendar

public GregorianCalendar getCalendar()
パネル内の日付と日時とタイムゾーンからをGregorianCalendarを作成して返す。 日付フィールドが空の場合はnullを返す。 時刻フィールドがnullの場合はDefaultTimeプロパティから返す。 DefaultTimeが未設定の場合はIllegalStateExcepitonを出す。


setDate

public void setDate(GregorianCalendar gcal)
日付(ERA・年・月・日)をセットする。

パラメータ:
gcal - カレンダーオブジェクト

getDate

public Date getDate()
フォームの日付情報を取得する。


getERA

public String getERA()
日付が紀元前か紀元後かを返す。

戻り値:
紀元前なら"BC"、紀元後なら"AD"

setTime

public void setTime(Time time)
時刻フィールドに時刻をセット

パラメータ:
time - 時刻

setTime

public void setTime(GregorianCalendar gcal)
カレンダーオブジェクトで時間フィールドをセットする。


getTime

public Time getTime()
時刻フィールドの値を返す。


getLongitude

public Double getLongitude()
経度フィールドの値を返す。


setLongitude

public void setLongitude(Double value)
経度フィールドに値をセットする。


getLatitude

public Double getLatitude()
緯度フィールドの値を返す。


setLatitude

public void setLatitude(Double value)
緯度フィールドに値をセットする


getTimeZone

public TimeZone getTimeZone()
タイムゾーンフィールドの値を返す。


setTimeZone

public void setTimeZone(TimeZone tz)
タイムゾーンフィールドに値をセットする。


getPlaceName

public String getPlaceName()
地名フィールドの値を返す。


setPlaceName

public void setPlaceName(String placeName)
地名フィールドに値をセットする。


setPlace

public void setPlace(Place p)
場所をセットする


setTimePlace

public void setTimePlace(TimePlace tp)
occに含まれる日付、時間、地名、緯度、経度、タイムゾーンを各フィールドにセットする。


getTimePlace

public TimePlace getTimePlace(TimePlace tp)
入力フィールドの値を引数tpに書き込み、tpの参照を返す。 tpがnullのときは内部で新しくインスタンスが作成されそれに書き込まれその参照を返す。


addKeyListener

public void addKeyListener(KeyListener l)
このパネル内のボタンとフィールドすべてにキーリスナを登録する。 ESCキーなどでダイアログを閉じたり、その他のキーイベントハンドラを すべてのフォーカスを受け取る部品にセットする。

オーバーライド:
クラス Component 内の addKeyListener

setDefault

public void setDefault()
デフォルトの観測地、タイムゾーンと、現在の日時でフィールドを満たす。 デフォルトの観測地が設定されていない場合はConst.DEFAULT_PLACEの値が採用 される。

例外:
IllegalStateException - デフォルト観測地プロパティ(DefaultTransitPlace)が未定義の場合。

addCalendar

public GregorianCalendar addCalendar(int day,
                                     int hour,
                                     int minute,
                                     int second)
時間を加算する。 各引数の値に負数を指定すると減算も行われる。

戻り値:
加算後のカレンダーオブジェクト

setEnabled

public void setEnabled(boolean b)
このパネルのEnabled状態をセットする。

オーバーライド:
クラス JComponent 内の setEnabled
パラメータ:
b - falseなら入力フィールドやボタンがすべてDisenabledになり入力不可 となる。trueならすべてenabledになり入力可能になる。