Java Code Examples for javax.swing.JCheckBox#setBounds()

The following examples show how to use javax.swing.JCheckBox#setBounds() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FieldPanel.java    From sldeditor with GNU General Public License v3.0 7 votes vote down vote up
/**
 * Internal create optional checkbox.
 *
 * @param xPos the x pos
 */
private void internalCreateOptionalCheckbox(int xPos) {
    optionalCheckbox = new JCheckBox();
    optionalCheckbox.setBounds(
            xPos + 5 + BasePanel.LABEL_WIDTH,
            0,
            BasePanel.CHECKBOX_WIDTH,
            BasePanel.WIDGET_HEIGHT);
    optionalCheckbox.setVisible(false);
    optionalCheckbox.addActionListener(
            new ActionListener() {

                @Override
                public void actionPerformed(ActionEvent e) {
                    handleOptionalValue();
                }
            });
    add(optionalCheckbox);
}
 
Example 2
Source File: KwikiDateModesSelectorPanel.java    From ET_Redux with Apache License 2.0 6 votes vote down vote up
private void SetupSliderLockCheckBox () {

        ChangeListener sliderLockChangeListener = new ChangeListener() {

            public void stateChanged ( ChangeEvent changeEvent ) {
                propertySupport.firePropertyChange(//
                        SLIDER_LOCK_PROPERTY,
                        "",
                        String.valueOf( ((JCheckBox) changeEvent.getSource()).isSelected() ) );
            }
        };

        sliderLockCheckBox = new JCheckBox( "Lock Uncertainties" );
        sliderLockCheckBox.setOpaque( false );
        sliderLockCheckBox.setForeground( new java.awt.Color( 204, 0, 0 ) );
        sliderLockCheckBox.setFont( new Font( "SansSerif", Font.BOLD, 9 ) );
        sliderLockCheckBox.setBounds( 1, 60, 120, 15 );
        sliderLockCheckBox.addChangeListener( sliderLockChangeListener );
        add( sliderLockCheckBox, javax.swing.JLayeredPane.DEFAULT_LAYER );

    }
 
Example 3
Source File: IncludedFractionsDesktopPane.java    From ET_Redux with Apache License 2.0 6 votes vote down vote up
private void ShowIncludedFractionCheckBox(
        AliquotInterface aliquot,
        ValueModel sampleDateModel,
        int width,
        int offset) {
    
    int count = 0;        
    for (ETFractionInterface f : ((ReduxAliquotInterface) aliquot).getAliquotFractions()) {
        JCheckBox temp = new JCheckBox();
        temp.setText(f.getFractionID());
        temp.setBounds(0, (offset + (count ++)) * 20 + 25, width, 15);
        //set checked status
        temp.setSelected(((SampleDateModel)sampleDateModel).includesFractionByName(f.getFractionID()));
        add(temp, javax.swing.JLayeredPane.DEFAULT_LAYER);
    }
    setBounds(
            getX(),
            getY(),
            width,
            (offset + ((ReduxAliquotInterface) aliquot).getAliquotFractions().size() * 20 + 25));
}
 
Example 4
Source File: DebugPanel.java    From dkpro-jwpl with Apache License 2.0 6 votes vote down vote up
private void createStatsOutputSettings()
{
	statsOutputCheckBox = new JCheckBox(
			"Activate Article Information Output");
	statsOutputCheckBox.setBounds(10, 80, 250, 25);

	statsOutputCheckBox.addActionListener(new ActionListener()
	{
		@Override
		public void actionPerformed(final ActionEvent e)
		{

			boolean flag = !controller.isStatsOutputEnabled();
			controller.setEnableStatsOutput(flag);
		}
	});

	this.add(statsOutputCheckBox);
}
 
