ReverseLongModel.java
     1: //========================================================================================
     2: //  ReverseLongModel.java
     3: //    en:Reverse long model -- It is a modified SpinnerNumberModel that has a Long value and reversely spins.
     4: //    ja:リバースロングモデル -- SpinnerNumberModelの値をLongにして回転方向を逆にしたスピナーモデルです。
     5: //  Copyright (C) 2003-2019 Makoto Kamada
     6: //
     7: //  This file is part of the XEiJ (X68000 Emulator in Java).
     8: //  You can use, modify and redistribute the XEiJ if the conditions are met.
     9: //  Read the XEiJ License for more details.
    10: //  https://stdkmd.net/xeij/
    11: //========================================================================================
    12: 
    13: package xeij;
    14: 
    15: import java.lang.*;  //Boolean,Character,Class,Comparable,Double,Exception,Float,IllegalArgumentException,Integer,Long,Math,Number,Object,Runnable,SecurityException,String,StringBuilder,System
    16: import javax.swing.*;  //AbstractSpinnerModel,Box,ButtonGroup,DefaultListModel,ImageIcon,JApplet,JButton,JCheckBox,JCheckBoxMenuItem,JDialog,JFileChooser,JFrame,JLabel,JList,JMenu,JMenuBar,JMenuItem,JPanel,JRadioButton,JScrollPane,JSpinner,JTextArea,JTextField,JTextPane,JViewport,ScrollPaneConstants,SpinnerListModel,SpinnerNumberModel,SwingConstants,SwingUtilities,UIManager,UIDefaults,UnsupportedLookAndFeelException
    17: 
    18: public class ReverseLongModel extends SpinnerNumberModel {
    19:   public ReverseLongModel (long value, long minimum, long maximum, long stepSize) {
    20:     super (Long.valueOf (value), Long.valueOf (minimum), Long.valueOf (maximum), Long.valueOf (stepSize));
    21:   }
    22:   @Override public Object getNextValue () {
    23:     return super.getPreviousValue ();
    24:   }
    25:   @Override public Object getPreviousValue () {
    26:     return super.getNextValue ();
    27:   }
    28: }  //class ReverseLongModel
    29: 
    30: 
    31: