コード例 #1
0
 private JPanel createAboutPanel([In] ProjectInfo obj0)
 {
   JPanel.__\u003Cclinit\u003E();
   JPanel jpanel = new JPanel((LayoutManager) new BorderLayout());
   AboutPanel.__\u003Cclinit\u003E();
   AboutPanel aboutPanel = new AboutPanel(this.application, this.version, this.copyright, this.info, this.logo);
   int num = 0;
   JTabbedPane jtabbedPane = new JTabbedPane();
   if (this.contributors != null)
   {
     ContributorsPanel.__\u003Cclinit\u003E();
     ContributorsPanel contributorsPanel = new ContributorsPanel(this.contributors);
     ((JComponent) contributorsPanel).setBorder(AboutDialog.__\u003C\u003ESTANDARD_BORDER);
     string @string = this.resources.getString("about-frame.tab.contributors");
     jtabbedPane.add(@string, (Component) contributorsPanel);
     num = 1;
   }
   if (this.licence != null)
   {
     JPanel licencePanel = this.createLicencePanel();
     ((JComponent) licencePanel).setBorder(AboutDialog.__\u003C\u003ESTANDARD_BORDER);
     string @string = this.resources.getString("about-frame.tab.licence");
     jtabbedPane.add(@string, (Component) licencePanel);
     num = 1;
   }
   if (obj0 != null)
   {
     LibraryPanel libraryPanel = new LibraryPanel(obj0);
     ((JComponent) libraryPanel).setBorder(AboutDialog.__\u003C\u003ESTANDARD_BORDER);
     string @string = this.resources.getString("about-frame.tab.libraries");
     jtabbedPane.add(@string, (Component) libraryPanel);
     num = 1;
   }
   ((Container) jpanel).add((Component) aboutPanel, (object) "North");
   if (num != 0)
     ((Container) jpanel).add((Component) jtabbedPane);
   return jpanel;
 }
コード例 #2
0
 private JTabbedPane createTabs([In] ProjectInfo obj0)
 {
   JTabbedPane jtabbedPane = new JTabbedPane();
   JPanel aboutPanel = this.createAboutPanel(obj0);
   ((JComponent) aboutPanel).setBorder(AboutDialog.__\u003C\u003ESTANDARD_BORDER);
   string string1 = this.resources.getString("about-frame.tab.about");
   jtabbedPane.add(string1, (Component) aboutPanel);
   SystemPropertiesPanel systemPropertiesPanel = new SystemPropertiesPanel();
   ((JComponent) systemPropertiesPanel).setBorder(AboutDialog.__\u003C\u003ESTANDARD_BORDER);
   string string2 = this.resources.getString("about-frame.tab.system");
   jtabbedPane.add(string2, (Component) systemPropertiesPanel);
   return jtabbedPane;
 }