Example 5
Source File: IncludedFractionsDesktopPane.java    From ET_Redux with Apache License 2.0 6 votes vote down vote up
private void ShowAliquotDateModels(
        AliquotInterface aliquot,
        int width,
        int offset) {

    int count = 0;
    JLabel aliquotLabel = new JLabel(aliquot.getAliquotName());
    aliquotLabel.setBounds(0, (offset + (count ++)) * 20 + 25, width, 15);
    add(aliquotLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
    
    for (ETFractionInterface f : ((ReduxAliquotInterface) aliquot).getAliquotFractions()) {
        JCheckBox temp = new JCheckBox();
        temp.setText(f.getFractionID());
        temp.setBounds(0, (offset + (count ++)) * 20 + 25, width, 15);
        add(temp, javax.swing.JLayeredPane.DEFAULT_LAYER);
    }
    setBounds(
            getX(),
            getY(),
            width,
            (offset + ((ReduxAliquotInterface) aliquot).getAliquotFractions().size() * 20 + 25));
}
 
Example 6
Source File: HeatMapManager.java    From ET_Redux with Apache License 2.0 6 votes vote down vote up
private void buttonsFactory() {
    toggleHeatActiveCheckBox = new JCheckBox("Activate Heat Map");
    toggleHeatActiveCheckBox.setBounds(50, 100, WIDTH_OF_FORM - 100, 25);
    toggleHeatActiveCheckBox.setFont(sansSerif_12_Plain);
    toggleHeatActiveCheckBox.setSelected(heatMapActive);
    toggleHeatActiveCheckBox.addItemListener(new ItemListener() {

        @Override
        public void itemStateChanged(ItemEvent e) {
            if (e.getStateChange() == ItemEvent.SELECTED) {
                heatMapActive = true;
            } else {
                heatMapActive = false;
            }
            determineFractionHeat();

            heatMapOptions.put("activateHeatMap", Boolean.toString(heatMapActive));
        }
    });

    heatMapDetailsPanel.add(toggleHeatActiveCheckBox);

}
 
Example 7
Source File: SQLPanel.java    From dkpro-jwpl with Apache License 2.0 6 votes vote down vote up
private void createOutputSettings()
{

	enableZipEncodingCheckBox = new JCheckBox("Activate Zip Encoding");
	enableZipEncodingCheckBox.setBounds(10, 160, 200, 25);

	enableZipEncodingCheckBox.addActionListener(new ActionListener()
	{
		@Override
		public void actionPerformed(final ActionEvent e)
		{

			boolean flag = !controller.isZipCompressionEnabled();
			controller.setEnableZipCompression(flag);

			validateSettings();
		}
	});

	this.add(enableZipEncodingCheckBox);
}
 
Example 8
Source File: WhiskasPanel.java    From slick2d-maven with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Add a control for enablement
 * 
 * @param text The label to be associated with the check box
 * @param listener The listener to be notified of updates to the new control
 */
private void addEnableControl(String text, ItemListener listener) {
	JCheckBox enableControl = new JCheckBox("Enable " + text);
	enableControl.setBounds(10, offset, 200, 20);
	enableControl.addItemListener(listener);
	add(enableControl);

	controlToValueName.put(enableControl, text);
	valueNameToControl.put(text, enableControl);
	offset += 25;
}
 
Example 9
Source File: KwikiDateModesSelectorPanel.java    From ET_Redux with Apache License 2.0 5 votes vote down vote up
/**
 * 
 * @param enableThPa
 */
public void SetupDateCorrectionCheckBoxes ( boolean enableThPa ) {

    ActionListener dateCorrectionChkBoxActionListener = new ActionListener() {

        public void actionPerformed ( ActionEvent e ) {
            AbstractButton abstractButton =
                    (AbstractButton) e.getSource();
            String choice = abstractButton.getActionCommand();
            CalculateDateCorrectionMode( choice );
        }
    };

    correctTh = new JCheckBox( "Th" );
    correctTh.setActionCommand( "Th" );
    correctTh.setOpaque( false );
    correctTh.setForeground( new java.awt.Color( 204, 0, 0 ) );
    correctTh.setFont( new Font( "SansSerif", Font.BOLD, 9 ) );
    correctTh.setBounds( 125, 20, 45, 15 );
    correctTh.setEnabled( enableThPa );
    correctTh.addActionListener( dateCorrectionChkBoxActionListener );
    add( correctTh, javax.swing.JLayeredPane.DEFAULT_LAYER );

    correctPa = new JCheckBox( "Pa" );
    correctPa.setActionCommand( "Pa" );
    correctPa.setOpaque( false );
    correctPa.setForeground( new java.awt.Color( 204, 0, 0 ) );
    correctPa.setFont( new Font( "SansSerif", Font.BOLD, 9 ) );
    correctPa.setBounds( 125, 40, 45, 15 );
    correctPa.setEnabled( enableThPa );
    correctPa.addActionListener( dateCorrectionChkBoxActionListener );
    add( correctPa, javax.swing.JLayeredPane.DEFAULT_LAYER );
}
 
Example 10
Source File: DebugPanel.java    From dkpro-jwpl with Apache License 2.0 5 votes vote down vote up
private void createDebugSettings()
{

	debugOuputCheckBox = new JCheckBox("Activate Debug Output");
	debugOuputCheckBox.setBounds(10, 120, 200, 25);
	this.add(debugOuputCheckBox);

	debugOuputCheckBox.addActionListener(new ActionListener()
	{
		@Override
		public void actionPerformed(final ActionEvent e)
		{

			boolean flag = !controller.isDebugOutputEnabled();
			controller.setEnableDebugOutput(flag);

			validateDebugSettings();
		}
	});

	debugOutputLabel = new JLabel("Debug Folder: ");
	debugOutputLabel.setBorder(BorderFactory.createRaisedBevelBorder());
	debugOutputLabel.setBounds(10, 150, 100, 25);
	this.add(debugOutputLabel);

	debugOutputField = new JTextField();
	debugOutputField.setBounds(120, 150, 250, 25);
	this.add(debugOutputField);
}
 
Example 11
Source File: OutputPanel.java    From dkpro-jwpl with Apache License 2.0 5 votes vote down vote up
private void createOutputSizeSettings()
{

	enableMultipleOutputFiles = new JCheckBox(
			"Allow multiple output files per consumer");
	enableMultipleOutputFiles.setBounds(10, 200, 250, 25);
	this.add(enableMultipleOutputFiles);

	outputSizeLimitLabel = new JLabel("File Size Limit (in byte): ");
	outputSizeLimitLabel.setBorder(BorderFactory.createRaisedBevelBorder());
	outputSizeLimitLabel.setBounds(10, 230, 150, 25);
	this.add(outputSizeLimitLabel);

	outputSizeLimitField = new JTextField();
	outputSizeLimitField.setBounds(170, 230, 200, 25);
	this.add(outputSizeLimitField);

	enableMultipleOutputFiles.addActionListener(new ActionListener()
	{
		@Override
		public void actionPerformed(final ActionEvent e)
		{

			boolean flag = !controller.isMultipleOutputFiles();
			controller.setMultipleOutputFiles(flag);

			outputSizeLimitLabel.setEnabled(flag);
			outputSizeLimitField.setEnabled(flag);
		}
	});
}
 
Example 12
Source File: SQLPanel.java    From dkpro-jwpl with Apache License 2.0 4 votes vote down vote up
private void createSQLFields()
{

	enableSQLDatabaseConnection = new JCheckBox(
			"Activate Database Output");
	enableSQLDatabaseConnection.setBounds(10, 10, 200, 25);

	enableSQLDatabaseConnection.addActionListener(new ActionListener()
	{
		@Override
		public void actionPerformed(final ActionEvent e)
		{
			boolean flag = !controller.isEnableSQLDatabaseOutput();
			controller.setEnableSQLDatabaseOutput(flag);

			validateSQLFields();
		}
	});

	this.add(enableSQLDatabaseConnection);

	sqlHostLabel = new JLabel("Host");
	sqlHostLabel.setBorder(BorderFactory.createRaisedBevelBorder());
	sqlHostLabel.setBounds(10, 50, 100, 25);
	this.add(sqlHostLabel);

	sqlHostField = new JTextField();
	sqlHostField.setBounds(120, 50, 100, 25);
	this.add(sqlHostField);

	sqlDatabaseLabel = new JLabel("Database");
	sqlDatabaseLabel.setBorder(BorderFactory.createRaisedBevelBorder());
	sqlDatabaseLabel.setBounds(10, 50, 100, 25);
	this.add(sqlDatabaseLabel);

	sqlDatabaseField = new JTextField();
	sqlDatabaseField.setBounds(120, 50, 100, 25);
	this.add(sqlDatabaseField);

	sqlUserLabel = new JLabel("User");
	sqlUserLabel.setBorder(BorderFactory.createRaisedBevelBorder());
	sqlUserLabel.setBounds(10, 80, 100, 25);
	this.add(sqlUserLabel);

	sqlUserField = new JTextField();
	sqlUserField.setBounds(120, 80, 100, 25);
	this.add(sqlUserField);

	sqlPasswordLabel = new JLabel("Password");
	sqlPasswordLabel.setBorder(BorderFactory.createRaisedBevelBorder());
	sqlPasswordLabel.setBounds(10, 110, 100, 25);
	this.add(sqlPasswordLabel);

	sqlPasswordField = new JTextField();
	sqlPasswordField.setBounds(120, 110, 100, 25);
	this.add(sqlPasswordField);
}
 
Example 13
Source File: PayloadMessageConfig.java    From ISO8583 with GNU General Public License v3.0 4 votes vote down vote up
private GuiPayloadField(FieldVO fieldVO, FieldVO superfieldVO, String superFieldBitNum) {

			this.isSubfield = (superfieldVO != null);
			this.superFieldVO = superfieldVO;
			this.fieldVO = fieldVO.getInstanceCopy();
			this.fieldVO.setFieldList(new ArrayList<FieldVO>());
			
			if (isSubfield) {
				superFieldVO.getFieldList().add(this.fieldVO);
            }
            else {
				messageVO.getFieldList().add(this.fieldVO);
			}
			
			ckBox = new JCheckBox();
			txtType = new JTextField();
			txtLength = new JTextField();
			txtValue = new JTextField();
			subfieldList = new ArrayList<GuiPayloadField>();
			
			lblFieldNum = new JLabel(superFieldBitNum +"["+ fieldVO.getBitNum().toString() +"]");
			lblFieldName = new JLabel(fieldVO.getName());
			lblType = new JLabel(fieldVO.getType().toString());
			lblDynamic = new JLabel();
			lblDynamic.setIcon(new ImageIcon(PnlGuiPayload.class.getResource("/org/adelbs/iso8583/resource/search.png")));
			lblDynamic.setToolTipText(fieldVO.getDynaCondition());

			lineNum = numLines;
			numLines++;
			
			ckBox.setBounds(10, 10 + (lineNum * 25), 22, 22);
			lblFieldNum.setBounds(40, 10 + (lineNum * 25), 60, 22);
			lblFieldName.setBounds(100, 10 + (lineNum * 25), 100, 22);
			lblType.setBounds(490, 10 + (lineNum * 25), 100, 22);
			lblDynamic.setBounds(620, 10 + (lineNum * 25), 50, 22);
			
			if (fieldVO.getType() == TypeEnum.ALPHANUMERIC) {
				txtValue.setBounds(210, 10 + (lineNum * 25), 260, 22);
			}
			else if (fieldVO.getType() == TypeEnum.TLV) {
				txtType.setBounds(210, 10 + (lineNum * 25), 80, 22);
				txtLength.setBounds(300, 10 + (lineNum * 25), 80, 22);
				txtValue.setBounds(390, 10 + (lineNum * 25), 80, 22);
				
				pnlFields.add(txtType);
				pnlFields.add(txtLength);
			}
			
			pnlFields.add(ckBox);
			pnlFields.add(lblFieldNum);
			pnlFields.add(lblFieldName);
			
			//Remove TypeLabel and TextField when we have SubFields. 
			//Parent field has its value created by its subfields
			if(fieldVO.getFieldList().size() == 0 || fieldVO.getType() == TypeEnum.TLV){
				pnlFields.add(txtValue);
				pnlFields.add(lblType);
			}
			
			txtType.addKeyListener(saveFieldPayloadAction);
			txtLength.addKeyListener(saveFieldPayloadAction);
			txtValue.addKeyListener(saveFieldPayloadAction);
			
			if (!fieldVO.getDynaCondition().equals("") && !fieldVO.getDynaCondition().equals("true"))
				pnlFields.add(lblDynamic);
			
			if (fieldVO.getDynaCondition().equals("true")) {
				ckBox.setSelected(true);
				ckBox.setEnabled(false);
				ckBoxClick(ckBox);
				
				setEnabled(true, false);
			}
			else {
				ckBox.addActionListener(new ActionListener() {
					@Override
					public void actionPerformed(ActionEvent e) {
						ckBoxClick((JCheckBox) e.getSource());
						saveFieldValue();
					}
				});
				
				setEnabled(false, isSubfield);
			}
		}
 
Example 14
Source File: LoginFrame.java    From myqq with MIT License 4 votes vote down vote up
/**
 * Create the frame.
 */
public LoginFrame()
{
	setTitle("QQ2013");
	setIconImage(Toolkit.getDefaultToolkit().getImage(LoginFrame.class.getResource("/client/img/QQ_64.png")));
	setUndecorated(true);//设置窗体没有边框
	setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	setBounds(100, 100, 354, 272);
	
	contentPane = new MyPanel("../img/QQ2011_Login.png");
	contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
	setContentPane(contentPane);
	contentPane.setLayout(null);
	
	pwd密码 = new JPasswordField();
	pwd密码.setText("123");
	pwd密码.setEchoChar('●');
	pwd密码.setBounds(104, 163, 154, 26);
	contentPane.add(pwd密码);
	
	lblQQ2013 = new JLabel("QQ2013");
	lblQQ2013.setForeground(new Color(0, 0, 51));
	lblQQ2013.setFont(new Font("宋体", Font.BOLD, 16));
	lblQQ2013.setBounds(14, 6, 55, 18);
	contentPane.add(lblQQ2013);
	
	lbl头像 = new JLabel("");
	lbl头像.setIcon(new ImageIcon(LoginFrame.class.getResource("/client/img/headImage/head_boy_01_64.jpg")));
	lbl头像.setBounds(18, 127, 64, 64);
	contentPane.add(lbl头像);
	
	checkBox记住密码 = new JCheckBox("\u8BB0\u4F4F\u5BC6\u7801");
	checkBox记住密码.setBounds(156, 198, 76, 18);
	contentPane.add(checkBox记住密码);
	
	checkBox自动登录 = new JCheckBox("\u81EA\u52A8\u767B\u5F55");
	checkBox自动登录.setBounds(237, 198, 76, 18);
	contentPane.add(checkBox自动登录);
	
	lbl登录 = new JLabel("");
	lbl登录.setIcon(new ImageIcon(LoginFrame.class.getResource("/client/img/button/button_login_1.png")));
	lbl登录.setBounds(262, 237, 69, 22);
	contentPane.add(lbl登录);
	
	textField用户名 = new JTextField();
	textField用户名.setText("\u9A6C\u5316\u817E");
	textField用户名.setBounds(104, 128, 154, 26);
	contentPane.add(textField用户名);
	textField用户名.setColumns(10);
	
	lbl注册账号 = new JLabel("\u6CE8\u518C\u8D26\u53F7");
	lbl注册账号.setFont(new Font("SansSerif", Font.PLAIN, 13));
	lbl注册账号.setForeground(new Color(0, 51, 255));
	lbl注册账号.setBounds(288, 132, 55, 18);
	contentPane.add(lbl注册账号);
	
	lbl忘记密码 = new JLabel("\u5FD8\u8BB0\u5BC6\u7801");
	lbl忘记密码.setFont(new Font("SansSerif", Font.PLAIN, 13));
	lbl忘记密码.setForeground(new Color(0, 51, 255));
	lbl忘记密码.setBounds(288, 167, 55, 18);
	contentPane.add(lbl忘记密码);
	
	lbl最小化 = new JLabel("");
	lbl最小化.setIcon(new ImageIcon(LoginFrame.class.getResource("/client/img/button/login_minsize_1.png")));
	lbl最小化.setBounds(284, 0, 29, 19);
	contentPane.add(lbl最小化);
	
	lbl退出 = new JLabel("");
	lbl退出.setIcon(new ImageIcon(LoginFrame.class.getResource("/client/img/button/login_exit_1.png")));
	lbl退出.setBounds(312, -1, 37, 20);
	contentPane.add(lbl退出);
	
	lbl多账号 = new JLabel("");
	lbl多账号.setIcon(new ImageIcon(LoginFrame.class.getResource("/client/img/button/login_duozhanghao_1.png")));
	lbl多账号.setBounds(14, 237, 69, 21);
	contentPane.add(lbl多账号);
	
	lbl设置 = new JLabel("");
	lbl设置.setIcon(new ImageIcon(LoginFrame.class.getResource("/client/img/button/login_setting_1.png")));
	lbl设置.setBounds(93, 237, 69, 21);
	contentPane.add(lbl设置);
	
	comboBox状态 = new JComboBox();
	comboBox状态.setBounds(104, 195, 40, 24);
	contentPane.add(comboBox状态);
}
 
Example 15
Source File: FractionInfoPanel.java    From ET_Redux with Apache License 2.0 4 votes vote down vote up
private void initView() {
    this.setCursor(Cursor.getDefaultCursor());

    Font checkBoxFont = new Font(
            "SansSerif",
            Font.BOLD,
            10);

    toggleFractionCheckBox = new JCheckBox("include fraction", true);
    toggleFractionCheckBox.setBounds(2, 22, DEFAULT_WIDTH_OF_PANE - 2, 15);
    toggleFractionCheckBox.setFont(checkBoxFont);
    toggleFractionCheckBox.setSelected(tripoliFraction.isIncluded());
    toggleFractionCheckBox.setBackground(this.getBackground());
    toggleFractionCheckBox.addActionListener(//
            new ToggleFractionCheckBoxActionListener(tripoliFraction, rawDataModelView, sampleSessionDataView));
    add(toggleFractionCheckBox, JLayeredPane.DEFAULT_LAYER);

    showLocalYAxisCheckBox = new JCheckBox("local Y axis", false);
    showLocalYAxisCheckBox.setBounds(2, 37, DEFAULT_WIDTH_OF_PANE - 2, 15);
    showLocalYAxisCheckBox.setFont(checkBoxFont);
    showLocalYAxisCheckBox.setSelected(tripoliFraction.isShowLocalYAxis());
    showLocalYAxisCheckBox.setBackground(this.getBackground());
    showLocalYAxisCheckBox.addActionListener(//
            new ShowLocalYAxisCheckBoxActionListener(tripoliFraction, sampleSessionDataView));
    add(showLocalYAxisCheckBox, JLayeredPane.DEFAULT_LAYER);

    if ((rawDataModelView instanceof FitFunctionsOnRatioDataView) || (rawDataModelView instanceof FitFunctionsOnDownHoleRatioDataView)) {
        showLocalFitFunctionsCheckBox = new JCheckBox("local Fit Functions", false);
        showLocalFitFunctionsCheckBox.setBounds(2, 52, DEFAULT_WIDTH_OF_PANE - 2, 15);
        showLocalFitFunctionsCheckBox.setFont(checkBoxFont);
        showLocalFitFunctionsCheckBox.setSelected(tripoliFraction.isShowLocalInterceptFitPanel());
        showLocalFitFunctionsCheckBox.setBackground(this.getBackground());
        showLocalFitFunctionsCheckBox.addActionListener(//
                new ShowLocalInterceptFitFunctionsCheckBoxActionListener(tripoliFraction, sampleSessionDataView));
        add(showLocalFitFunctionsCheckBox, JLayeredPane.DEFAULT_LAYER);

        add(buttonForODChoiceFactory(68, "w/ OD", true), DEFAULT_LAYER);
        add(buttonForODChoiceFactory(88, "w/out OD", false), DEFAULT_LAYER);
        add(buttonForSelectAllFactory(68, "Select All"), DEFAULT_LAYER);
        add(buttonForReFitFactory(88, "ReFit Functions"), DEFAULT_LAYER);
    }

}
 
Example 16
Source File: AbstractDataMonitorView.java    From ET_Redux with Apache License 2.0 4 votes vote down vote up
/**
 *
 * @param inLiveMode the value of inLiveMode
 */
public void prepareConcordia(boolean inLiveMode) {

    if (concordiaGraphPanel != null) {
        this.remove(concordiaGraphPanel);
    }
    if (kwikiConcordiaToolBar != null) {
        this.remove(kwikiConcordiaToolBar);
    }

    if (savedCountOfFractions == 0) {
        concordiaGraphPanel = new ConcordiaGraphPanel(project.getSuperSample(), getuPbReduxFrame());

        ((ConcordiaGraphPanel) concordiaGraphPanel).setCurrentGraphAxesSetup(new GraphAxesSetup("C", 2));

        ((ConcordiaGraphPanel) concordiaGraphPanel).setShowTitleBox(false);

        ((ConcordiaGraphPanel) concordiaGraphPanel).//
                setYorkFitLine(null);
        ((ConcordiaGraphPanel) concordiaGraphPanel).//
                setFadedDeselectedFractions(true);

        project.getSuperSample().getSampleDateInterpretationGUISettings().//
                setConcordiaOptions(((ConcordiaPlotDisplayInterface) concordiaGraphPanel).getConcordiaOptions());
        probabilityChartOptions = project.getSuperSample().getSampleDateInterpretationGUISettings().getProbabilityChartOptions();

        ((ConcordiaGraphPanel) concordiaGraphPanel).//
                setFadedDeselectedFractions(false);

        ((ConcordiaGraphPanel) concordiaGraphPanel).setShowTightToEdges(true);

    }

    setConcordiaBounds(showSessions ? 725 : leftMargin + 135, showSessions ? 620 : 900, 625);

    kwikiConcordiaToolBar = new KwikiConcordiaToolBar(//
            940, topMargin + concordiaGraphPanel.getHeight() + topMargin + 50, concordiaGraphPanel, null);

    ((ConcordiaGraphPanel) concordiaGraphPanel).setSample(project.getSuperSample());
    ((ConcordiaGraphPanel) concordiaGraphPanel).setViewOptions();
    ((ConcordiaGraphPanel) concordiaGraphPanel).setShowBestDateDivider206_238(true);

    add(concordiaGraphPanel, javax.swing.JLayeredPane.DEFAULT_LAYER);

    try {
        Vector<ETFractionInterface> selectedFractions
                = project.getSuperSample().getFractions();

        ((AliquotDetailsDisplayInterface) concordiaGraphPanel).//
                setSelectedFractions(selectedFractions);
        ((PlottingDetailsDisplayInterface) concordiaGraphPanel).resetPanel(true, inLiveMode);
    } catch (Exception e) {
    }

    add(kwikiConcordiaToolBar, javax.swing.JLayeredPane.DEFAULT_LAYER);

    JCheckBox showFilteredFractions_checkbox = new JCheckBox();
    showFilteredFractions_checkbox.setFont(new java.awt.Font("SansSerif", 1, 10));
    showFilteredFractions_checkbox.setText("<html>Filtering ON<br> </html>");
    showFilteredFractions_checkbox.setBounds(leftMargin + 1075, topMargin + 660, 120, 25);
    showFilteredFractions_checkbox.setOpaque(true);
    showFilteredFractions_checkbox.setBackground(Color.white);
    showFilteredFractions_checkbox.addActionListener((java.awt.event.ActionEvent evt) -> {
        boolean state = ((AliquotDetailsDisplayInterface) concordiaGraphPanel).isShowFilteredEllipses();
        ((AliquotDetailsDisplayInterface) concordiaGraphPanel).setShowFilteredEllipses(!state);
        showFilteredFractions_checkbox.setSelected(!state);
        probabilityChartOptions.put("showFilteredEllipses", Boolean.toString(!state));
        concordiaGraphPanel.repaint();
    });

    if (probabilityChartOptions.containsKey("showFilteredEllipses")) {
        showFilteredFractions_checkbox.setSelected(Boolean.valueOf(probabilityChartOptions.get("showFilteredEllipses")));
        ((AliquotDetailsDisplayInterface) concordiaGraphPanel).setShowFilteredEllipses(showFilteredFractions_checkbox.isSelected());
    }

    this.add(showFilteredFractions_checkbox, LAYER_FIVE);

}
 
Example 17
Source File: ReplaceStringsOptions.java    From bytecode-viewer with GNU General Public License v3.0 4 votes vote down vote up
public ReplaceStringsOptions() {
    this.setIconImages(Resources.iconList);
    setSize(new Dimension(250, 176));
    setResizable(false);
    setTitle("Replace Strings");
    getContentPane().setLayout(null);

    JButton btnNewButton = new JButton("Start Replacing");
    btnNewButton.setBounds(6, 115, 232, 23);
    getContentPane().add(btnNewButton);

    JLabel lblNewLabel = new JLabel("Original LDC:");
    lblNewLabel.setBounds(6, 40, 67, 14);
    getContentPane().add(lblNewLabel);

    textField = new JTextField();
    textField.setBounds(80, 37, 158, 20);
    getContentPane().add(textField);
    textField.setColumns(10);

    JLabel lblNewLabel_1 = new JLabel("New LDC:");
    lblNewLabel_1.setBounds(6, 65, 77, 14);
    getContentPane().add(lblNewLabel_1);

    textField_1 = new JTextField();
    textField_1.setColumns(10);
    textField_1.setBounds(80, 62, 158, 20);
    getContentPane().add(textField_1);

    JLabel lblNewLabel_2 = new JLabel("Class:");
    lblNewLabel_2.setBounds(6, 90, 46, 14);
    getContentPane().add(lblNewLabel_2);

    textField_2 = new JTextField();
    textField_2.setToolTipText("* will search all classes");
    textField_2.setText("*");
    textField_2.setBounds(80, 87, 158, 20);
    getContentPane().add(textField_2);
    textField_2.setColumns(10);

    final JCheckBox chckbxNewCheckBox = new JCheckBox(
            "Replace All Contains");
    chckbxNewCheckBox
            .setToolTipText("If it's unticked, it will check if the string equals, if its ticked it will check if it contains, then replace the original LDC part of the string.");
    chckbxNewCheckBox.setBounds(6, 7, 232, 23);
    getContentPane().add(chckbxNewCheckBox);
    btnNewButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
            PluginManager.runPlugin(new ReplaceStrings(textField.getText(),
                    textField_1.getText(), textField_2.getText(),
                    chckbxNewCheckBox.isSelected()));
            dispose();
        }
    });
    this.setLocationRelativeTo(null);
}
 
