⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 preferencesdialog.java

📁 FuncPlotter is a combined Java application and applet for displaying two-dimensional plots of explic
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
        gbc.gridx = 2;        gbc.gridy = 0;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_START;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = new Insets( 0, 4, 0, 0 );        gridBag.setConstraints( fixedPointUpperLimitSpinner, gbc );        fixedPointRangePanel.add( fixedPointUpperLimitSpinner );        gbc.gridx = 1;        gbc.gridy = gridY++;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_START;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = AppConstants.COMPONENT_INSETS;        gridBag.setConstraints( fixedPointRangePanel, gbc );        controlPanel.add( fixedPointRangePanel );        // Label: normalise scientific notation        JLabel normaliseSciNotationLabel = new FLabel( NORMALISE_SCI_NOTATION_STR );        gbc.gridx = 0;        gbc.gridy = gridY;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_END;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = AppConstants.COMPONENT_INSETS;        gridBag.setConstraints( normaliseSciNotationLabel, gbc );        controlPanel.add( normaliseSciNotationLabel );        // Combo box: normalise scientific notation        normaliseSciNotationComboBox = new BooleanComboBox( config.isPlotNormaliseScientificNotation( ) );        gbc.gridx = 1;        gbc.gridy = gridY++;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_START;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = AppConstants.COMPONENT_INSETS;        gridBag.setConstraints( normaliseSciNotationComboBox, gbc );        controlPanel.add( normaliseSciNotationComboBox );        //----  Plot colours panel        JPanel plotColoursPanel = new JPanel( gridBag );        TitledBorder.setPaddedBorder( plotColoursPanel, PLOT_COLOURS_STR );        // Plot colours panel A        JPanel plotColoursPanelA = new JPanel( gridBag );        gbc.gridx = 0;        gbc.gridy = 0;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.FIRST_LINE_START;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = new Insets( 0, 0, 0, 0 );        gridBag.setConstraints( plotColoursPanelA, gbc );        plotColoursPanel.add( plotColoursPanelA );        gridY = 0;        // Label: focused border colour        JLabel focusedBorderColourLabel = new FLabel( FOCUSED_BORDER_STR );        gbc.gridx = 0;        gbc.gridy = gridY;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_END;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = AppConstants.COMPONENT_INSETS;        gridBag.setConstraints( focusedBorderColourLabel, gbc );        plotColoursPanelA.add( focusedBorderColourLabel );        // Button: focused border colour        plotFocusedBorderColourButton = new PlotColourButton( config.getPlotFocusedBorderColour( ) );        plotFocusedBorderColourButton.setActionCommand( Command.CHOOSE_PLOT_FOCUSED_BORDER_COLOUR );        plotFocusedBorderColourButton.addActionListener( this );        gbc.gridx = 1;        gbc.gridy = gridY++;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_START;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = AppConstants.COMPONENT_INSETS;        gridBag.setConstraints( plotFocusedBorderColourButton, gbc );        plotColoursPanelA.add( plotFocusedBorderColourButton );        // Label: image margin colour        JLabel imageMarginColourLabel = new FLabel( IMAGE_MARGIN_STR );        gbc.gridx = 0;        gbc.gridy = gridY;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_END;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = AppConstants.COMPONENT_INSETS;        gridBag.setConstraints( imageMarginColourLabel, gbc );        plotColoursPanelA.add( imageMarginColourLabel );        // Button: image margin colour        plotImageMarginColourButton = new PlotColourButton( config.getPlotImageMarginColour( ) );        plotImageMarginColourButton.setActionCommand( Command.CHOOSE_PLOT_IMAGE_MARGIN_COLOUR );        plotImageMarginColourButton.addActionListener( this );        gbc.gridx = 1;        gbc.gridy = gridY++;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_START;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = AppConstants.COMPONENT_INSETS;        gridBag.setConstraints( plotImageMarginColourButton, gbc );        plotColoursPanelA.add( plotImageMarginColourButton );        // Label: background colour        JLabel backgroundColourLabel = new FLabel( BACKGROUND_STR );        gbc.gridx = 0;        gbc.gridy = gridY;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_END;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = AppConstants.COMPONENT_INSETS;        gridBag.setConstraints( backgroundColourLabel, gbc );        plotColoursPanelA.add( backgroundColourLabel );        // Button: background colour        plotBackgroundColourButton = new PlotColourButton( config.getPlotBackgroundColour( ) );        plotBackgroundColourButton.setActionCommand( Command.CHOOSE_PLOT_BACKGROUND_COLOUR );        plotBackgroundColourButton.addActionListener( this );        gbc.gridx = 1;        gbc.gridy = gridY++;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_START;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = AppConstants.COMPONENT_INSETS;        gridBag.setConstraints( plotBackgroundColourButton, gbc );        plotColoursPanelA.add( plotBackgroundColourButton );        // Plot colours panel B        JPanel plotColoursPanelB = new JPanel( gridBag );        gbc.gridx = 1;        gbc.gridy = 0;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.FIRST_LINE_START;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = new Insets( 0, 8, 0, 0 );        gridBag.setConstraints( plotColoursPanelB, gbc );        plotColoursPanel.add( plotColoursPanelB );        gridY = 0;        // Label: grid colour        JLabel gridColourLabel = new FLabel( GRID_STR );        gbc.gridx = 0;        gbc.gridy = gridY;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_END;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = AppConstants.COMPONENT_INSETS;        gridBag.setConstraints( gridColourLabel, gbc );        plotColoursPanelB.add( gridColourLabel );        // Button: grid colour        plotGridColourButton = new PlotColourButton( config.getPlotGridColour( ) );        plotGridColourButton.setActionCommand( Command.CHOOSE_PLOT_GRID_COLOUR );        plotGridColourButton.addActionListener( this );        gbc.gridx = 1;        gbc.gridy = gridY++;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_START;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = AppConstants.COMPONENT_INSETS;        gridBag.setConstraints( plotGridColourButton, gbc );        plotColoursPanelB.add( plotGridColourButton );        // Label: axis colour        JLabel axisColourLabel = new FLabel( AXIS_STR );        gbc.gridx = 0;        gbc.gridy = gridY;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_END;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = AppConstants.COMPONENT_INSETS;        gridBag.setConstraints( axisColourLabel, gbc );        plotColoursPanelB.add( axisColourLabel );        // Button: axis colour        plotAxisColourButton = new PlotColourButton( config.getPlotAxisColour( ) );        plotAxisColourButton.setActionCommand( Command.CHOOSE_PLOT_AXIS_COLOUR );        plotAxisColourButton.addActionListener( this );        gbc.gridx = 1;        gbc.gridy = gridY++;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_START;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = AppConstants.COMPONENT_INSETS;        gridBag.setConstraints( plotAxisColourButton, gbc );        plotColoursPanelB.add( plotAxisColourButton );        // Label: scale markings        JLabel scaleMarkingsColourLabel = new FLabel( SCALE_MARKINGS_STR );        gbc.gridx = 0;        gbc.gridy = gridY;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_END;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = AppConstants.COMPONENT_INSETS;        gridBag.setConstraints( scaleMarkingsColourLabel, gbc );        plotColoursPanelB.add( scaleMarkingsColourLabel );        // Button: scale markings colour        plotScaleMarkingsColourButton = new PlotColourButton( config.getPlotScaleColour( ) );        plotScaleMarkingsColourButton.setActionCommand( Command.CHOOSE_PLOT_SCALE_COLOUR );        plotScaleMarkingsColourButton.addActionListener( this );        gbc.gridx = 1;        gbc.gridy = gridY++;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_START;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = AppConstants.COMPONENT_INSETS;        gridBag.setConstraints( plotScaleMarkingsColourButton, gbc );        plotColoursPanelB.add( plotScaleMarkingsColourButton );        //----  Outer panel        JPanel outerPanel = new JPanel( gridBag );        outerPanel.setBorder( BorderFactory.createEmptyBorder( 2, 2, 2, 2 ) );        gridY = 0;        gbc.gridx = 0;        gbc.gridy = gridY++;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.NORTH;        gbc.fill = GridBagConstraints.HORIZONTAL;        gbc.insets = new Insets( 0, 0, 0, 0 );        gridBag.setConstraints( controlPanel, gbc );        outerPanel.add( controlPanel );        gbc.gridx = 0;        gbc.gridy = gridY++;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.NORTH;        gbc.fill = GridBagConstraints.HORIZONTAL;        gbc.insets = new Insets( 3, 0, 0, 0 );        gridBag.setConstraints( plotColoursPanel, gbc );        outerPanel.add( plotColoursPanel );        return outerPanel;    }    //------------------------------------------------------------------    private JPanel getPanelFunction( )    {        //----  Top panel        GridBagLayout gridBag = new GridBagLayout( );        GridBagConstraints gbc = new GridBagConstraints( );        JPanel topPanel = new JPanel( gridBag );        GuiUtilities.setPaddedLineBorder( topPanel );        int gridY = 0;        AppConfig config = AppConfig.getInstance( );        // Label: directory        JLabel directoryLabel = new FLabel( DIRECTORY_STR );        gbc.gridx = 0;        gbc.gridy = gridY;        gbc.gridwidth = 1;        gbc.gridheight = 1;        gbc.weightx = 0.0;        gbc.weighty = 0.0;        gbc.anchor = GridBagConstraints.LINE_END;        gbc.fill = GridBagConstraints.NONE;        gbc.insets = AppConstants.COMPONENT_INSETS;        gridBag.setConstraints( directoryLabel, gbc );        topPanel.add( direct

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -