public class YearMonthDialog
extends javax.swing.JPanel
YearMonthDialogクラスは、年月入力を支援するダイアログを提供します。 * オブジェクトを生成するとモーダルなカレンダーダイアログを表示します。 dialog.showDialog()でカレンダーダイアログをOpenします。 返り値はAPPROVE_OPTION,CANCEL_OPTION,ERROR_OPTIONの3通りで APPROVE_OPTION 年月が入力された(OKボタンを押された、ダブルクリックされた) CANCEL_OPTION キャンセルボタンが押された、日付を選択されずにウィンドウが閉じられた ERROR_OPTION エラーになった。(上記のいずれも実行されていない状態) ダイアログの操作方法は下記の通りです。 ・年月を決定する - 「OK」ボタンを押下する - EnterキーをかSPACEキー押下する - 日付をダブルクリックする ・年月入力をキャンセルする - 「キャンセル」ボタンを押下する - Escキーを押下する - ダイアログを閉じる - ダイアログがフォーカスを失う ・年月を移動する - マウスで日付をクリックする - カーソルキーを押下する ・前年・翌年に移動する - 「<<」「>>」ボタンを押下する ・本日へ移動する - 「■」ボタンを押下する - Homeキーを押下する
| 修飾子とタイプ | フィールドと説明 |
|---|---|
static int |
APPROVE_OPTION
イエスやOKが押されたとき
|
static int |
CANCEL_OPTION
キャンセルを押したときの返り値
|
static int |
ERROR_OPTION
エラーが起きたとき
|
static int |
POINT_ON_LEFT_BOTTOM
表示位置のベースポジション区分
|
static int |
POINT_ON_LEFT_TOP
表示位置のベースポジション区分
|
static int |
POINT_ON_RIGHT_BOTTOM
表示位置のベースポジション区分
|
static int |
POINT_ON_RIGHT_TOP
表示位置のベースポジション区分
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| コンストラクタと説明 |
|---|
YearMonthDialog()
コンストラクタ
|
YearMonthDialog(YearMonth ym)
コンストラクタ
|
YearMonthDialog(YearMonth ym,
java.lang.String title)
コンストラクタ
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
YearMonth |
getSelectedYearMonth()
ダイアログ上で選択された年月を返す
|
int |
showDialog(java.awt.Component parent)
ダイアログを表示する
表示の契機となるアイコンやボタン等のオブジェクトのそばに表示される
|
int |
showDialog(java.awt.Component parent,
int pointOn)
ダイアログを表示する
表示の契機となるアイコンやボタン等のオブジェクトのそばに表示される
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, 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, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, 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, 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, transferFocusBackward, transferFocusUpCyclepublic static final int POINT_ON_LEFT_TOP
public static final int POINT_ON_LEFT_BOTTOM
public static final int POINT_ON_RIGHT_TOP
public static final int POINT_ON_RIGHT_BOTTOM
public static final int CANCEL_OPTION
public static final int APPROVE_OPTION
public static final int ERROR_OPTION
public YearMonthDialog()
public YearMonthDialog(YearMonth ym)
ym - 初期表示時の年月public YearMonthDialog(YearMonth ym, java.lang.String title)
ym - 初期表示で選択される年月public YearMonth getSelectedYearMonth()
public int showDialog(java.awt.Component parent)
parent - 表示元の親コンポーネント。表示元となるアイコンやボタンのオブジェクトを指定すること。public int showDialog(java.awt.Component parent, int pointOn)
parent - 表示元の親コンポーネント。表示元となるアイコンやボタンのオブジェクトを指定すること。pointOn - ダイアログの四隅のどこを表示元にあわせて表示するかの指定。