Example 18
Source File: MaliciousCodeScannerOptions.java    From bytecode-viewer with GNU General Public License v3.0 4 votes vote down vote up
public MaliciousCodeScannerOptions() {
    this.setIconImages(Resources.iconList);
    setSize(new Dimension(250, 323));
    setResizable(false);
    setTitle("Malicious Code Scanner Options");
    getContentPane().setLayout(null);

    final JCheckBox chckbxJavalangreflection = new JCheckBox(
            "java/lang/reflection");
    chckbxJavalangreflection.setSelected(true);
    chckbxJavalangreflection.setBounds(6, 7, 232, 23);
    getContentPane().add(chckbxJavalangreflection);

    final JCheckBox chckbxJavanet = new JCheckBox("java/net");
    chckbxJavanet.setSelected(true);
    chckbxJavanet.setBounds(6, 81, 232, 23);
    getContentPane().add(chckbxJavanet);

    final JCheckBox chckbxJavaio = new JCheckBox("java/io");
    chckbxJavaio.setBounds(6, 104, 232, 23);
    getContentPane().add(chckbxJavaio);

    final JCheckBox chckbxJavalangruntime = new JCheckBox(
            "java/lang/Runtime");
    chckbxJavalangruntime.setSelected(true);
    chckbxJavalangruntime.setBounds(6, 33, 232, 23);
    getContentPane().add(chckbxJavalangruntime);

    final JCheckBox chckbxLdcContainswww = new JCheckBox(
            "LDC contains 'www.'");
    chckbxLdcContainswww.setSelected(true);
    chckbxLdcContainswww.setBounds(6, 130, 232, 23);
    getContentPane().add(chckbxLdcContainswww);

    final JCheckBox chckbxLdcContainshttp = new JCheckBox(
            "LDC contains 'http://'");
    chckbxLdcContainshttp.setSelected(true);
    chckbxLdcContainshttp.setBounds(6, 156, 232, 23);
    getContentPane().add(chckbxLdcContainshttp);

    final JCheckBox chckbxLdcContainshttps = new JCheckBox(
            "LDC contains 'https://'");
    chckbxLdcContainshttps.setSelected(true);
    chckbxLdcContainshttps.setBounds(6, 182, 232, 23);
    getContentPane().add(chckbxLdcContainshttps);

    final JCheckBox chckbxLdcMatchesIp = new JCheckBox(
            "LDC matches IP regex");
    chckbxLdcMatchesIp.setSelected(true);
    chckbxLdcMatchesIp.setBounds(6, 208, 232, 23);
    getContentPane().add(chckbxLdcMatchesIp);

    final JCheckBox chckbxNullSecMan = new JCheckBox(
            "SecurityManager set to null");
    chckbxNullSecMan.setSelected(true);
    chckbxNullSecMan.setBounds(6, 234, 232, 23);
    getContentPane().add(chckbxNullSecMan);

    final JCheckBox chckbxJavaawtrobot = new JCheckBox("java/awt/Robot");
    chckbxJavaawtrobot.setSelected(true);
    chckbxJavaawtrobot.setBounds(6, 59, 232, 23);
    getContentPane().add(chckbxJavaawtrobot);

    JButton btnNewButton = new JButton("Start Scanning");
    btnNewButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
            PluginManager.runPlugin(new MaliciousCodeScanner(
                    chckbxJavalangreflection.isSelected(),
                    chckbxJavalangruntime.isSelected(),
                    chckbxJavanet.isSelected(),
                    chckbxJavaio.isSelected(),
                    chckbxLdcContainswww.isSelected(),
                    chckbxLdcContainshttp.isSelected(),
                    chckbxLdcContainshttps.isSelected(),
                    chckbxLdcMatchesIp.isSelected(),
                    chckbxNullSecMan.isSelected(),
                    chckbxJavaawtrobot.isSelected()));
            dispose();
        }
    });

    btnNewButton.setBounds(6, 264, 232, 23);
    getContentPane().add(btnNewButton);
    this.setLocationRelativeTo(null);
}
 
