Ignore:
Timestamp:
2011-06-08T19:37:13+02:00 (13 years ago)
Author:
malcolmh
Message:

save

Location:
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels
Files:
1 added
12 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelChan.java

    r26096 r26110  
    3131        public PanelSaw panelSaw = null;
    3232        private ButtonGroup catButtons = new ButtonGroup();
    33         public JRadioButton portButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PortButton.png")));
    34         public JRadioButton stbdButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/StbdButton.png")));
    35         public JRadioButton prefPortButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PrefPortButton.png")));
    36         public JRadioButton prefStbdButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PrefStbdButton.png")));
    37         public JRadioButton safeWaterButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SafeWaterButton.png")));
     33        public JRadioButton portButton = new JRadioButton(new ImageIcon(getClass()
     34                        .getResource("/images/PortButton.png")));
     35        public JRadioButton stbdButton = new JRadioButton(new ImageIcon(getClass()
     36                        .getResource("/images/StbdButton.png")));
     37        public JRadioButton prefPortButton = new JRadioButton(new ImageIcon(
     38                        getClass().getResource("/images/PrefPortButton.png")));
     39        public JRadioButton prefStbdButton = new JRadioButton(new ImageIcon(
     40                        getClass().getResource("/images/PrefStbdButton.png")));
     41        public JRadioButton safeWaterButton = new JRadioButton(new ImageIcon(
     42                        getClass().getResource("/images/SafeWaterButton.png")));
    3843        private ActionListener alCat = new ActionListener() {
    3944                public void actionPerformed(java.awt.event.ActionEvent e) {
     
    220225        }
    221226
    222         private JRadioButton getCatButton(JRadioButton button, int x, int y, int w, int h, String tip) {
     227        private JRadioButton getCatButton(JRadioButton button, int x, int y, int w,
     228                        int h, String tip) {
    223229                button.setBounds(new Rectangle(x, y, w, h));
    224230                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelChr.java

    r26096 r26110  
    2323import oseam.seamarks.SeaMark;
    2424
    25 public class PanelChr    extends JPanel {
    26 //System.out.println(map);
     25public class PanelChr extends JPanel {
     26        // System.out.println(map);
    2727
    2828        private OSeaMAction dlg;
    2929        public JLabel charLabel = new JLabel();
    3030        public JTextField charBox = new JTextField();
    31         public JToggleButton noneButton = new JToggleButton(new ImageIcon(getClass().getResource("/images/NoCharButton.png")));
    32         public JToggleButton fixedButton = new JToggleButton(new ImageIcon(getClass().getResource("/images/FixedButton.png")));
    33         public JToggleButton flashButton = new JToggleButton(new ImageIcon(getClass().getResource("/images/FlashButton.png")));
    34         public JToggleButton longFlashButton = new JToggleButton(new ImageIcon(getClass().getResource("/images/LongFlashButton.png")));
    35         public JToggleButton quickButton = new JToggleButton(new ImageIcon(getClass().getResource("/images/QuickButton.png")));
    36         public JToggleButton veryQuickButton = new JToggleButton(new ImageIcon(getClass().getResource("/images/VeryQuickButton.png")));
    37         public JToggleButton ultraQuickButton = new JToggleButton(new ImageIcon(getClass().getResource("/images/UltraQuickButton.png")));
    38         public JToggleButton interruptedQuickButton = new JToggleButton(new ImageIcon(getClass().getResource("/images/InterruptedQuickButton.png")));
    39         public JToggleButton interruptedVeryQuickButton = new JToggleButton(new ImageIcon(getClass().getResource("/images/InterruptedVeryQuickButton.png")));
    40         public JToggleButton interruptedUltraQuickButton = new JToggleButton(new ImageIcon(getClass().getResource("/images/InterruptedUltraQuickButton.png")));
    41         public JToggleButton isophasedButton = new JToggleButton(new ImageIcon(getClass().getResource("/images/IsophasedButton.png")));
    42         public JToggleButton occultingButton = new JToggleButton(new ImageIcon(getClass().getResource("/images/OccultingButton.png")));
    43         public JToggleButton morseButton = new JToggleButton(new ImageIcon(getClass().getResource("/images/MorseButton.png")));
    44         public JToggleButton alternatingButton = new JToggleButton(new ImageIcon(getClass().getResource("/images/AlternatingButton.png")));
    45         private EnumMap<Chr, JToggleButton> buttons = new EnumMap<Chr, JToggleButton>(Chr.class);
     31        public JToggleButton noneButton = new JToggleButton(new ImageIcon(getClass()
     32                        .getResource("/images/NoCharButton.png")));
     33        public JToggleButton fixedButton = new JToggleButton(new ImageIcon(getClass()
     34                        .getResource("/images/FixedButton.png")));
     35        public JToggleButton flashButton = new JToggleButton(new ImageIcon(getClass()
     36                        .getResource("/images/FlashButton.png")));
     37        public JToggleButton longFlashButton = new JToggleButton(new ImageIcon(
     38                        getClass().getResource("/images/LongFlashButton.png")));
     39        public JToggleButton quickButton = new JToggleButton(new ImageIcon(getClass()
     40                        .getResource("/images/QuickButton.png")));
     41        public JToggleButton veryQuickButton = new JToggleButton(new ImageIcon(
     42                        getClass().getResource("/images/VeryQuickButton.png")));
     43        public JToggleButton ultraQuickButton = new JToggleButton(new ImageIcon(
     44                        getClass().getResource("/images/UltraQuickButton.png")));
     45        public JToggleButton interruptedQuickButton = new JToggleButton(
     46                        new ImageIcon(getClass()
     47                                        .getResource("/images/InterruptedQuickButton.png")));
     48        public JToggleButton interruptedVeryQuickButton = new JToggleButton(
     49                        new ImageIcon(getClass().getResource(
     50                                        "/images/InterruptedVeryQuickButton.png")));
     51        public JToggleButton interruptedUltraQuickButton = new JToggleButton(
     52                        new ImageIcon(getClass().getResource(
     53                                        "/images/InterruptedUltraQuickButton.png")));
     54        public JToggleButton isophasedButton = new JToggleButton(new ImageIcon(
     55                        getClass().getResource("/images/IsophasedButton.png")));
     56        public JToggleButton occultingButton = new JToggleButton(new ImageIcon(
     57                        getClass().getResource("/images/OccultingButton.png")));
     58        public JToggleButton morseButton = new JToggleButton(new ImageIcon(getClass()
     59                        .getResource("/images/MorseButton.png")));
     60        public JToggleButton alternatingButton = new JToggleButton(new ImageIcon(
     61                        getClass().getResource("/images/AlternatingButton.png")));
     62        private EnumMap<Chr, JToggleButton> buttons = new EnumMap<Chr, JToggleButton>(
     63                        Chr.class);
    4664        private ActionListener alCharButton = new ActionListener() {
    4765                public void actionPerformed(java.awt.event.ActionEvent e) {
    48                         JToggleButton source = (JToggleButton)e.getSource();
     66                        JToggleButton source = (JToggleButton) e.getSource();
    4967                        EnumSet<Chr> combo = EnumSet.noneOf(Chr.class);
    5068                        for (Chr chr : buttons.keySet()) {
     
    101119                dlg = dia;
    102120                this.setLayout(null);
    103                 this.add(getChrButton(noneButton, 0, 0, 44, 16, Messages.getString("NoChar"), Chr.UNKNOWN), null);
    104                 this.add(getChrButton(fixedButton, 0, 16, 44, 16, Messages.getString("FChar"), Chr.FIXED), null);
    105                 this.add(getChrButton(flashButton, 0, 32, 44, 16, Messages.getString("FlChar"), Chr.FLASH), null);
    106                 this.add(getChrButton(longFlashButton, 0, 48, 44, 16, Messages.getString("LFlChar"), Chr.LONGFLASH), null);
    107                 this.add(getChrButton(quickButton, 0, 64, 44, 16, Messages.getString("QChar"), Chr.QUICK), null);
    108                 this.add(getChrButton(veryQuickButton, 0, 80, 44, 16, Messages.getString("VQChar"), Chr.VERYQUICK), null);
    109                 this.add(getChrButton(ultraQuickButton, 0, 96, 44, 16, Messages.getString("UQChar"), Chr.ULTRAQUICK), null);
    110                 this.add(getChrButton(alternatingButton, 44, 0, 44, 16, Messages.getString("AlChar"), Chr.ALTERNATING), null);
    111                 this.add(getChrButton(isophasedButton, 44, 16, 44, 16, Messages.getString("IsoChar"), Chr.ISOPHASED), null);
    112                 this.add(getChrButton(occultingButton, 44, 32, 44, 16, Messages.getString("OcChar"), Chr.OCCULTING), null);
    113                 this.add(getChrButton(morseButton, 44, 48, 44, 16, Messages.getString("MoChar"), Chr.MORSE), null);
    114                 this.add(getChrButton(interruptedQuickButton, 44, 64, 44, 16, Messages.getString("IQChar"), Chr.INTERRUPTEDQUICK), null);
    115                 this.add(getChrButton(interruptedVeryQuickButton, 44, 80, 44, 16, Messages.getString("IVQChar"), Chr.INTERRUPTEDVERYQUICK), null);
    116                 this.add(getChrButton(interruptedUltraQuickButton, 44, 96, 44, 16, Messages.getString("IUQChar"), Chr.INTERRUPTEDULTRAQUICK), null);
     121                this.add(
     122                                getChrButton(noneButton, 0, 0, 44, 16, Messages.getString("NoChar"),
     123                                                Chr.UNKNOWN), null);
     124                this.add(
     125                                getChrButton(fixedButton, 0, 16, 44, 16, Messages.getString("FChar"),
     126                                                Chr.FIXED), null);
     127                this.add(
     128                                getChrButton(flashButton, 0, 32, 44, 16, Messages.getString("FlChar"),
     129                                                Chr.FLASH), null);
     130                this.add(
     131                                getChrButton(longFlashButton, 0, 48, 44, 16,
     132                                                Messages.getString("LFlChar"), Chr.LONGFLASH), null);
     133                this.add(
     134                                getChrButton(quickButton, 0, 64, 44, 16, Messages.getString("QChar"),
     135                                                Chr.QUICK), null);
     136                this.add(
     137                                getChrButton(veryQuickButton, 0, 80, 44, 16,
     138                                                Messages.getString("VQChar"), Chr.VERYQUICK), null);
     139                this.add(
     140                                getChrButton(ultraQuickButton, 0, 96, 44, 16,
     141                                                Messages.getString("UQChar"), Chr.ULTRAQUICK), null);
     142                this.add(
     143                                getChrButton(alternatingButton, 44, 0, 44, 16,
     144                                                Messages.getString("AlChar"), Chr.ALTERNATING), null);
     145                this.add(
     146                                getChrButton(isophasedButton, 44, 16, 44, 16,
     147                                                Messages.getString("IsoChar"), Chr.ISOPHASED), null);
     148                this.add(
     149                                getChrButton(occultingButton, 44, 32, 44, 16,
     150                                                Messages.getString("OcChar"), Chr.OCCULTING), null);
     151                this.add(
     152                                getChrButton(morseButton, 44, 48, 44, 16, Messages.getString("MoChar"),
     153                                                Chr.MORSE), null);
     154                this.add(
     155                                getChrButton(interruptedQuickButton, 44, 64, 44, 16,
     156                                                Messages.getString("IQChar"), Chr.INTERRUPTEDQUICK), null);
     157                this.add(
     158                                getChrButton(interruptedVeryQuickButton, 44, 80, 44, 16,
     159                                                Messages.getString("IVQChar"), Chr.INTERRUPTEDVERYQUICK), null);
     160                this.add(
     161                                getChrButton(interruptedUltraQuickButton, 44, 96, 44, 16,
     162                                                Messages.getString("IUQChar"), Chr.INTERRUPTEDULTRAQUICK), null);
    117163                charLabel.setBounds(new Rectangle(0, 113, 88, 20));
    118164                charLabel.setHorizontalAlignment(SwingConstants.CENTER);
     
    139185        }
    140186
    141         private JToggleButton getChrButton(JToggleButton button, int x, int y, int w, int h, String tip, Chr chr) {
     187        private JToggleButton getChrButton(JToggleButton button, int x, int y, int w,
     188                        int h, String tip, Chr chr) {
    142189                button.setBounds(new Rectangle(x, y, w, h));
    143190                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelCol.java

    r26096 r26110  
    2525        private Ent ent;
    2626        private ButtonGroup colourButtons = new ButtonGroup();
    27         public JRadioButton offButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/OffButton.png")));
    28         public JRadioButton whiteButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/WhiteButton.png")));
    29         public JRadioButton redButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/RedButton.png")));
    30         public JRadioButton orangeButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/OrangeButton.png")));
    31         public JRadioButton amberButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/AmberButton.png")));
    32         public JRadioButton yellowButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/YellowButton.png")));
    33         public JRadioButton greenButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/GreenButton.png")));
    34         public JRadioButton blueButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/BlueButton.png")));
    35         public JRadioButton violetButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/VioletButton.png")));
    36         public JRadioButton blackButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/BlackButton.png")));
    37         private EnumMap<Col, JRadioButton> colours = new EnumMap<Col, JRadioButton>(Col.class);
     27        public JRadioButton offButton = new JRadioButton(new ImageIcon(getClass()
     28                        .getResource("/images/OffButton.png")));
     29        public JRadioButton whiteButton = new JRadioButton(new ImageIcon(getClass()
     30                        .getResource("/images/WhiteButton.png")));
     31        public JRadioButton redButton = new JRadioButton(new ImageIcon(getClass()
     32                        .getResource("/images/RedButton.png")));
     33        public JRadioButton orangeButton = new JRadioButton(new ImageIcon(getClass()
     34                        .getResource("/images/OrangeButton.png")));
     35        public JRadioButton amberButton = new JRadioButton(new ImageIcon(getClass()
     36                        .getResource("/images/AmberButton.png")));
     37        public JRadioButton yellowButton = new JRadioButton(new ImageIcon(getClass()
     38                        .getResource("/images/YellowButton.png")));
     39        public JRadioButton greenButton = new JRadioButton(new ImageIcon(getClass()
     40                        .getResource("/images/GreenButton.png")));
     41        public JRadioButton blueButton = new JRadioButton(new ImageIcon(getClass()
     42                        .getResource("/images/BlueButton.png")));
     43        public JRadioButton violetButton = new JRadioButton(new ImageIcon(getClass()
     44                        .getResource("/images/VioletButton.png")));
     45        public JRadioButton blackButton = new JRadioButton(new ImageIcon(getClass()
     46                        .getResource("/images/BlackButton.png")));
     47        private EnumMap<Col, JRadioButton> colours = new EnumMap<Col, JRadioButton>(
     48                        Col.class);
    3849        private ActionListener alColour = new ActionListener() {
    3950                public void actionPerformed(java.awt.event.ActionEvent e) {
     
    4152                                JRadioButton button = colours.get(col);
    4253                                if (button.isSelected()) {
    43                                         if (dlg.mark != null) dlg.mark.setColour(ent, col);
     54                                        if (dlg.mark != null)
     55                                                dlg.mark.setColour(ent, col);
    4456                                        button.setBorderPainted(true);
    4557                                } else
     
    5365                ent = entity;
    5466                this.setLayout(null);
    55                 this.add(getColButton(offButton, 0, 0, 34, 16, Messages.getString("NoColour"), Col.UNKNOWN), null);
    56                 this.add(getColButton(whiteButton, 0, 16, 34, 16, Messages.getString("White"), Col.WHITE), null);
    57                 this.add(getColButton(redButton, 0, 32, 34, 16, Messages.getString("Red"), Col.RED), null);
    58                 this.add(getColButton(orangeButton, 0, 48, 34, 16, Messages.getString("Orange"), Col.ORANGE), null);
    59                 this.add(getColButton(amberButton, 0, 64, 34, 16, Messages.getString("Amber"), Col.AMBER), null);
    60                 this.add(getColButton(yellowButton, 0, 80, 34, 16, Messages.getString("Yellow"), Col.YELLOW), null);
    61                 this.add(getColButton(greenButton, 0, 96, 34, 16, Messages.getString("Green"), Col.GREEN), null);
    62                 this.add(getColButton(blueButton, 0, 112, 34, 16, Messages.getString("Blue"), Col.BLUE), null);
    63                 this.add(getColButton(violetButton, 0, 128, 34, 16, Messages.getString("Violet"), Col.VIOLET), null);
    64                 this.add(getColButton(blackButton, 0, 144, 34, 16, Messages.getString("Black"), Col.BLACK), null);
     67                this.add(
     68                                getColButton(offButton, 0, 0, 34, 16, Messages.getString("NoColour"),
     69                                                Col.UNKNOWN), null);
     70                this.add(
     71                                getColButton(whiteButton, 0, 16, 34, 16, Messages.getString("White"),
     72                                                Col.WHITE), null);
     73                this.add(
     74                                getColButton(redButton, 0, 32, 34, 16, Messages.getString("Red"),
     75                                                Col.RED), null);
     76                this.add(
     77                                getColButton(orangeButton, 0, 48, 34, 16, Messages.getString("Orange"),
     78                                                Col.ORANGE), null);
     79                this.add(
     80                                getColButton(amberButton, 0, 64, 34, 16, Messages.getString("Amber"),
     81                                                Col.AMBER), null);
     82                this.add(
     83                                getColButton(yellowButton, 0, 80, 34, 16, Messages.getString("Yellow"),
     84                                                Col.YELLOW), null);
     85                this.add(
     86                                getColButton(greenButton, 0, 96, 34, 16, Messages.getString("Green"),
     87                                                Col.GREEN), null);
     88                this.add(
     89                                getColButton(blueButton, 0, 112, 34, 16, Messages.getString("Blue"),
     90                                                Col.BLUE), null);
     91                this.add(
     92                                getColButton(violetButton, 0, 128, 34, 16,
     93                                                Messages.getString("Violet"), Col.VIOLET), null);
     94                this.add(
     95                                getColButton(blackButton, 0, 144, 34, 16, Messages.getString("Black"),
     96                                                Col.BLACK), null);
    6597        }
    6698
     
    76108        }
    77109
    78         private JRadioButton getColButton(JRadioButton button, int x, int y, int w, int h, String tip, Col col) {
     110        private JRadioButton getColButton(JRadioButton button, int x, int y, int w,
     111                        int h, String tip, Col col) {
    79112                button.setBounds(new Rectangle(x, y, w, h));
    80113                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelHaz.java

    r26096 r26110  
    2525        private OSeaMAction dlg;
    2626        private ButtonGroup catButtons = new ButtonGroup();
    27         public JRadioButton northButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/CardNButton.png")));
    28         public JRadioButton southButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/CardSButton.png")));
    29         public JRadioButton eastButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/CardEButton.png")));
    30         public JRadioButton westButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/CardWButton.png")));
    31         public JRadioButton isolButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/IsolButton.png")));
     27        public JRadioButton northButton = new JRadioButton(new ImageIcon(getClass()
     28                        .getResource("/images/CardNButton.png")));
     29        public JRadioButton southButton = new JRadioButton(new ImageIcon(getClass()
     30                        .getResource("/images/CardSButton.png")));
     31        public JRadioButton eastButton = new JRadioButton(new ImageIcon(getClass()
     32                        .getResource("/images/CardEButton.png")));
     33        public JRadioButton westButton = new JRadioButton(new ImageIcon(getClass()
     34                        .getResource("/images/CardWButton.png")));
     35        public JRadioButton isolButton = new JRadioButton(new ImageIcon(getClass()
     36                        .getResource("/images/IsolButton.png")));
    3237        private ActionListener alCat = new ActionListener() {
    3338                public void actionPerformed(java.awt.event.ActionEvent e) {
     
    9297
    9398        private ButtonGroup shapeButtons = new ButtonGroup();
    94         public JRadioButton pillarButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PillarButton.png")));
    95         public JRadioButton sparButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SparButton.png")));
    96         public JRadioButton floatButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/FloatButton.png")));
    97         public JRadioButton beaconButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/BeaconButton.png")));
    98         public JRadioButton towerButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/TowerButton.png")));
    99         public EnumMap<Shp, JRadioButton> shapes = new EnumMap<Shp, JRadioButton>(Shp.class);
     99        public JRadioButton pillarButton = new JRadioButton(new ImageIcon(getClass()
     100                        .getResource("/images/PillarButton.png")));
     101        public JRadioButton sparButton = new JRadioButton(new ImageIcon(getClass()
     102                        .getResource("/images/SparButton.png")));
     103        public JRadioButton floatButton = new JRadioButton(new ImageIcon(getClass()
     104                        .getResource("/images/FloatButton.png")));
     105        public JRadioButton beaconButton = new JRadioButton(new ImageIcon(getClass()
     106                        .getResource("/images/BeaconButton.png")));
     107        public JRadioButton towerButton = new JRadioButton(new ImageIcon(getClass()
     108                        .getResource("/images/TowerButton.png")));
     109        public EnumMap<Shp, JRadioButton> shapes = new EnumMap<Shp, JRadioButton>(
     110                        Shp.class);
    100111        public EnumMap<Shp, Obj> carObjects = new EnumMap<Shp, Obj>(Shp.class);
    101112        public EnumMap<Shp, Obj> isdObjects = new EnumMap<Shp, Obj>(Shp.class);
     
    128139                this.add(getCatButton(isolButton, 0, 128, 52, 32, "Isol"), null);
    129140
    130                 this.add(getShapeButton(pillarButton, 55, 0, 34, 32, "Pillar", Shp.PILLAR, Obj.BOYCAR, Obj.BOYISD), null);
    131                 this.add(getShapeButton(sparButton, 55, 32, 34, 32, "Spar", Shp.SPAR, Obj.BOYCAR, Obj.BOYISD), null);
    132                 this.add(getShapeButton(floatButton, 55, 64, 34, 32, "Float", Shp.FLOAT, Obj.LITFLT, Obj.LITFLT), null);
    133                 this.add(getShapeButton(beaconButton, 55, 96, 34, 32, "Beacon", Shp.BEACON, Obj.BCNCAR, Obj.BCNISD), null);
    134                 this.add(getShapeButton(towerButton, 55, 128, 34, 32, "Tower", Shp.TOWER, Obj.BCNCAR, Obj.BCNISD), null);
     141                this.add(
     142                                getShapeButton(pillarButton, 55, 0, 34, 32, "Pillar", Shp.PILLAR,
     143                                                Obj.BOYCAR, Obj.BOYISD), null);
     144                this.add(
     145                                getShapeButton(sparButton, 55, 32, 34, 32, "Spar", Shp.SPAR,
     146                                                Obj.BOYCAR, Obj.BOYISD), null);
     147                this.add(
     148                                getShapeButton(floatButton, 55, 64, 34, 32, "Float", Shp.FLOAT,
     149                                                Obj.LITFLT, Obj.LITFLT), null);
     150                this.add(
     151                                getShapeButton(beaconButton, 55, 96, 34, 32, "Beacon", Shp.BEACON,
     152                                                Obj.BCNCAR, Obj.BCNISD), null);
     153                this.add(
     154                                getShapeButton(towerButton, 55, 128, 34, 32, "Tower", Shp.TOWER,
     155                                                Obj.BCNCAR, Obj.BCNISD), null);
    135156        }
    136157
     
    142163        }
    143164
    144         private JRadioButton getCatButton(JRadioButton button, int x, int y, int w, int h, String tip) {
     165        private JRadioButton getCatButton(JRadioButton button, int x, int y, int w,
     166                        int h, String tip) {
    145167                button.setBounds(new Rectangle(x, y, w, h));
    146168                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
     
    151173        }
    152174
    153         private JRadioButton getShapeButton(JRadioButton button, int x, int y, int w, int h, String tip, Shp shp, Obj car, Obj isd) {
     175        private JRadioButton getShapeButton(JRadioButton button, int x, int y, int w,
     176                        int h, String tip, Shp shp, Obj car, Obj isd) {
    154177                button.setBounds(new Rectangle(x, y, w, h));
    155178                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLights.java

    r26096 r26110  
    2222        private OSeaMAction dlg;
    2323        private ButtonGroup catButtons = new ButtonGroup();
    24         public JRadioButton houseButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/LighthouseButton.png")));
    25         public JRadioButton majorButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/LightMajorButton.png")));
    26         public JRadioButton minorButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/LightMinorButton.png")));
    27         public JRadioButton vesselButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/LightVesselButton.png")));
    28         public JRadioButton stationButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/StationButton.png")));
    29         private EnumMap<Cat, JRadioButton> categories = new EnumMap<Cat, JRadioButton>(Cat.class);
     24        public JRadioButton houseButton = new JRadioButton(new ImageIcon(getClass()
     25                        .getResource("/images/LighthouseButton.png")));
     26        public JRadioButton majorButton = new JRadioButton(new ImageIcon(getClass()
     27                        .getResource("/images/LightMajorButton.png")));
     28        public JRadioButton minorButton = new JRadioButton(new ImageIcon(getClass()
     29                        .getResource("/images/LightMinorButton.png")));
     30        public JRadioButton vesselButton = new JRadioButton(new ImageIcon(getClass()
     31                        .getResource("/images/LightVesselButton.png")));
     32        public JRadioButton stationButton = new JRadioButton(new ImageIcon(getClass()
     33                        .getResource("/images/StationButton.png")));
     34        private EnumMap<Cat, JRadioButton> categories = new EnumMap<Cat, JRadioButton>(
     35                        Cat.class);
    3036        private EnumMap<Cat, Obj> objects = new EnumMap<Cat, Obj>(Cat.class);
    3137        private ActionListener alCat = new ActionListener() {
     
    4854                dlg = dia;
    4955                this.setLayout(null);
    50                 this.add(getCatButton(houseButton, 0, 0, 34, 32, "Lighthouse", Cat.LIGHT_HOUSE, Obj.LNDMRK), null);
    51                 this.add(getCatButton(majorButton, 0, 32, 34, 32, "MajorLight", Cat.LIGHT_MAJOR, Obj.LITMAJ), null);
    52                 this.add(getCatButton(minorButton, 0, 64, 34, 32, "MinorLight", Cat.LIGHT_MINOR, Obj.LITMIN), null);
    53                 this.add(getCatButton(vesselButton, 0, 96, 34, 32, "LightVessel", Cat.LIGHT_VESSEL, Obj.LITVES), null);
    54                 this.add(getCatButton(stationButton, 0, 128, 34, 32, "SignalStation", Cat.SIGNAL_STATION, Obj.SIGSTA), null);
     56                this.add(
     57                                getCatButton(houseButton, 0, 0, 34, 32, "Lighthouse", Cat.LIGHT_HOUSE,
     58                                                Obj.LNDMRK), null);
     59                this.add(
     60                                getCatButton(majorButton, 0, 32, 34, 32, "MajorLight", Cat.LIGHT_MAJOR,
     61                                                Obj.LITMAJ), null);
     62                this.add(
     63                                getCatButton(minorButton, 0, 64, 34, 32, "MinorLight", Cat.LIGHT_MINOR,
     64                                                Obj.LITMIN), null);
     65                this.add(
     66                                getCatButton(vesselButton, 0, 96, 34, 32, "LightVessel",
     67                                                Cat.LIGHT_VESSEL, Obj.LITVES), null);
     68                this.add(
     69                                getCatButton(stationButton, 0, 128, 34, 32, "SignalStation",
     70                                                Cat.SIGNAL_STATION, Obj.SIGSTA), null);
    5571        }
    5672
     
    5975        }
    6076
    61         private JRadioButton getCatButton(JRadioButton button, int x, int y, int w, int h, String tip, Cat cat, Obj obj) {
     77        private JRadioButton getCatButton(JRadioButton button, int x, int y, int w,
     78                        int h, String tip, Cat cat, Obj obj) {
    6279                button.setBounds(new Rectangle(x, y, w, h));
    6380                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLit.java

    r26099 r26110  
    99import javax.swing.JTextField;
    1010import javax.swing.JComboBox;
     11import javax.swing.JTable;
    1112import javax.swing.SwingConstants;
     13import javax.swing.JFrame;
    1214
    1315import java.awt.Color;
     
    2224
    2325        private OSeaMAction dlg;
     26        public PanelSectors panelSector;
    2427        public PanelCol panelCol;
    2528        public PanelChr panelChr;
     
    5861        public PanelLit(OSeaMAction dia) {
    5962                dlg = dia;
     63                panelSector = new PanelSectors();
     64                panelSector.setAlwaysOnTop(true);
     65                panelSector.setLocation(450, 0);
    6066                panelChr = new PanelChr(dlg);
    6167                panelChr.setBounds(new Rectangle(0, 0, 88, 160));
     
    6672                this.add(panelChr, null);
    6773                this.add(panelCol, null);
    68                
     74
    6975                alType = new ActionListener() {
    7076                        public void actionPerformed(java.awt.event.ActionEvent e) {
    7177                                singleButton.setBorderPainted(singleButton.isSelected());
    7278                                sectorButton.setBorderPainted(sectorButton.isSelected());
     79                                if (sectorButton.isSelected()) {
     80                                        panelSector.setVisible(true);
     81                                } else {
     82                                        panelSector.setVisible(false);
     83                                }
    7384                                dlg.mark.paintSign();
    7485                        }
    7586                };
    7687                typeButtons = new ButtonGroup();
    77                 singleButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SingleButton.png")));
     88                singleButton = new JRadioButton(new ImageIcon(getClass().getResource(
     89                                "/images/SingleButton.png")));
    7890                this.add(getTypeButton(singleButton, 280, 125, 34, 30, "Single"), null);
    79                 sectorButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SectorButton.png")));
     91                sectorButton = new JRadioButton(new ImageIcon(getClass().getResource(
     92                                "/images/SectorButton.png")));
    8093                this.add(getTypeButton(sectorButton, 315, 125, 34, 30, "Sector"), null);
    81                
     94
    8295                alGroupBox = new ActionListener() {
    8396                        public void actionPerformed(java.awt.event.ActionEvent e) {
     
    92105                this.add(groupBox, null);
    93106                groupBox.addActionListener(alGroupBox);
    94                
     107
    95108                alPeriodBox = new ActionListener() {
    96109                        public void actionPerformed(java.awt.event.ActionEvent e) {
     
    98111                        }
    99112                };
    100                 periodLabel = new JLabel(Messages.getString("Period"), SwingConstants.CENTER);
     113                periodLabel = new JLabel(Messages.getString("Period"),
     114                                SwingConstants.CENTER);
    101115                periodLabel.setBounds(new Rectangle(123, 40, 65, 20));
    102116                this.add(periodLabel, null);
     
    106120                this.add(periodBox, null);
    107121                periodBox.addActionListener(alPeriodBox);
    108                
     122
    109123                alHeightBox = new ActionListener() {
    110124                        public void actionPerformed(java.awt.event.ActionEvent e) {
     
    112126                        }
    113127                };
    114                 heightLabel = new JLabel(Messages.getString("Height"), SwingConstants.CENTER);
     128                heightLabel = new JLabel(Messages.getString("Height"),
     129                                SwingConstants.CENTER);
    115130                heightLabel.setBounds(new Rectangle(123, 80, 65, 20));
    116131                this.add(heightLabel, null);
     
    120135                this.add(heightBox, null);
    121136                heightBox.addActionListener(alHeightBox);
    122                
     137
    123138                alRangeBox = new ActionListener() {
    124139                        public void actionPerformed(java.awt.event.ActionEvent e) {
     
    134149                this.add(rangeBox, null);
    135150                rangeBox.addActionListener(alRangeBox);
    136                
     151
    137152                alSequenceBox = new ActionListener() {
    138153                        public void actionPerformed(java.awt.event.ActionEvent e) {
     
    140155                        }
    141156                };
    142                 sequenceLabel = new JLabel(Messages.getString("Sequence"), SwingConstants.CENTER);
     157                sequenceLabel = new JLabel(Messages.getString("Sequence"),
     158                                SwingConstants.CENTER);
    143159                sequenceLabel.setBounds(new Rectangle(188, 120, 80, 20));
    144160                this.add(sequenceLabel, null);
     
    148164                this.add(sequenceBox, null);
    149165                sequenceBox.addActionListener(alSequenceBox);
    150                
     166
    151167                alCategoryBox = new ActionListener() {
    152168                        public void actionPerformed(java.awt.event.ActionEvent e) {
    153169                        }
    154170                };
    155                 categoryLabel = new JLabel(Messages.getString("Category"), SwingConstants.CENTER);
     171                categoryLabel = new JLabel(Messages.getString("Category"),
     172                                SwingConstants.CENTER);
    156173                categoryLabel.setBounds(new Rectangle(185, 0, 165, 20));
    157174                this.add(categoryLabel, null);
     
    162179                categoryBox.addItem(Messages.getString("NoneSpecified"));
    163180                categoryBox.addItem(Messages.getString("Vert2"));
    164                
     181
    165182                alVisibilityBox = new ActionListener() {
    166183                        public void actionPerformed(java.awt.event.ActionEvent e) {
    167184                        }
    168185                };
    169                 visibilityLabel = new JLabel(Messages.getString("Visibility"), SwingConstants.CENTER);
     186                visibilityLabel = new JLabel(Messages.getString("Visibility"),
     187                                SwingConstants.CENTER);
    170188                visibilityLabel.setBounds(new Rectangle(185, 40, 165, 20));
    171189                this.add(visibilityLabel, null);
     
    178196                visibilityBox.addItem(Messages.getString("Unintensified"));
    179197                visibilityBox.addItem(Messages.getString("PartiallyObscured"));
    180                
     198
    181199                alExhibitionBox = new ActionListener() {
    182200                        public void actionPerformed(java.awt.event.ActionEvent e) {
    183201                        }
    184202                };
    185                 exhibitionLabel = new JLabel(Messages.getString("Exhibition"), SwingConstants.CENTER);
     203                exhibitionLabel = new JLabel(Messages.getString("Exhibition"),
     204                                SwingConstants.CENTER);
    186205                exhibitionLabel.setBounds(new Rectangle(280, 80, 70, 20));
    187206                this.add(exhibitionLabel, null);
     
    194213                exhibitionBox.addItem(Messages.getString("Night"));
    195214                exhibitionBox.addItem(Messages.getString("Fog"));
    196                
     215
    197216                alOrientationBox = new ActionListener() {
    198217                        public void actionPerformed(java.awt.event.ActionEvent e) {
     
    200219                        }
    201220                };
    202                 orientationLabel = new JLabel(Messages.getString("Orientation"), SwingConstants.CENTER);
     221                orientationLabel = new JLabel(Messages.getString("Orientation"),
     222                                SwingConstants.CENTER);
    203223                orientationLabel.setBounds(new Rectangle(188, 80, 80, 20));
    204224                this.add(orientationLabel, null);
     
    210230        }
    211231
    212         private JRadioButton getTypeButton(JRadioButton button, int x, int y, int w, int h, String tip) {
     232        private JRadioButton getTypeButton(JRadioButton button, int x, int y, int w,
     233                        int h, String tip) {
    213234                button.setBounds(new Rectangle(x, y, w, h));
    214235                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java

    r26099 r26110  
    3131        private JButton saveButton = null;
    3232        public ButtonGroup typeButtons = null;
    33         public JRadioButton chanButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/ChanButton.png")));
    34         public JRadioButton hazButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/HazButton.png")));
    35         public JRadioButton specButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SpecButton.png")));
    36         public JRadioButton lightsButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/LightsButton.png")));
     33        public JRadioButton chanButton = new JRadioButton(new ImageIcon(getClass()
     34                        .getResource("/images/ChanButton.png")));
     35        public JRadioButton hazButton = new JRadioButton(new ImageIcon(getClass()
     36                        .getResource("/images/HazButton.png")));
     37        public JRadioButton specButton = new JRadioButton(new ImageIcon(getClass()
     38                        .getResource("/images/SpecButton.png")));
     39        public JRadioButton lightsButton = new JRadioButton(new ImageIcon(getClass()
     40                        .getResource("/images/LightsButton.png")));
    3741        private ActionListener alType = null;
    3842        private ButtonGroup miscButtons = null;
    39         public JRadioButton topButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/TopButton.png")));
    40         public JRadioButton fogButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/FogButton.png")));
    41         public JRadioButton radButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/RadarButton.png")));
    42         public JRadioButton litButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/LitButton.png")));
     43        public JRadioButton topButton = new JRadioButton(new ImageIcon(getClass()
     44                        .getResource("/images/TopButton.png")));
     45        public JRadioButton fogButton = new JRadioButton(new ImageIcon(getClass()
     46                        .getResource("/images/FogButton.png")));
     47        public JRadioButton radButton = new JRadioButton(new ImageIcon(getClass()
     48                        .getResource("/images/RadarButton.png")));
     49        public JRadioButton litButton = new JRadioButton(new ImageIcon(getClass()
     50                        .getResource("/images/LitButton.png")));
    4351        private ActionListener alMisc = null;
    4452        private ActionListener alName = null;
     
    271279        }
    272280
    273         private JRadioButton getButton(JRadioButton button, int x, int y, int w, int h, String tip) {
     281        private JRadioButton getButton(JRadioButton button, int x, int y, int w,
     282                        int h, String tip) {
    274283                button.setBounds(new Rectangle(x, y, w, h));
    275284                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelPort.java

    r26096 r26110  
    2222        private OSeaMAction dlg;
    2323        private ButtonGroup regionButtons = new ButtonGroup();
    24         public JRadioButton regionAButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/RegionAButton.png")));
    25         public JRadioButton regionBButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/RegionBButton.png")));
     24        public JRadioButton regionAButton = new JRadioButton(new ImageIcon(getClass()
     25                        .getResource("/images/RegionAButton.png")));
     26        public JRadioButton regionBButton = new JRadioButton(new ImageIcon(getClass()
     27                        .getResource("/images/RegionBButton.png")));
    2628        private ActionListener alRegion = new ActionListener() {
    2729                public void actionPerformed(java.awt.event.ActionEvent e) {
     
    3234        };
    3335        private ButtonGroup shapeButtons = new ButtonGroup();
    34         public JRadioButton pillarButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PillarButton.png")));
    35         public JRadioButton sparButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SparButton.png")));
    36         public JRadioButton canButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/CanButton.png")));
    37         public JRadioButton floatButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/FloatButton.png")));
    38         public JRadioButton beaconButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/BeaconButton.png")));
    39         public JRadioButton towerButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/TowerButton.png")));
    40         public JRadioButton perchButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PerchPButton.png")));
    41         public EnumMap<Shp, JRadioButton> shapes = new EnumMap<Shp, JRadioButton>(Shp.class);
     36        public JRadioButton pillarButton = new JRadioButton(new ImageIcon(getClass()
     37                        .getResource("/images/PillarButton.png")));
     38        public JRadioButton sparButton = new JRadioButton(new ImageIcon(getClass()
     39                        .getResource("/images/SparButton.png")));
     40        public JRadioButton canButton = new JRadioButton(new ImageIcon(getClass()
     41                        .getResource("/images/CanButton.png")));
     42        public JRadioButton floatButton = new JRadioButton(new ImageIcon(getClass()
     43                        .getResource("/images/FloatButton.png")));
     44        public JRadioButton beaconButton = new JRadioButton(new ImageIcon(getClass()
     45                        .getResource("/images/BeaconButton.png")));
     46        public JRadioButton towerButton = new JRadioButton(new ImageIcon(getClass()
     47                        .getResource("/images/TowerButton.png")));
     48        public JRadioButton perchButton = new JRadioButton(new ImageIcon(getClass()
     49                        .getResource("/images/PerchPButton.png")));
     50        public EnumMap<Shp, JRadioButton> shapes = new EnumMap<Shp, JRadioButton>(
     51                        Shp.class);
    4252        public EnumMap<Shp, Obj> objects = new EnumMap<Shp, Obj>(Shp.class);
    4353        private ActionListener alShape = new ActionListener() {
     
    6272                this.add(getRegionButton(regionAButton, 0, 2, 34, 30, "RegionA"), null);
    6373                this.add(getRegionButton(regionBButton, 0, 32, 34, 30, "RegionB"), null);
    64                 this.add(getShapeButton(pillarButton, 0, 64, 34, 32, "Pillar", Shp.PILLAR, Obj.BOYLAT), null);
    65                 this.add(getShapeButton(sparButton, 0, 96, 34, 32, "Spar", Shp.SPAR, Obj.BOYLAT), null);
    66                 this.add(getShapeButton(canButton, 0, 128, 34, 32, "Can", Shp.CAN, Obj.BOYLAT), null);
    67                 this.add(getShapeButton(floatButton, 35, 0, 34, 32, "Float", Shp.FLOAT, Obj.LITFLT), null);
    68                 this.add(getShapeButton(beaconButton, 35, 32, 34, 32, "Beacon", Shp.BEACON, Obj.BCNLAT), null);
    69                 this.add(getShapeButton(towerButton, 35, 64, 34, 32, "Tower", Shp.TOWER, Obj.BCNLAT), null);
    70                 this.add(getShapeButton(perchButton, 35, 96, 34, 32, "Perch", Shp.PERCH, Obj.BCNLAT), null);
     74                this.add(
     75                                getShapeButton(pillarButton, 0, 64, 34, 32, "Pillar", Shp.PILLAR,
     76                                                Obj.BOYLAT), null);
     77                this.add(
     78                                getShapeButton(sparButton, 0, 96, 34, 32, "Spar", Shp.SPAR, Obj.BOYLAT),
     79                                null);
     80                this.add(
     81                                getShapeButton(canButton, 0, 128, 34, 32, "Can", Shp.CAN, Obj.BOYLAT),
     82                                null);
     83                this.add(
     84                                getShapeButton(floatButton, 35, 0, 34, 32, "Float", Shp.FLOAT,
     85                                                Obj.LITFLT), null);
     86                this.add(
     87                                getShapeButton(beaconButton, 35, 32, 34, 32, "Beacon", Shp.BEACON,
     88                                                Obj.BCNLAT), null);
     89                this.add(
     90                                getShapeButton(towerButton, 35, 64, 34, 32, "Tower", Shp.TOWER,
     91                                                Obj.BCNLAT), null);
     92                this.add(
     93                                getShapeButton(perchButton, 35, 96, 34, 32, "Perch", Shp.PERCH,
     94                                                Obj.BCNLAT), null);
    7195        }
    7296
     
    76100        }
    77101
    78         private JRadioButton getRegionButton(JRadioButton button, int x, int y, int w, int h, String tip) {
     102        private JRadioButton getRegionButton(JRadioButton button, int x, int y,
     103                        int w, int h, String tip) {
    79104                button.setBounds(new Rectangle(x, y, w, h));
    80105                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
     
    85110        }
    86111
    87         private JRadioButton getShapeButton(JRadioButton button, int x, int y, int w, int h, String tip, Shp shp, Obj obj) {
     112        private JRadioButton getShapeButton(JRadioButton button, int x, int y, int w,
     113                        int h, String tip, Shp shp, Obj obj) {
    88114                button.setBounds(new Rectangle(x, y, w, h));
    89115                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSaw.java

    r26096 r26110  
    2222        private OSeaMAction dlg;
    2323        private ButtonGroup shapeButtons = new ButtonGroup();
    24         public JRadioButton pillarButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PillarButton.png")));
    25         public JRadioButton sparButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SparButton.png")));
    26         public JRadioButton sphereButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SphereButton.png")));
    27         public JRadioButton barrelButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/BarrelButton.png")));
    28         public JRadioButton floatButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/FloatButton.png")));
    29         public EnumMap<Shp, JRadioButton> shapes = new EnumMap<Shp, JRadioButton>(Shp.class);
     24        public JRadioButton pillarButton = new JRadioButton(new ImageIcon(getClass()
     25                        .getResource("/images/PillarButton.png")));
     26        public JRadioButton sparButton = new JRadioButton(new ImageIcon(getClass()
     27                        .getResource("/images/SparButton.png")));
     28        public JRadioButton sphereButton = new JRadioButton(new ImageIcon(getClass()
     29                        .getResource("/images/SphereButton.png")));
     30        public JRadioButton barrelButton = new JRadioButton(new ImageIcon(getClass()
     31                        .getResource("/images/BarrelButton.png")));
     32        public JRadioButton floatButton = new JRadioButton(new ImageIcon(getClass()
     33                        .getResource("/images/FloatButton.png")));
     34        public EnumMap<Shp, JRadioButton> shapes = new EnumMap<Shp, JRadioButton>(
     35                        Shp.class);
    3036        public EnumMap<Shp, Obj> objects = new EnumMap<Shp, Obj>(Shp.class);
    3137        private ActionListener alShape = new ActionListener() {
     
    4854                dlg = dia;
    4955                this.setLayout(null);
    50                 this.add(getShapeButton(pillarButton, 0, 0, 34, 32, "Pillar", Shp.PILLAR, Obj.BOYSAW), null);
    51                 this.add(getShapeButton(sparButton, 0, 32, 34, 32, "Spar", Shp.SPAR, Obj.BOYSAW), null);
    52                 this.add(getShapeButton(sphereButton, 0, 64, 34, 32, "Sphere", Shp.SPHERE, Obj.BOYSAW), null);
    53                 this.add(getShapeButton(barrelButton, 0, 96, 34, 32, "Barrel", Shp.BARREL, Obj.BOYSAW), null);
    54                 this.add(getShapeButton(floatButton, 0, 128, 34, 32, "Float", Shp.FLOAT, Obj.LITFLT), null);
     56                this.add(
     57                                getShapeButton(pillarButton, 0, 0, 34, 32, "Pillar", Shp.PILLAR,
     58                                                Obj.BOYSAW), null);
     59                this.add(
     60                                getShapeButton(sparButton, 0, 32, 34, 32, "Spar", Shp.SPAR, Obj.BOYSAW),
     61                                null);
     62                this.add(
     63                                getShapeButton(sphereButton, 0, 64, 34, 32, "Sphere", Shp.SPHERE,
     64                                                Obj.BOYSAW), null);
     65                this.add(
     66                                getShapeButton(barrelButton, 0, 96, 34, 32, "Barrel", Shp.BARREL,
     67                                                Obj.BOYSAW), null);
     68                this.add(
     69                                getShapeButton(floatButton, 0, 128, 34, 32, "Float", Shp.FLOAT,
     70                                                Obj.LITFLT), null);
    5571        }
    5672
     
    6076        }
    6177
    62         private JRadioButton getShapeButton(JRadioButton button, int x, int y, int w, int h, String tip, Shp shp, Obj obj) {
     78        private JRadioButton getShapeButton(JRadioButton button, int x, int y, int w,
     79                        int h, String tip, Shp shp, Obj obj) {
    6380                button.setBounds(new Rectangle(x, y, w, h));
    6481                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSpec.java

    r26096 r26110  
    2323        private OSeaMAction dlg;
    2424        private ButtonGroup shapeButtons = new ButtonGroup();
    25         public JRadioButton pillarButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PillarButton.png")));
    26         public JRadioButton sparButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SparButton.png")));
    27         public JRadioButton canButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/CanButton.png")));
    28         public JRadioButton coneButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/ConeButton.png")));
    29         public JRadioButton sphereButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SphereButton.png")));
    30         public JRadioButton barrelButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/BarrelButton.png")));
    31         public JRadioButton superButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SuperButton.png")));
    32         public JRadioButton floatButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/FloatButton.png")));
    33         public JRadioButton beaconButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/BeaconButton.png")));
    34         public JRadioButton towerButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/TowerButton.png")));
    35         public EnumMap<Shp, JRadioButton> shapes = new EnumMap<Shp, JRadioButton>(Shp.class);
     25        public JRadioButton pillarButton = new JRadioButton(new ImageIcon(getClass()
     26                        .getResource("/images/PillarButton.png")));
     27        public JRadioButton sparButton = new JRadioButton(new ImageIcon(getClass()
     28                        .getResource("/images/SparButton.png")));
     29        public JRadioButton canButton = new JRadioButton(new ImageIcon(getClass()
     30                        .getResource("/images/CanButton.png")));
     31        public JRadioButton coneButton = new JRadioButton(new ImageIcon(getClass()
     32                        .getResource("/images/ConeButton.png")));
     33        public JRadioButton sphereButton = new JRadioButton(new ImageIcon(getClass()
     34                        .getResource("/images/SphereButton.png")));
     35        public JRadioButton barrelButton = new JRadioButton(new ImageIcon(getClass()
     36                        .getResource("/images/BarrelButton.png")));
     37        public JRadioButton superButton = new JRadioButton(new ImageIcon(getClass()
     38                        .getResource("/images/SuperButton.png")));
     39        public JRadioButton floatButton = new JRadioButton(new ImageIcon(getClass()
     40                        .getResource("/images/FloatButton.png")));
     41        public JRadioButton beaconButton = new JRadioButton(new ImageIcon(getClass()
     42                        .getResource("/images/BeaconButton.png")));
     43        public JRadioButton towerButton = new JRadioButton(new ImageIcon(getClass()
     44                        .getResource("/images/TowerButton.png")));
     45        public EnumMap<Shp, JRadioButton> shapes = new EnumMap<Shp, JRadioButton>(
     46                        Shp.class);
    3647        public EnumMap<Shp, Obj> objects = new EnumMap<Shp, Obj>(Shp.class);
    3748        public PanelCol panelCol = null;
     
    5970                this.setLayout(null);
    6071                this.add(panelCol, null);
    61                 this.add(getShapeButton(pillarButton, 55, 0, 34, 32, "Pillar", Shp.PILLAR, Obj.BOYSPP), null);
    62                 this.add(getShapeButton(sparButton, 55, 32, 34, 32, "Spar", Shp.SPAR, Obj.BOYSPP), null);
    63                 this.add(getShapeButton(canButton, 55, 64, 34, 32, "Can", Shp.CAN, Obj.BOYSPP), null);
    64                 this.add(getShapeButton(coneButton, 55, 96, 34, 32, "Cone", Shp.CONE, Obj.BOYSPP), null);
    65                 this.add(getShapeButton(sphereButton, 55, 128, 34, 32, "Sphere", Shp.SPHERE, Obj.BOYSPP), null);
    66                 this.add(getShapeButton(barrelButton, 90, 0, 34, 32, "Barrel", Shp.BARREL, Obj.BOYSPP), null);
    67                 this.add(getShapeButton(superButton, 90, 32, 34, 32, "Super", Shp.SUPER, Obj.BOYSPP), null);
    68                 this.add(getShapeButton(floatButton, 90, 64, 34, 32, "Float", Shp.FLOAT, Obj.LITFLT), null);
    69                 this.add(getShapeButton(beaconButton, 90, 96, 34, 32, "Beacon", Shp.BEACON, Obj.BCNSPP), null);
    70                 this.add(getShapeButton(towerButton, 90, 128, 34, 32, "Tower", Shp.TOWER, Obj.BCNSPP), null);
     72                this.add(
     73                                getShapeButton(pillarButton, 55, 0, 34, 32, "Pillar", Shp.PILLAR,
     74                                                Obj.BOYSPP), null);
     75                this.add(
     76                                getShapeButton(sparButton, 55, 32, 34, 32, "Spar", Shp.SPAR, Obj.BOYSPP),
     77                                null);
     78                this.add(
     79                                getShapeButton(canButton, 55, 64, 34, 32, "Can", Shp.CAN, Obj.BOYSPP),
     80                                null);
     81                this.add(
     82                                getShapeButton(coneButton, 55, 96, 34, 32, "Cone", Shp.CONE, Obj.BOYSPP),
     83                                null);
     84                this.add(
     85                                getShapeButton(sphereButton, 55, 128, 34, 32, "Sphere", Shp.SPHERE,
     86                                                Obj.BOYSPP), null);
     87                this.add(
     88                                getShapeButton(barrelButton, 90, 0, 34, 32, "Barrel", Shp.BARREL,
     89                                                Obj.BOYSPP), null);
     90                this.add(
     91                                getShapeButton(superButton, 90, 32, 34, 32, "Super", Shp.SUPER,
     92                                                Obj.BOYSPP), null);
     93                this.add(
     94                                getShapeButton(floatButton, 90, 64, 34, 32, "Float", Shp.FLOAT,
     95                                                Obj.LITFLT), null);
     96                this.add(
     97                                getShapeButton(beaconButton, 90, 96, 34, 32, "Beacon", Shp.BEACON,
     98                                                Obj.BCNSPP), null);
     99                this.add(
     100                                getShapeButton(towerButton, 90, 128, 34, 32, "Tower", Shp.TOWER,
     101                                                Obj.BCNSPP), null);
    71102        }
    72103
     
    75106        }
    76107
    77         private JRadioButton getShapeButton(JRadioButton button, int x, int y, int w, int h, String tip, Shp shp, Obj obj) {
     108        private JRadioButton getShapeButton(JRadioButton button, int x, int y, int w,
     109                        int h, String tip, Shp shp, Obj obj) {
    78110                button.setBounds(new Rectangle(x, y, w, h));
    79111                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelStbd.java

    r26096 r26110  
    2222        private OSeaMAction dlg;
    2323        private ButtonGroup regionButtons = new ButtonGroup();
    24         public JRadioButton regionAButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/RegionAButton.png")));
    25         public JRadioButton regionBButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/RegionBButton.png")));
     24        public JRadioButton regionAButton = new JRadioButton(new ImageIcon(getClass()
     25                        .getResource("/images/RegionAButton.png")));
     26        public JRadioButton regionBButton = new JRadioButton(new ImageIcon(getClass()
     27                        .getResource("/images/RegionBButton.png")));
    2628        private ActionListener alRegion = new ActionListener() {
    2729                public void actionPerformed(java.awt.event.ActionEvent e) {
     
    3234        };
    3335        private ButtonGroup shapeButtons = new ButtonGroup();
    34         public JRadioButton pillarButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PillarButton.png")));
    35         public JRadioButton sparButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SparButton.png")));
    36         public JRadioButton coneButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/ConeButton.png")));
    37         public JRadioButton floatButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/FloatButton.png")));
    38         public JRadioButton beaconButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/BeaconButton.png")));
    39         public JRadioButton towerButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/TowerButton.png")));
    40         public JRadioButton perchButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PerchSButton.png")));
    41         public EnumMap<Shp, JRadioButton> shapes = new EnumMap<Shp, JRadioButton>(Shp.class);
     36        public JRadioButton pillarButton = new JRadioButton(new ImageIcon(getClass()
     37                        .getResource("/images/PillarButton.png")));
     38        public JRadioButton sparButton = new JRadioButton(new ImageIcon(getClass()
     39                        .getResource("/images/SparButton.png")));
     40        public JRadioButton coneButton = new JRadioButton(new ImageIcon(getClass()
     41                        .getResource("/images/ConeButton.png")));
     42        public JRadioButton floatButton = new JRadioButton(new ImageIcon(getClass()
     43                        .getResource("/images/FloatButton.png")));
     44        public JRadioButton beaconButton = new JRadioButton(new ImageIcon(getClass()
     45                        .getResource("/images/BeaconButton.png")));
     46        public JRadioButton towerButton = new JRadioButton(new ImageIcon(getClass()
     47                        .getResource("/images/TowerButton.png")));
     48        public JRadioButton perchButton = new JRadioButton(new ImageIcon(getClass()
     49                        .getResource("/images/PerchSButton.png")));
     50        public EnumMap<Shp, JRadioButton> shapes = new EnumMap<Shp, JRadioButton>(
     51                        Shp.class);
    4252        public EnumMap<Shp, Obj> objects = new EnumMap<Shp, Obj>(Shp.class);
    4353        private ActionListener alShape = new ActionListener() {
     
    6272                this.add(getRegionButton(regionAButton, 0, 2, 34, 30, "RegionA"), null);
    6373                this.add(getRegionButton(regionBButton, 0, 32, 34, 30, "RegionB"), null);
    64                 this.add(getShapeButton(pillarButton, 0, 64, 34, 32, "Pillar", Shp.PILLAR, Obj.BOYLAT), null);
    65                 this.add(getShapeButton(sparButton, 0, 96, 34, 32, "Spar", Shp.SPAR, Obj.BOYLAT), null);
    66                 this.add(getShapeButton(coneButton, 0, 128, 34, 32, "Cone", Shp.CONE, Obj.BOYLAT), null);
    67                 this.add(getShapeButton(floatButton, 35, 0, 34, 32, "Float", Shp.FLOAT, Obj.LITFLT), null);
    68                 this.add(getShapeButton(beaconButton, 35, 32, 34, 32, "Beacon", Shp.BEACON, Obj.BCNLAT), null);
    69                 this.add(getShapeButton(towerButton, 35, 64, 34, 32, "Tower", Shp.TOWER, Obj.BCNLAT), null);
    70                 this.add(getShapeButton(perchButton, 35, 96, 34, 32, "Perch", Shp.PERCH, Obj.BCNLAT), null);
     74                this.add(
     75                                getShapeButton(pillarButton, 0, 64, 34, 32, "Pillar", Shp.PILLAR,
     76                                                Obj.BOYLAT), null);
     77                this.add(
     78                                getShapeButton(sparButton, 0, 96, 34, 32, "Spar", Shp.SPAR, Obj.BOYLAT),
     79                                null);
     80                this.add(
     81                                getShapeButton(coneButton, 0, 128, 34, 32, "Cone", Shp.CONE, Obj.BOYLAT),
     82                                null);
     83                this.add(
     84                                getShapeButton(floatButton, 35, 0, 34, 32, "Float", Shp.FLOAT,
     85                                                Obj.LITFLT), null);
     86                this.add(
     87                                getShapeButton(beaconButton, 35, 32, 34, 32, "Beacon", Shp.BEACON,
     88                                                Obj.BCNLAT), null);
     89                this.add(
     90                                getShapeButton(towerButton, 35, 64, 34, 32, "Tower", Shp.TOWER,
     91                                                Obj.BCNLAT), null);
     92                this.add(
     93                                getShapeButton(perchButton, 35, 96, 34, 32, "Perch", Shp.PERCH,
     94                                                Obj.BCNLAT), null);
    7195        }
    7296
     
    76100        }
    77101
    78         private JRadioButton getRegionButton(JRadioButton button, int x, int y, int w, int h, String tip) {
     102        private JRadioButton getRegionButton(JRadioButton button, int x, int y,
     103                        int w, int h, String tip) {
    79104                button.setBounds(new Rectangle(x, y, w, h));
    80105                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
     
    85110        }
    86111
    87         private JRadioButton getShapeButton(JRadioButton button, int x, int y, int w, int h, String tip, Shp shp, Obj obj) {
     112        private JRadioButton getShapeButton(JRadioButton button, int x, int y, int w,
     113                        int h, String tip, Shp shp, Obj obj) {
    88114                button.setBounds(new Rectangle(x, y, w, h));
    89115                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelTop.java

    r26096 r26110  
    2323        public PanelCol panelCol = null;
    2424        private ButtonGroup topButtons = new ButtonGroup();
    25         public JRadioButton noTopButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/NoTopButton.png")));
    26         public JRadioButton canTopButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/CanTopButton.png")));
    27         public JRadioButton coneTopButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/ConeTopButton.png")));
    28         public JRadioButton sphereTopButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SphereTopButton.png")));
    29         public JRadioButton XTopButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/XTopButton.png")));
    30         public JRadioButton northTopButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/NorthTopButton.png")));
    31         public JRadioButton southTopButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SouthTopButton.png")));
    32         public JRadioButton eastTopButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/EastTopButton.png")));
    33         public JRadioButton westTopButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/WestTopButton.png")));
    34         public JRadioButton spheres2TopButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/Spheres2TopButton.png")));
    35         public JRadioButton boardDayButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/BoardDayButton.png")));
    36         public JRadioButton diamondDayButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/DiamondDayButton.png")));
    37         public JRadioButton triangleDayButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/TriangleDayButton.png")));
    38         public JRadioButton triangleInvDayButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/TriangleInvDayButton.png")));
    39         public JRadioButton squareDayButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SquareDayButton.png")));
    40         public JRadioButton circleDayButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/CircleDayButton.png")));
    41         public JRadioButton mooringTopButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/MooringTopButton.png")));
    42         private EnumMap<Top, JRadioButton> tops = new EnumMap<Top, JRadioButton>(Top.class);
    43         private EnumMap<Day, JRadioButton> days = new EnumMap<Day, JRadioButton>(Day.class);
     25        public JRadioButton noTopButton = new JRadioButton(new ImageIcon(getClass()
     26                        .getResource("/images/NoTopButton.png")));
     27        public JRadioButton canTopButton = new JRadioButton(new ImageIcon(getClass()
     28                        .getResource("/images/CanTopButton.png")));
     29        public JRadioButton coneTopButton = new JRadioButton(new ImageIcon(getClass()
     30                        .getResource("/images/ConeTopButton.png")));
     31        public JRadioButton sphereTopButton = new JRadioButton(new ImageIcon(
     32                        getClass().getResource("/images/SphereTopButton.png")));
     33        public JRadioButton XTopButton = new JRadioButton(new ImageIcon(getClass()
     34                        .getResource("/images/XTopButton.png")));
     35        public JRadioButton northTopButton = new JRadioButton(new ImageIcon(
     36                        getClass().getResource("/images/NorthTopButton.png")));
     37        public JRadioButton southTopButton = new JRadioButton(new ImageIcon(
     38                        getClass().getResource("/images/SouthTopButton.png")));
     39        public JRadioButton eastTopButton = new JRadioButton(new ImageIcon(getClass()
     40                        .getResource("/images/EastTopButton.png")));
     41        public JRadioButton westTopButton = new JRadioButton(new ImageIcon(getClass()
     42                        .getResource("/images/WestTopButton.png")));
     43        public JRadioButton spheres2TopButton = new JRadioButton(new ImageIcon(
     44                        getClass().getResource("/images/Spheres2TopButton.png")));
     45        public JRadioButton boardDayButton = new JRadioButton(new ImageIcon(
     46                        getClass().getResource("/images/BoardDayButton.png")));
     47        public JRadioButton diamondDayButton = new JRadioButton(new ImageIcon(
     48                        getClass().getResource("/images/DiamondDayButton.png")));
     49        public JRadioButton triangleDayButton = new JRadioButton(new ImageIcon(
     50                        getClass().getResource("/images/TriangleDayButton.png")));
     51        public JRadioButton triangleInvDayButton = new JRadioButton(new ImageIcon(
     52                        getClass().getResource("/images/TriangleInvDayButton.png")));
     53        public JRadioButton squareDayButton = new JRadioButton(new ImageIcon(
     54                        getClass().getResource("/images/SquareDayButton.png")));
     55        public JRadioButton circleDayButton = new JRadioButton(new ImageIcon(
     56                        getClass().getResource("/images/CircleDayButton.png")));
     57        public JRadioButton mooringTopButton = new JRadioButton(new ImageIcon(
     58                        getClass().getResource("/images/MooringTopButton.png")));
     59        private EnumMap<Top, JRadioButton> tops = new EnumMap<Top, JRadioButton>(
     60                        Top.class);
     61        private EnumMap<Day, JRadioButton> days = new EnumMap<Day, JRadioButton>(
     62                        Day.class);
    4463        private ActionListener alTop = new ActionListener() {
    4564                public void actionPerformed(java.awt.event.ActionEvent e) {
     
    7493                this.add(getTopButton(noTopButton, 40, 5, 27, 27, "NoTop", Top.NONE), null);
    7594                this.add(getTopButton(canTopButton, 70, 5, 27, 27, "CanTop", Top.CAN), null);
    76                 this.add(getTopButton(coneTopButton, 100, 5, 27, 27, "ConeTop", Top.CONE), null);
    77                 this.add(getTopButton(sphereTopButton, 130, 5, 27, 27, "SphereTop", Top.SPHERE), null);
    78                 this.add(getTopButton(XTopButton, 160, 5, 27, 27, "XTop", Top.X_SHAPE), null);
    79                 this.add(getTopButton(northTopButton, 40, 35, 27, 27, "NorthTop", Top.NORTH), null);
    80                 this.add(getTopButton(southTopButton, 70, 35, 27, 27, "SouthTop", Top.SOUTH), null);
    81                 this.add(getTopButton(eastTopButton, 100, 35, 27, 27, "EastTop", Top.EAST), null);
    82                 this.add(getTopButton(westTopButton, 130, 35, 27, 27, "WestTop", Top.WEST), null);
    83                 this.add(getTopButton(spheres2TopButton, 160, 35, 27, 27, "Spheres2Top", Top.SPHERES2), null);
    84                 this.add(getDayButton(boardDayButton, 40, 65, 27, 27, "BoardDay", Day.BOARD), null);
    85                 this.add(getDayButton(diamondDayButton, 70, 65, 27, 27, "DiamondDay", Day.DIAMOND), null);
    86                 this.add(getDayButton(triangleDayButton, 100, 65, 27, 27, "TriangleDay", Day.TRIANGLE), null);
    87                 this.add(getDayButton(triangleInvDayButton, 130, 65, 27, 27, "TriangleInvDay", Day.TRIANGLE_INV), null);
    88                 this.add(getDayButton(squareDayButton, 160, 65, 27, 27, "SquareDay", Day.SQUARE), null);
    89                 this.add(getDayButton(circleDayButton, 160, 95, 27, 27, "CircleDay", Day.CIRCLE), null);
    90                 this.add(getMoorButton(mooringTopButton, 40, 95, 27, 27, "MooringTop"), null);
     95                this.add(getTopButton(coneTopButton, 100, 5, 27, 27, "ConeTop", Top.CONE),
     96                                null);
     97                this.add(
     98                                getTopButton(sphereTopButton, 130, 5, 27, 27, "SphereTop", Top.SPHERE),
     99                                null);
     100                this.add(getTopButton(XTopButton, 160, 5, 27, 27, "XTop", Top.X_SHAPE),
     101                                null);
     102                this.add(
     103                                getTopButton(northTopButton, 40, 35, 27, 27, "NorthTop", Top.NORTH),
     104                                null);
     105                this.add(
     106                                getTopButton(southTopButton, 70, 35, 27, 27, "SouthTop", Top.SOUTH),
     107                                null);
     108                this.add(getTopButton(eastTopButton, 100, 35, 27, 27, "EastTop", Top.EAST),
     109                                null);
     110                this.add(getTopButton(westTopButton, 130, 35, 27, 27, "WestTop", Top.WEST),
     111                                null);
     112                this.add(
     113                                getTopButton(spheres2TopButton, 160, 35, 27, 27, "Spheres2Top",
     114                                                Top.SPHERES2), null);
     115                this.add(
     116                                getDayButton(boardDayButton, 40, 65, 27, 27, "BoardDay", Day.BOARD),
     117                                null);
     118                this.add(
     119                                getDayButton(diamondDayButton, 70, 65, 27, 27, "DiamondDay",
     120                                                Day.DIAMOND), null);
     121                this.add(
     122                                getDayButton(triangleDayButton, 100, 65, 27, 27, "TriangleDay",
     123                                                Day.TRIANGLE), null);
     124                this.add(
     125                                getDayButton(triangleInvDayButton, 130, 65, 27, 27, "TriangleInvDay",
     126                                                Day.TRIANGLE_INV), null);
     127                this.add(
     128                                getDayButton(squareDayButton, 160, 65, 27, 27, "SquareDay", Day.SQUARE),
     129                                null);
     130                this.add(
     131                                getDayButton(circleDayButton, 160, 95, 27, 27, "CircleDay", Day.CIRCLE),
     132                                null);
     133                this.add(getMoorButton(mooringTopButton, 40, 95, 27, 27, "MooringTop"),
     134                                null);
    91135        }
    92136
     
    98142
    99143        public void enableAll(boolean state) {
    100         for (JRadioButton button : tops.values()) {
     144                for (JRadioButton button : tops.values()) {
    101145                        button.setEnabled(state);
    102146                }
    103147        }
    104148
    105         private JRadioButton getTopButton(JRadioButton button, int x, int y, int w, int h, String tip, Top top) {
     149        private JRadioButton getTopButton(JRadioButton button, int x, int y, int w,
     150                        int h, String tip, Top top) {
    106151                button.setBounds(new Rectangle(x, y, w, h));
    107152                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
     
    110155                topButtons.add(button);
    111156                tops.put(top, button);
    112         return button;
    113 }
     157                return button;
     158        }
    114159
    115         private JRadioButton getDayButton(JRadioButton button, int x, int y, int w, int h, String tip, Day day) {
     160        private JRadioButton getDayButton(JRadioButton button, int x, int y, int w,
     161                        int h, String tip, Day day) {
    116162                button.setBounds(new Rectangle(x, y, w, h));
    117163                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
     
    120166                topButtons.add(button);
    121167                days.put(day, button);
    122         return button;
    123 }
     168                return button;
     169        }
    124170
    125         private JRadioButton getMoorButton(JRadioButton button, int x, int y, int w, int h, String tip) {
     171        private JRadioButton getMoorButton(JRadioButton button, int x, int y, int w,
     172                        int h, String tip) {
    126173                button.setBounds(new Rectangle(x, y, w, h));
    127174                button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
     
    129176                button.addActionListener(alTop);
    130177                topButtons.add(button);
    131         return button;
    132 }
     178                return button;
     179        }
    133180
    134181}
Note: See TracChangeset for help on using the changeset viewer.