コード例 #3
0
 public DefaultChartEditor([In] JFreeChart obj0)
 {
   base.\u002Ector();
   DefaultChartEditor defaultChartEditor = this;
   ((Container) this).setLayout((LayoutManager) new BorderLayout());
   JPanel.__\u003Cclinit\u003E();
   JPanel jpanel1 = new JPanel((LayoutManager) new BorderLayout());
   ((JComponent) jpanel1).setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
   JPanel.__\u003Cclinit\u003E();
   JPanel jpanel2 = new JPanel((LayoutManager) new BorderLayout());
   ((JComponent) jpanel2).setBorder((Border) BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), DefaultChartEditor.localizationResources.getString("General")));
   JPanel.__\u003Cclinit\u003E();
   JPanel jpanel3 = new JPanel((LayoutManager) new LCBLayout(6));
   ((JComponent) jpanel3).setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
   JCheckBox.__\u003Cclinit\u003E();
   this.antialias = new JCheckBox(DefaultChartEditor.localizationResources.getString("Draw_anti-aliased"));
   ((AbstractButton) this.antialias).setSelected(obj0.getAntiAlias());
   ((Container) jpanel3).add((Component) this.antialias);
   ((Container) jpanel3).add((Component) new JLabel(""));
   ((Container) jpanel3).add((Component) new JLabel(""));
   JPanel jpanel4 = jpanel3;
   JLabel.__\u003Cclinit\u003E();
   JLabel jlabel1 = new JLabel(DefaultChartEditor.localizationResources.getString("Background_paint"));
   ((Container) jpanel4).add((Component) jlabel1);
   PaintSample.__\u003Cclinit\u003E();
   this.background = new PaintSample(obj0.getBackgroundPaint());
   ((Container) jpanel3).add((Component) this.background);
   JButton.__\u003Cclinit\u003E();
   JButton jbutton1 = new JButton(DefaultChartEditor.localizationResources.getString("Select..."));
   ((AbstractButton) jbutton1).setActionCommand("BackgroundPaint");
   ((AbstractButton) jbutton1).addActionListener((ActionListener) this);
   ((Container) jpanel3).add((Component) jbutton1);
   JPanel jpanel5 = jpanel3;
   JLabel.__\u003Cclinit\u003E();
   JLabel jlabel2 = new JLabel(DefaultChartEditor.localizationResources.getString("Series_Paint"));
   ((Container) jpanel5).add((Component) jlabel2);
   JTextField.__\u003Cclinit\u003E();
   JTextField jtextField1 = new JTextField(DefaultChartEditor.localizationResources.getString("No_editor_implemented"));
   ((JComponent) jtextField1).setEnabled(false);
   ((Container) jpanel3).add((Component) jtextField1);
   JButton.__\u003Cclinit\u003E();
   JButton jbutton2 = new JButton(DefaultChartEditor.localizationResources.getString("Edit..."));
   ((AbstractButton) jbutton2).setEnabled(false);
   ((Container) jpanel3).add((Component) jbutton2);
   JPanel jpanel6 = jpanel3;
   JLabel.__\u003Cclinit\u003E();
   JLabel jlabel3 = new JLabel(DefaultChartEditor.localizationResources.getString("Series_Stroke"));
   ((Container) jpanel6).add((Component) jlabel3);
   JTextField.__\u003Cclinit\u003E();
   JTextField jtextField2 = new JTextField(DefaultChartEditor.localizationResources.getString("No_editor_implemented"));
   ((JComponent) jtextField2).setEnabled(false);
   ((Container) jpanel3).add((Component) jtextField2);
   JButton.__\u003Cclinit\u003E();
   JButton jbutton3 = new JButton(DefaultChartEditor.localizationResources.getString("Edit..."));
   ((AbstractButton) jbutton3).setEnabled(false);
   ((Container) jpanel3).add((Component) jbutton3);
   JPanel jpanel7 = jpanel3;
   JLabel.__\u003Cclinit\u003E();
   JLabel jlabel4 = new JLabel(DefaultChartEditor.localizationResources.getString("Series_Outline_Paint"));
   ((Container) jpanel7).add((Component) jlabel4);
   JTextField.__\u003Cclinit\u003E();
   JTextField jtextField3 = new JTextField(DefaultChartEditor.localizationResources.getString("No_editor_implemented"));
   ((JComponent) jtextField3).setEnabled(false);
   ((Container) jpanel3).add((Component) jtextField3);
   JButton.__\u003Cclinit\u003E();
   JButton jbutton4 = new JButton(DefaultChartEditor.localizationResources.getString("Edit..."));
   ((AbstractButton) jbutton4).setEnabled(false);
   ((Container) jpanel3).add((Component) jbutton4);
   JPanel jpanel8 = jpanel3;
   JLabel.__\u003Cclinit\u003E();
   JLabel jlabel5 = new JLabel(DefaultChartEditor.localizationResources.getString("Series_Outline_Stroke"));
   ((Container) jpanel8).add((Component) jlabel5);
   JTextField.__\u003Cclinit\u003E();
   JTextField jtextField4 = new JTextField(DefaultChartEditor.localizationResources.getString("No_editor_implemented"));
   ((JComponent) jtextField4).setEnabled(false);
   ((Container) jpanel3).add((Component) jtextField4);
   JButton.__\u003Cclinit\u003E();
   JButton jbutton5 = new JButton(DefaultChartEditor.localizationResources.getString("Edit..."));
   ((AbstractButton) jbutton5).setEnabled(false);
   ((Container) jpanel3).add((Component) jbutton5);
   ((Container) jpanel2).add((Component) jpanel3, (object) "North");
   ((Container) jpanel1).add((Component) jpanel2, (object) "North");
   JPanel.__\u003Cclinit\u003E();
   JPanel jpanel9 = new JPanel((LayoutManager) new BorderLayout());
   TextTitle title = obj0.getTitle();
   Plot plot = obj0.getPlot();
   JTabbedPane jtabbedPane = new JTabbedPane();
   this.titleEditor = new DefaultTitleEditor((Title) title);
   ((JComponent) this.titleEditor).setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
   jtabbedPane.addTab(DefaultChartEditor.localizationResources.getString("Title"), (Component) this.titleEditor);
   this.plotEditor = new DefaultPlotEditor(plot);
   ((JComponent) this.plotEditor).setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
   jtabbedPane.addTab(DefaultChartEditor.localizationResources.getString("Plot"), (Component) this.plotEditor);
   jtabbedPane.add(DefaultChartEditor.localizationResources.getString("Other"), (Component) jpanel1);
   ((Container) jpanel9).add((Component) jtabbedPane, (object) "North");
   ((Container) this).add((Component) jpanel9);
 }
