Swing/DisableOnBoundaryValues のバックアップの現在との差分(No.3)
- category: swing folder: DisableOnBoundaryValues title: JSpinnerの値が境界値になった場合、ArrowButtonを無効にする tags: [JSpinner, ArrowButton, LookAndFeel, UIManager] author: aterai pubdate: 2018-06-25T16:59:19+09:00 description: JSpinnerの値が上限または下限になった場合、対応するArrowButtonを無効にしてクリック不可にします。 image: https://drive.google.com/uc?id=17ihoEGjXqC5qVXXM1yWqjYO93QjilZQHRw
概要
JSpinner
の値が上限または下限になった場合、対応するArrowButton
を無効にしてクリック不可にします。
Screenshot
Advertisement
サンプルコード
解説
UIManager.put("Spinner.disableOnBoundaryValues", Boolean.FALSE)
- 境界値になっても
ArrowButton
はクリック可能だが、値は変更されない - 境界値になっても
ArrowButton
はクリック可能だが値は変更されない MetalLookAndFeel
、NimbusLookAndFeel
、WindowsLookAndFeel
などでのデフォルト
- 境界値になっても
UIManager.put("Spinner.disableOnBoundaryValues", Boolean.TRUE)
- 境界値になると
ArrowButton
は無効になり、クリック不可で値は変更されない - 境界値になると
ArrowButton
は無効になりクリック不可で値は変更されない GTKLookAndFeel
でのデフォルト-
MetalLookAndFeel
の場合のみ?、起動中に切替可能 -
MetalLookAndFeel
の場合のみ?起動中に切替可能
- 境界値になると