Example 19
Source File: TesteComponentes.java    From dctb-utfpr-2018-1 with Apache License 2.0 4 votes vote down vote up
public void TesteComponente(){
    janela.setVisible(true);
    janela.setSize(DIMENSOES);
    janela.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    
    JScrollPane teste1 = new JScrollPane(painel);
    teste1.setBounds(1, 2, 150, 200);
    
    JButton teste2 = new JButton("Aperte");
    teste2.setBounds(210, 2, 100, 100);
    
    JToggleButton teste3 = new JToggleButton("Toggle");
    teste3.setBounds(320, 2, 100, 100);
    
    JCheckBox teste4 = new JCheckBox("Teste");
    teste4.setBounds(430, 2, 100, 100);
    
    JRadioButton teste5 = new JRadioButton("Teste2");
    teste5.setBounds(540, 2, 100, 100);
    
    JTextField teste6 = new JTextField();
    teste6.setToolTipText("Seu Nome");
    teste6.setBounds(1, 205, 200, 50);
    
    String[] numeros = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"};
    JList teste7 = new JList(numeros);
    JScrollPane teste7_2 = new JScrollPane(teste7);
    teste7_2.setBounds(210, 205, 100, 100);
    
    String[] numeros2 = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"};
    JComboBox teste8 = new JComboBox(numeros2);
    teste8.setBounds(320, 205, 50, 50);
    
    JLabel teste9 = new JLabel();
    teste9.setText("Biografia: ");
    teste9.setBounds(1, 290, 200, 100);
    
    JTextArea teste10 = new JTextArea();
    teste10.setToolTipText("Biografia");
    teste10.setBounds(1, 350, 100, 100);
    
    teste2.addActionListener(this);
    teste3.addActionListener(this);
    teste4.addActionListener(this);
    teste5.addActionListener(this);
    
    janela.add(teste1);
    janela.add(teste2);
    janela.add(teste3);
    janela.add(teste4);
    janela.add(teste5);
    janela.add(teste6);
    janela.add(teste7);
    janela.add(teste8);
    janela.add(teste9);
    janela.add(teste10);
}