コード例 #4
0
        /// <summary>
        /// Sets up the GUI.
        /// </summary>
        private void setupGUI()
        {
            __xdgSimpleJComboBox = new SimpleJComboBox();

//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") java.util.List<StateMod_Diversion> diversionsVector = (java.util.List<StateMod_Diversion>) __dataset.getComponentForComponentType(StateMod_DataSet.COMP_DIVERSION_STATIONS).getData();
            IList <StateMod_Diversion> diversionsVector = (IList <StateMod_Diversion>)__dataset.getComponentForComponentType(StateMod_DataSet.COMP_DIVERSION_STATIONS).getData();
            IList <string>             list_names       = StateMod_Util.createIdentifierListFromStateModData(diversionsVector, true, null);
            int size = list_names.Count;

            for (int i = 0; i < size; i++)
            {
                __xdgSimpleJComboBox.add(list_names[i] + " - Diversion");
            }

//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") java.util.List<StateMod_InstreamFlow> instreamFlowsVector = (java.util.List<StateMod_InstreamFlow>) __dataset.getComponentForComponentType(StateMod_DataSet.COMP_INSTREAM_STATIONS).getData();
            IList <StateMod_InstreamFlow> instreamFlowsVector = (IList <StateMod_InstreamFlow>)__dataset.getComponentForComponentType(StateMod_DataSet.COMP_INSTREAM_STATIONS).getData();

            list_names = StateMod_Util.createIdentifierListFromStateModData(instreamFlowsVector, true, null);
            size       = list_names.Count;
            for (int i = 0; i < size; i++)
            {
                __xdgSimpleJComboBox.add(list_names[i] + " - Instream Flow");
            }

//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") java.util.List<StateMod_StreamGage> gageVector = (java.util.List<StateMod_StreamGage>) __dataset.getComponentForComponentType(StateMod_DataSet.COMP_STREAMGAGE_STATIONS).getData();
            IList <StateMod_StreamGage> gageVector = (IList <StateMod_StreamGage>)__dataset.getComponentForComponentType(StateMod_DataSet.COMP_STREAMGAGE_STATIONS).getData();

            list_names = StateMod_Util.createIdentifierListFromStateModData(gageVector, true, null);
            size       = list_names.Count;
            for (int i = 0; i < size; i++)
            {
                __xdgSimpleJComboBox.add(list_names[i] + " - Stream Gage");
            }

//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") java.util.List<StateMod_StreamEstimate> estimateVector = (java.util.List<StateMod_StreamEstimate>) __dataset.getComponentForComponentType(StateMod_DataSet.COMP_STREAMESTIMATE_STATIONS).getData();
            IList <StateMod_StreamEstimate> estimateVector = (IList <StateMod_StreamEstimate>)__dataset.getComponentForComponentType(StateMod_DataSet.COMP_STREAMESTIMATE_STATIONS).getData();

            list_names = StateMod_Util.createIdentifierListFromStateModData(estimateVector, true, null);
            size       = list_names.Count;
            for (int i = 0; i < size; i++)
            {
                __xdgSimpleJComboBox.add(list_names[i] + " - Stream Estimate");
            }

//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") java.util.List<StateMod_Reservoir> reservoirsVector = (java.util.List<StateMod_Reservoir>) __dataset.getComponentForComponentType(StateMod_DataSet.COMP_RESERVOIR_STATIONS).getData();
            IList <StateMod_Reservoir> reservoirsVector = (IList <StateMod_Reservoir>)__dataset.getComponentForComponentType(StateMod_DataSet.COMP_RESERVOIR_STATIONS).getData();

            list_names           = StateMod_Util.createIdentifierListFromStateModData(reservoirsVector, true, null);
            size                 = list_names.Count;
            __xrgSimpleJComboBox = new SimpleJComboBox();
            for (int i = 0; i < size; i++)
            {
                __xrgSimpleJComboBox.add(list_names[i] + " - Reservoir");
            }

//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") java.util.List<StateMod_Well> wellsVector = (java.util.List<StateMod_Well>) __dataset.getComponentForComponentType(StateMod_DataSet.COMP_WELL_STATIONS).getData();
            IList <StateMod_Well> wellsVector = (IList <StateMod_Well>)__dataset.getComponentForComponentType(StateMod_DataSet.COMP_WELL_STATIONS).getData();

            list_names           = StateMod_Util.createIdentifierListFromStateModData(wellsVector, true, null);
            size                 = list_names.Count;
            __xwgSimpleJComboBox = new SimpleJComboBox();
            for (int i = 0; i < size; i++)
            {
                __xwgSimpleJComboBox.add(list_names[i] + " - Well");
            }

            // Define the button groups and add radio buttons to the group in the
            // order of the GUI...

            __general_ButtonGroup = new ButtonGroup();
            __general_ButtonGroup.add(__xstJRadioButton = new JRadioButton("-xst", false));
            __general_ButtonGroup.add(__xwbJRadioButton = new JRadioButton("-xwb", true));
            __general_ButtonGroup.add(__xwrJRadioButton = new JRadioButton("-xwr", false));
            __general_ButtonGroup.add(__xcuJRadioButton = new JRadioButton("-xcu", false));
            __compare_ButtonGroup = new ButtonGroup();
            __compare_ButtonGroup.add(__xdcJRadioButton = new JRadioButton("-xdc", true));
            __compare_ButtonGroup.add(__xrcJRadioButton = new JRadioButton("-xrc", false));
            __compare_ButtonGroup.add(__xwcJRadioButton = new JRadioButton("-xwc", false));
            __compare_ButtonGroup.add(__xscJRadioButton = new JRadioButton("-xsc", false));
            __graph_ButtonGroup = new ButtonGroup();
            __graph_ButtonGroup.add(__xdgJRadioButton = new JRadioButton("-xdg", true));
            __graph_ButtonGroup.add(__xrgJRadioButton = new JRadioButton("-xrg", false));
            __graph_ButtonGroup.add(__xwgJRadioButton = new JRadioButton("-xwg", false));
            __daily_ButtonGroup = new ButtonGroup();
            __daily_ButtonGroup.add(__xdyJRadioButton = new JRadioButton("-xdy", true));
            __daily_ButtonGroup.add(__xryJRadioButton = new JRadioButton("-xry", false));
            __daily_ButtonGroup.add(__xwyJRadioButton = new JRadioButton("-xwy", false));
            __other_ButtonGroup = new ButtonGroup();
            __other_ButtonGroup.add(__xnmJRadioButton = new JRadioButton("-xnm", true));
            __other_ButtonGroup.add(__xrxJRadioButton = new JRadioButton("-xrx", false));
            __other_ButtonGroup.add(__xspJRadioButton = new JRadioButton("-xsp", false));
            __other_ButtonGroup.add(__xbnJRadioButton = new JRadioButton("-xbn", false));

            // Set the selected item in the graph output, based on whether data
            // exists...

            bool something_selected = false;     // To help select a radio button

            if (__xdgSimpleJComboBox.getItemCount() == 0)
            {
                __xdgSimpleJComboBox.setEnabled(false);
            }
            else
            {
                __xdgSimpleJComboBox.select(0);
                __xdgJRadioButton.setSelected(true);
                something_selected = true;
            }
            if (__xrgSimpleJComboBox.getItemCount() == 0)
            {
                __xrgSimpleJComboBox.setEnabled(false);
            }
            else
            {
                __xrgSimpleJComboBox.select(0);
                if (!something_selected)
                {
                    __xrgJRadioButton.setSelected(true);
                    something_selected = true;
                }
            }
            if (__xwgSimpleJComboBox.getItemCount() == 0)
            {
                __xwgSimpleJComboBox.setEnabled(false);
            }
            else
            {
                __xwgSimpleJComboBox.select(0);
                if (!something_selected)
                {
                    __xwgJRadioButton.setSelected(true);
                }
            }

            __runStateModJButton = new JButton(__BUTTON_RUN_REPORT);
            __cancelJButton      = new JButton(__BUTTON_CANCEL);
            // REVISIT - enable when full help system is redesigned
            //__helpJButton = new JButton(__BUTTON_HELP);

            GridBagLayout gb        = new GridBagLayout();
            JPanel        mainPanel = new JPanel();

            mainPanel.setLayout(gb);

            int col1 = 0;
            int col2 = 1;
            int col3 = 2;
            int y;
            int bound = 2;     // buffer around components.

            __main_JTabbedPane = new JTabbedPane();

            __general_JPanel = new JPanel();
            __general_JPanel.setLayout(gb);
            __compare_JPanel = new JPanel();
            __compare_JPanel.setLayout(gb);
            __graph_JPanel = new JPanel();
            __graph_JPanel.setLayout(gb);
            __daily_JPanel = new JPanel();
            __daily_JPanel.setLayout(gb);
            __other_JPanel = new JPanel();
            __other_JPanel.setLayout(gb);

            /////////////////////////////////////////////////////////////
            // general panel
            /////////////////////////////////////////////////////////////
            y = 0;
            JGUIUtil.addComponent(__general_JPanel, new JLabel("Select one of the following report options." + "  Output files will have the extensions shown."), col1, y, 3, 1, 0, 0, 0, 0, bound, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            JGUIUtil.addComponent(__general_JPanel, __xstJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xstJLabel1 = new JLabel("Direct and Instream Flow Data (*.xdd)");
            __xstJLabel1.addMouseListener(this);
            JGUIUtil.addComponent(__general_JPanel, __xstJLabel1, col2, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xstJLabel2 = new JLabel("Reservoir Data - Total and by Account " + "(*.xre)");
            __xstJLabel2.addMouseListener(this);
            JGUIUtil.addComponent(__general_JPanel, __xstJLabel2, col2, ++y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xstJLabel3 = new JLabel("Operation Right Summary (*.xop)");
            __xstJLabel3.addMouseListener(this);
            JGUIUtil.addComponent(__general_JPanel, __xstJLabel3, col2, ++y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xstJLabel4 = new JLabel("Instream Flow Reach Summary (*.xir)");
            __xstJLabel4.addMouseListener(this);
            JGUIUtil.addComponent(__general_JPanel, __xstJLabel4, col2, ++y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xstJLabel5 = new JLabel("Well Summary (*.xwe)");
            __xstJLabel5.addMouseListener(this);
            JGUIUtil.addComponent(__general_JPanel, __xstJLabel5, col2, ++y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__general_JPanel, __xwbJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xwbJLabel = new JLabel("Water balance (*.xwb) and " + "Ground Water Balance (*.xgw)");
            __xwbJLabel.addMouseListener(this);
            JGUIUtil.addComponent(__general_JPanel, __xwbJLabel, col2, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__general_JPanel, __xwrJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xwrJLabel = new JLabel("Water rights list, sorted by basin " + "rank (*.xwr)");
            __xwrJLabel.addMouseListener(this);
            JGUIUtil.addComponent(__general_JPanel, __xwrJLabel, col2, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__general_JPanel, __xcuJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xcuJLabel1 = new JLabel("Simulated Diversions and " + "Consumptive Use (*.xcu)");
            __xcuJLabel1.addMouseListener(this);
            JGUIUtil.addComponent(__general_JPanel, __xcuJLabel1, col2, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xcuJLabel2 = new JLabel("Water supply summary (*.xsu)");
            __xcuJLabel2.addMouseListener(this);
            JGUIUtil.addComponent(__general_JPanel, __xcuJLabel2, col2, ++y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xcuJLabel3 = new JLabel("Shortage Summary (*.xsh)");
            __xcuJLabel3.addMouseListener(this);
            JGUIUtil.addComponent(__general_JPanel, __xcuJLabel3, col2, ++y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xcuJLabel4 = new JLabel("CU by Water District (*.xwd)");
            __xcuJLabel4.addMouseListener(this);
            JGUIUtil.addComponent(__general_JPanel, __xcuJLabel4, col2, ++y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            /////////////////////////////////////////////////////////////
            // compare panel
            /////////////////////////////////////////////////////////////
            y = 0;
            JGUIUtil.addComponent(__compare_JPanel, new JLabel("Select one of the following report options." + "  Output files will have the extensions shown."), col1, y, 3, 1, 0, 0, 0, 0, bound, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__compare_JPanel, __xdcJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xdcJLabel = new JLabel("Diversion comparison (*.xdc)");
            __xdcJLabel.addMouseListener(this);
            JGUIUtil.addComponent(__compare_JPanel, __xdcJLabel, col2, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__compare_JPanel, __xrcJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xrcJLabel = new JLabel("Reservoir comparison (*.xrc)");
            __xrcJLabel.addMouseListener(this);
            JGUIUtil.addComponent(__compare_JPanel, __xrcJLabel, col2, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__compare_JPanel, __xwcJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xwcJLabel = new JLabel("Well comparison (*.xwc)");
            __xwcJLabel.addMouseListener(this);
            JGUIUtil.addComponent(__compare_JPanel, __xwcJLabel, col2, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__compare_JPanel, __xscJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xscJLabel = new JLabel("Stream flow gage comparison (*.xsc)");
            __xscJLabel.addMouseListener(this);
            JGUIUtil.addComponent(__compare_JPanel, __xscJLabel, col2, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            /////////////////////////////////////////////////////////////
            // graph panel
            /////////////////////////////////////////////////////////////
            y = 0;
            JGUIUtil.addComponent(__graph_JPanel, new JLabel("Select one of the following report options." + "  Output files will have the extensions shown."), col1, y, 3, 1, 0, 0, 0, 0, bound, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__graph_JPanel, __xdgJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            JGUIUtil.addComponent(__graph_JPanel, __xdgSimpleJComboBox, col2, y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.BOTH, GridBagConstraints.WEST);
            __xdgSimpleJComboBox.addMouseListener(this);
            __xdgJLabel = new JLabel("Direct diversion, instream flow and " + "gage graph (*.xdg)");
            __xdgJLabel.addMouseListener(this);
            JGUIUtil.addComponent(__graph_JPanel, __xdgJLabel, col3, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__graph_JPanel, __xrgJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            JGUIUtil.addComponent(__graph_JPanel, __xrgSimpleJComboBox, col2, y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.BOTH, GridBagConstraints.WEST);
            __xrgSimpleJComboBox.addMouseListener(this);
            __xrgJLabel = new JLabel("Reservoir graph (*.xrg)");
            __xrgJLabel.addMouseListener(this);
            JGUIUtil.addComponent(__graph_JPanel, __xrgJLabel, col3, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__graph_JPanel, __xwgJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            JGUIUtil.addComponent(__graph_JPanel, __xwgSimpleJComboBox, col2, y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.BOTH, GridBagConstraints.WEST);
            __xwgSimpleJComboBox.addMouseListener(this);
            __xwgJLabel = new JLabel("Well graph (*.xwg)");
            __xwgJLabel.addMouseListener(this);
            JGUIUtil.addComponent(__graph_JPanel, __xwgJLabel, col3, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);


            /////////////////////////////////////////////////////////////
            // daily panel
            /////////////////////////////////////////////////////////////
            y = 0;
            JGUIUtil.addComponent(__daily_JPanel, new JLabel("Select one of the following report options." + "  Output files will have the extensions shown."), col1, y, 3, 1, 0, 0, 0, 0, bound, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__daily_JPanel, __xdyJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xdyJLabel = new JLabel("Daily Direct Diversion and Instream Flow Data" + " (*.xdy)");
            __xdyJLabel.addMouseListener(this);
            JGUIUtil.addComponent(__daily_JPanel, __xdyJLabel, col2, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__daily_JPanel, __xryJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xryJLabel = new JLabel("Daily Reservoir Data (*.xry)");
            __xryJLabel.addMouseListener(this);
            JGUIUtil.addComponent(__daily_JPanel, __xryJLabel, col2, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__daily_JPanel, __xwyJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xwyJLabel = new JLabel("Daily Well Data (*.xwy)");
            __xwyJLabel.addMouseListener(this);
            JGUIUtil.addComponent(__daily_JPanel, __xwyJLabel, col2, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            /////////////////////////////////////////////////////////////
            // other panel
            /////////////////////////////////////////////////////////////
            y = 0;
            JGUIUtil.addComponent(__other_JPanel, new JLabel("Select one of the following report options." + "  Output files will have the extensions shown."), col1, y, 3, 1, 0, 0, 0, 0, bound, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__other_JPanel, __xnmJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xnmJLabel1 = new JLabel("Detailed Node Accounting, monthly (*.xnm) and ");
            __xnmJLabel1.addMouseListener(this);
            JGUIUtil.addComponent(__other_JPanel, __xnmJLabel1, col3, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xnmJLabel2 = new JLabel("Summary Node Accounting, average (*.xna)");
            __xnmJLabel2.addMouseListener(this);
            JGUIUtil.addComponent(__other_JPanel, __xnmJLabel2, col3, ++y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__other_JPanel, __xrxJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xrxJLabel = new JLabel("River data summary (*.xrx)");
            __xrxJLabel.addMouseListener(this);
            JGUIUtil.addComponent(__other_JPanel, __xrxJLabel, col3, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__other_JPanel, __xspJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xspJLabel = new JLabel("Selected parameter printout," + " uses output control file (*.xsp)");
            __xspJLabel.addMouseListener(this);
            JGUIUtil.addComponent(__other_JPanel, __xspJLabel, col3, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            JGUIUtil.addComponent(__other_JPanel, __xbnJRadioButton, col1, ++y, 1, 1, 0, 0, 0, 0, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);
            __xbnJLabel = new JLabel("ASCII listing of Binary Direct and " + "Instream Data (*.xbn)");
            __xbnJLabel.addMouseListener(this);
            JGUIUtil.addComponent(__other_JPanel, __xbnJLabel, col3, y, 1, 1, 0, 0, 0, bound, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST);

            __main_JTabbedPane.add("General", __general_JPanel);
            __main_JTabbedPane.add("Compare", __compare_JPanel);
            __main_JTabbedPane.add("Graph", __graph_JPanel);
            __main_JTabbedPane.add("Daily", __daily_JPanel);
            __main_JTabbedPane.add("Other", __other_JPanel);

            getContentPane().add("Center", __main_JTabbedPane);

            // add buttons
            JPanel p1 = new JPanel();

            p1.add(__runStateModJButton);
            p1.add(__cancelJButton);
            // REVISIT - add when full help system is redesigned.
            //p1.add(__helpJButton);
            //__helpJButton.setEnabled(false);
            //__helpJButton.addActionListener(this);
            __runStateModJButton.addActionListener(this);
            __cancelJButton.addActionListener(this);

            getContentPane().add("South", p1);

            if (__dataset_wm != null)
            {
                __dataset_wm.setWindowOpen(StateMod_DataSet_WindowManager.WINDOW_RUN_REPORT, this);
            }

            pack();
            JGUIUtil.center(this);
            setVisible(true);
        }
コード例 #5
0
 public DefaultPlotEditor([In] Plot obj0)
 {
   base.\u002Ector();
   DefaultPlotEditor defaultPlotEditor = this;
   this.plotInsets = obj0.getInsets();
   PaintSample.__\u003Cclinit\u003E();
   this.backgroundPaintSample = new PaintSample(obj0.getBackgroundPaint());
   StrokeSample.__\u003Cclinit\u003E();
   this.outlineStrokeSample = new StrokeSample(obj0.getOutlineStroke());
   PaintSample.__\u003Cclinit\u003E();
   this.outlinePaintSample = new PaintSample(obj0.getOutlinePaint());
   if (obj0 is CategoryPlot)
     this.plotOrientation = ((CategoryPlot) obj0).getOrientation();
   else if (obj0 is XYPlot)
     this.plotOrientation = ((XYPlot) obj0).getOrientation();
   if (obj0 is CategoryPlot)
   {
     CategoryItemRenderer renderer = ((CategoryPlot) obj0).getRenderer();
     if (renderer is LineAndShapeRenderer)
     {
       LineAndShapeRenderer andShapeRenderer = (LineAndShapeRenderer) renderer;
       this.drawLines = BooleanUtilities.valueOf(andShapeRenderer.getBaseLinesVisible());
       this.drawShapes = BooleanUtilities.valueOf(andShapeRenderer.getBaseShapesVisible());
     }
   }
   else if (obj0 is XYPlot)
   {
     XYItemRenderer renderer = ((XYPlot) obj0).getRenderer();
     if (renderer is StandardXYItemRenderer)
     {
       StandardXYItemRenderer standardXyItemRenderer = (StandardXYItemRenderer) renderer;
       this.drawLines = BooleanUtilities.valueOf(standardXyItemRenderer.getPlotLines());
       this.drawShapes = BooleanUtilities.valueOf(standardXyItemRenderer.getBaseShapesVisible());
     }
   }
   ((Container) this).setLayout((LayoutManager) new BorderLayout());
   this.availableStrokeSamples = new StrokeSample[4];
   this.availableStrokeSamples[0] = new StrokeSample((Stroke) null);
   StrokeSample[] strokeSampleArray1 = this.availableStrokeSamples;
   int index1 = 1;
   StrokeSample.__\u003Cclinit\u003E();
   StrokeSample strokeSample1 = new StrokeSample((Stroke) new BasicStroke(1f));
   strokeSampleArray1[index1] = strokeSample1;
   StrokeSample[] strokeSampleArray2 = this.availableStrokeSamples;
   int index2 = 2;
   StrokeSample.__\u003Cclinit\u003E();
   StrokeSample strokeSample2 = new StrokeSample((Stroke) new BasicStroke(2f));
   strokeSampleArray2[index2] = strokeSample2;
   StrokeSample[] strokeSampleArray3 = this.availableStrokeSamples;
   int index3 = 3;
   StrokeSample.__\u003Cclinit\u003E();
   StrokeSample strokeSample3 = new StrokeSample((Stroke) new BasicStroke(3f));
   strokeSampleArray3[index3] = strokeSample3;
   JPanel.__\u003Cclinit\u003E();
   JPanel jpanel1 = new JPanel((LayoutManager) new BorderLayout());
   ((JComponent) jpanel1).setBorder((Border) BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), new StringBuffer().append(obj0.getPlotType()).append(DefaultPlotEditor.localizationResources.getString(":")).toString()));
   JPanel.__\u003Cclinit\u003E();
   JPanel jpanel2 = new JPanel((LayoutManager) new BorderLayout());
   ((JComponent) jpanel2).setBorder((Border) BorderFactory.createTitledBorder(DefaultPlotEditor.localizationResources.getString("General")));
   JPanel.__\u003Cclinit\u003E();
   JPanel jpanel3 = new JPanel((LayoutManager) new LCBLayout(7));
   ((JComponent) jpanel3).setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
   JPanel jpanel4 = jpanel3;
   JLabel.__\u003Cclinit\u003E();
   JLabel jlabel1 = new JLabel(DefaultPlotEditor.localizationResources.getString("Outline_stroke"));
   ((Container) jpanel4).add((Component) jlabel1);
   JButton.__\u003Cclinit\u003E();
   JButton jbutton1 = new JButton(DefaultPlotEditor.localizationResources.getString("Select..."));
   ((AbstractButton) jbutton1).setActionCommand("OutlineStroke");
   ((AbstractButton) jbutton1).addActionListener((ActionListener) this);
   ((Container) jpanel3).add((Component) this.outlineStrokeSample);
   ((Container) jpanel3).add((Component) jbutton1);
   JPanel jpanel5 = jpanel3;
   JLabel.__\u003Cclinit\u003E();
   JLabel jlabel2 = new JLabel(DefaultPlotEditor.localizationResources.getString("Outline_Paint"));
   ((Container) jpanel5).add((Component) jlabel2);
   JButton.__\u003Cclinit\u003E();
   JButton jbutton2 = new JButton(DefaultPlotEditor.localizationResources.getString("Select..."));
   ((AbstractButton) jbutton2).setActionCommand("OutlinePaint");
   ((AbstractButton) jbutton2).addActionListener((ActionListener) this);
   ((Container) jpanel3).add((Component) this.outlinePaintSample);
   ((Container) jpanel3).add((Component) jbutton2);
   JPanel jpanel6 = jpanel3;
   JLabel.__\u003Cclinit\u003E();
   JLabel jlabel3 = new JLabel(DefaultPlotEditor.localizationResources.getString("Background_paint"));
   ((Container) jpanel6).add((Component) jlabel3);
   JButton.__\u003Cclinit\u003E();
   JButton jbutton3 = new JButton(DefaultPlotEditor.localizationResources.getString("Select..."));
   ((AbstractButton) jbutton3).setActionCommand("BackgroundPaint");
   ((AbstractButton) jbutton3).addActionListener((ActionListener) this);
   ((Container) jpanel3).add((Component) this.backgroundPaintSample);
   ((Container) jpanel3).add((Component) jbutton3);
   if (this.plotOrientation != null)
   {
     int num = !this.plotOrientation.equals((object) PlotOrientation.__\u003C\u003EVERTICAL) ? 1 : 0;
     JPanel jpanel7 = jpanel3;
     JLabel.__\u003Cclinit\u003E();
     JLabel jlabel4 = new JLabel(DefaultPlotEditor.localizationResources.getString("Orientation"));
     ((Container) jpanel7).add((Component) jlabel4);
     JComboBox.__\u003Cclinit\u003E();
     this.orientationCombo = new JComboBox((object[]) DefaultPlotEditor.orientationNames);
     this.orientationCombo.setSelectedIndex(num);
     this.orientationCombo.setActionCommand("Orientation");
     this.orientationCombo.addActionListener((ActionListener) this);
     ((Container) jpanel3).add((Component) new JPanel());
     ((Container) jpanel3).add((Component) this.orientationCombo);
   }
   if (this.drawLines != null)
   {
     JPanel jpanel7 = jpanel3;
     JLabel.__\u003Cclinit\u003E();
     JLabel jlabel4 = new JLabel(DefaultPlotEditor.localizationResources.getString("Draw_lines"));
     ((Container) jpanel7).add((Component) jlabel4);
     this.drawLinesCheckBox = new JCheckBox();
     ((AbstractButton) this.drawLinesCheckBox).setSelected(this.drawLines.booleanValue());
     ((AbstractButton) this.drawLinesCheckBox).setActionCommand("DrawLines");
     ((AbstractButton) this.drawLinesCheckBox).addActionListener((ActionListener) this);
     ((Container) jpanel3).add((Component) new JPanel());
     ((Container) jpanel3).add((Component) this.drawLinesCheckBox);
   }
   if (this.drawShapes != null)
   {
     JPanel jpanel7 = jpanel3;
     JLabel.__\u003Cclinit\u003E();
     JLabel jlabel4 = new JLabel(DefaultPlotEditor.localizationResources.getString("Draw_shapes"));
     ((Container) jpanel7).add((Component) jlabel4);
     this.drawShapesCheckBox = new JCheckBox();
     ((AbstractButton) this.drawShapesCheckBox).setSelected(this.drawShapes.booleanValue());
     ((AbstractButton) this.drawShapesCheckBox).setActionCommand("DrawShapes");
     ((AbstractButton) this.drawShapesCheckBox).addActionListener((ActionListener) this);
     ((Container) jpanel3).add((Component) new JPanel());
     ((Container) jpanel3).add((Component) this.drawShapesCheckBox);
   }
   ((Container) jpanel2).add((Component) jpanel3, (object) "North");
   JPanel.__\u003Cclinit\u003E();
   JPanel jpanel8 = new JPanel((LayoutManager) new BorderLayout());
   ((JComponent) jpanel8).setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
   ((Container) jpanel8).add((Component) jpanel2, (object) "North");
   JTabbedPane jtabbedPane = new JTabbedPane();
   ((JComponent) jtabbedPane).setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
   Axis axis = (Axis) null;
   if (obj0 is CategoryPlot)
     axis = (Axis) ((CategoryPlot) obj0).getDomainAxis();
   else if (obj0 is XYPlot)
     axis = (Axis) ((XYPlot) obj0).getDomainAxis();
   this.domainAxisPropertyPanel = DefaultAxisEditor.getInstance(axis);
   if (this.domainAxisPropertyPanel != null)
   {
     ((JComponent) this.domainAxisPropertyPanel).setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
     jtabbedPane.add(DefaultPlotEditor.localizationResources.getString("Domain_Axis"), (Component) this.domainAxisPropertyPanel);
   }
   ValueAxis valueAxis = (ValueAxis) null;
   if (obj0 is CategoryPlot)
     valueAxis = ((CategoryPlot) obj0).getRangeAxis();
   else if (obj0 is XYPlot)
     valueAxis = ((XYPlot) obj0).getRangeAxis();
   this.rangeAxisPropertyPanel = DefaultAxisEditor.getInstance((Axis) valueAxis);
   if (this.rangeAxisPropertyPanel != null)
   {
     ((JComponent) this.rangeAxisPropertyPanel).setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
     jtabbedPane.add(DefaultPlotEditor.localizationResources.getString("Range_Axis"), (Component) this.rangeAxisPropertyPanel);
   }
   ColorBar colorBar = (ColorBar) null;
   if (obj0 is ContourPlot)
     colorBar = ((ContourPlot) obj0).getColorBar();
   this.colorBarAxisPropertyPanel = DefaultColorBarEditor.getInstance(colorBar);
   if (this.colorBarAxisPropertyPanel != null)
   {
     ((JComponent) this.colorBarAxisPropertyPanel).setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
     jtabbedPane.add(DefaultPlotEditor.localizationResources.getString("Color_Bar"), (Component) this.colorBarAxisPropertyPanel);
   }
   jtabbedPane.add(DefaultPlotEditor.localizationResources.getString("Appearance"), (Component) jpanel8);
   ((Container) jpanel1).add((Component) jtabbedPane);
   ((Container) this).add((Component) jpanel1);
 }