Ignore:
Timestamp:
2010-12-09T23:48:49+01:00 (14 years ago)
Author:
postfix
Message:

PanelSearchPois added

Location:
applications/editors/josm/plugins/smed/plugs/harbour/src/harbour
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed/plugs/harbour/src/harbour/dialogs/HarbourAction.java

    r24574 r24677  
    6060        private JToggleButton chartButton = null;
    6161        private JPanel curPanel = null;
     62        private PanelSearchPois panelSearchPois = null;
    6263        private static LayerHarbour curLayer = new LayerHarbour("Harbour");
    6364       
    6465        public HarbourAction() {
     66                Rectangle rect = new Rectangle(2, 56, 330, 270);
     67               
    6568                panelGeneral= new PanelGeneral();
    66                 panelGeneral.setBounds(new Rectangle(2, 56, 330, 270));
     69                panelGeneral.setBounds(rect);
    6770                panelGeneral.setVisible(true);
    6871                curPanel = panelGeneral;
    6972               
    7073                panelLimits = new PanelLimits();
    71                 panelLimits.setBounds(new Rectangle(2, 56, 330, 270));
     74                panelLimits.setBounds(rect);
    7275                panelLimits.setVisible(false);
    7376               
    7477                panelServices = new PanelServices();
    75                 panelServices.setBounds(new Rectangle(2, 56, 330, 270));
     78                panelServices.setBounds(rect);
    7679                panelServices.setVisible(false);
    7780               
    7881                panelEnv = new PanelEnv();
    79                 panelEnv.setBounds(new Rectangle(2, 56, 330, 270));
     82                panelEnv.setBounds(rect);
    8083                panelEnv.setVisible(false);
    8184               
    8285                panelRelations = new PanelRelations();
    83                 panelRelations.setBounds(new Rectangle(2, 56, 330, 270));
     86                panelRelations.setBounds(rect);
    8487                panelRelations.setVisible(false);
     88               
     89                panelSearchPois = new PanelSearchPois();
     90                panelSearchPois.setBounds(rect);
     91                panelSearchPois.setVisible(false);
    8592        }
    8693       
     
    123130                        harbourPanel.add(panelEnv,        null);
    124131                        harbourPanel.add(panelRelations,  null);
     132                        harbourPanel.add(panelSearchPois, null);
    125133                        harbourPanel.add(getComButton(),  null);
    126134                        harbourPanel.add(getRestButton(), null);
     
    500508                        chartButton = new JToggleButton();
    501509                        chartButton.setBounds(new Rectangle(367, 5, 28, 18));
     510                        chartButton.setSelected(false);
    502511                        chartButton.setEnabled(false);
     512                        chartButton.addActionListener(new java.awt.event.ActionListener() {
     513                                public void actionPerformed(java.awt.event.ActionEvent e) {
     514                                        comButton.setEnabled(false);
     515                                        if(chartButton.isSelected()) {
     516                                                comButton.setEnabled(false);
     517                                                restButton.setEnabled(false);
     518                                                servButton.setEnabled(false);
     519                                                envButton.setEnabled(false);
     520                                                relButton.setEnabled(false);
     521                                               
     522                                                if(curPanel == panelEnv) {
     523                                                        panelEnv.setVisible(false);
     524                                                        panelSearchPois.setVisible(true);
     525                                                } else if(curPanel == panelRelations) panelRelations.setVisible(false);
     526                                        } else {
     527                                                comButton.setEnabled(true);
     528                                                restButton.setEnabled(true);
     529                                                servButton.setEnabled(true);
     530                                                envButton.setEnabled(true);
     531                                                relButton.setEnabled(true);
     532                                               
     533                                                if(curPanel == panelEnv) {
     534                                                        panelEnv.setVisible(true);
     535                                                        panelSearchPois.setVisible(false);
     536                                                } else if(curPanel == panelRelations) panelRelations.setVisible(true);
     537                                        }
     538                                }
     539                        });
    503540                }
    504541                return chartButton;
Note: See TracChangeset for help on using the changeset viewer.