當前位置: 首頁>>代碼示例>>Java>>正文


Java ColumnSpec.decode方法代碼示例

本文整理匯總了Java中com.jgoodies.forms.layout.ColumnSpec.decode方法的典型用法代碼示例。如果您正苦於以下問題:Java ColumnSpec.decode方法的具體用法?Java ColumnSpec.decode怎麽用?Java ColumnSpec.decode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.jgoodies.forms.layout.ColumnSpec的用法示例。


在下文中一共展示了ColumnSpec.decode方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: Viewer

import com.jgoodies.forms.layout.ColumnSpec; //導入方法依賴的package包/類
private Viewer() {
    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    setTitle("Fact Tools GUI Development");


    //------- add a chart window
    //chartPanel.setBackground(Color.WHITE);
    //chartPanel.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null,
    //        null, null, null));
    JMenuBar menu = createMenuBar();
    this.setJMenuBar(menu);

    // set layout of the main window
    FormLayout layout = new FormLayout(new ColumnSpec[]{
            ColumnSpec.decode("fill:605px"),
            ColumnSpec.decode("fill:605px"),},
            new RowSpec[]{
                    RowSpec.decode("fill:pref"),
                    RowSpec.decode("fill:pref"),
                    RowSpec.decode("fill:pref")
            });

    JPanel panel = new JPanel(layout);
    CellConstraints cc = new CellConstraints();
    panel.add(chartPanel, cc.xywh(2, 1, 1, 1));
    panel.add(eventInfoPanel, cc.xywh(2, 2, 1, 1));
    panel.add(mapDisplay, cc.xywh(1, 1, 1, 2));
    panel.add(navigation, cc.xywh(1, 3, 2, 1));

    setContentPane(panel);

    //setSize(1200, 850);
    pack();
}
 
開發者ID:fact-project,項目名稱:fact-tools,代碼行數:35,代碼來源:Viewer.java

示例2: showWindow

import com.jgoodies.forms.layout.ColumnSpec; //導入方法依賴的package包/類
public void showWindow() {
    JFrame frame = new JFrame();
    FormLayout layout = new FormLayout(new ColumnSpec[]{
            ColumnSpec.decode("pref"),
            ColumnSpec.decode("pref")
    },
            new RowSpec[]{
                    RowSpec.decode("pref"),
                    RowSpec.decode("240px"),
                    RowSpec.decode("pref"),
                    RowSpec.decode("240px")
            }
    );


    JPanel panel = new JPanel(layout);
    CellConstraints cc = new CellConstraints();
    panel.add(plotPanel, cc.xywh(1, 1, 1, 4));

    panel.add(new JLabel("Series Selection"), cc.xy(2, 1));
    panel.add(keySelector, cc.xy(2, 2));

    panel.add(new JLabel("Marker Selection"), cc.xy(2, 3));
    panel.add(intervalKeySelector, cc.xy(2, 4));

    frame.setContentPane(panel);
    frame.pack();
    frame.setLocationByPlatform(true);
    frame.setVisible(true);
}
 
開發者ID:fact-project,項目名稱:fact-tools,代碼行數:31,代碼來源:PlotDisplayWindow.java

示例3: initActionsPanel

import com.jgoodies.forms.layout.ColumnSpec; //導入方法依賴的package包/類
private void initActionsPanel() {
   JPanel actionPanel = new JPanel();
   getContentPane().add(actionPanel, BorderLayout.SOUTH);
   FormLayout layout = new FormLayout(
         new ColumnSpec[] { ColumnSpec.decode("default:grow"), FormFactory.RELATED_GAP_COLSPEC,
               FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
               FormFactory.RELATED_GAP_COLSPEC, ColumnSpec.decode("max(40dlu;default)"),
               FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC,
               ColumnSpec.decode("max(40dlu;default)"), FormFactory.RELATED_GAP_COLSPEC,
               ColumnSpec.decode("max(5dlu;default)"), },
         new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
               RowSpec.decode("max(5dlu;default)"), });
   actionPanel.setLayout(layout);

   JButton btnCancel = new JButton(MESSAGES.get("cancel"));
   btnCancel.addActionListener(e -> setVisible(false));
   actionPanel.add(btnCancel, "7, 1, 2, 1");

   JButton btnOk = new JButton(MESSAGES.get("ok"));
   btnOk.addActionListener(e -> {
      checkSettingsChanged();
      saveConfiguration();
      okPressed = true;
      setVisible(false);
   });
   actionPanel.add(btnOk, "11, 1, 2, 1");
}
 
開發者ID:TypeTalk,項目名稱:TypeTalk,代碼行數:28,代碼來源:GuiConfigDialog.java

示例4: getComponent

import com.jgoodies.forms.layout.ColumnSpec; //導入方法依賴的package包/類
@Override
public JComponent getComponent(Runnable onChange) {

	T initial = valueGetter.invoke();
	
	JPanel pnl = new JPanel();
	ButtonGroup rdioBtnGroup = new ButtonGroup();
	
	String[] options = enumWrapper.getList();

	ColumnSpec[] cs = new ColumnSpec[] { ColumnSpec.decode("default:grow") }; //$NON-NLS-1$
	RowSpec[] rs = new RowSpec[1 + options.length*2];
	rs[0] = FormSpecs.LABEL_COMPONENT_GAP_ROWSPEC;
	for (int i = 0; i < options.length; i++) {
		rs[i*2+1] = FormSpecs.DEFAULT_ROWSPEC;
		rs[i*2+2] = FormSpecs.LABEL_COMPONENT_GAP_ROWSPEC;
	}
	
	pnl.setLayout(new FormLayout(cs, rs));

	for (int i = 0; i < options.length; i++) {
		
		final int fi = i;

		JRadioButton btn = new JRadioButton(options[i]);
		btn.setSelected(initial.asInt() == i);
		rdioBtnGroup.add(btn);
		btn.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				valueSetter.invoke(enumWrapper.find(fi));
				onChange.run();
			}
		});
		pnl.add(btn, "1, "+(i*2+2)+", fill, default"); //$NON-NLS-1$ //$NON-NLS-2$
	}
	
	return pnl;
}
 
開發者ID:Mikescher,項目名稱:jClipCorn,代碼行數:40,代碼來源:CustomFilterEnumOptionConfig.java

示例5: EventInfoPanel

import com.jgoodies.forms.layout.ColumnSpec; //導入方法依賴的package包/類
public EventInfoPanel(int width, int height) {

        Bus.eventBus.register(this);

        this.setPreferredSize(new Dimension(width, height));
        JPanel contentPanel = new JPanel();
        contentPanel.setPreferredSize(new Dimension(width - 12, height - 5));
        //define some padding using an empty border
        roiField.setEditable(false);
        timeField.setEditable(false);
        runIDField.setEditable(false);
        chargeField.setEditable(false);
        chargeFieldStd.setEditable(false);
        sizeField.setEditable(false);
        widthField.setEditable(false);
        lengthField.setEditable(false);

        roiField.setEnabled(false);
        runIDField.setEnabled(false);
        timeField.setEnabled(false);
        chargeField.setEnabled(false);
        chargeFieldStd.setEnabled(false);
        sizeField.setEnabled(false);
        widthField.setEnabled(false);
        lengthField.setEnabled(false);
        // set layout of the main window
        FormLayout layout = new FormLayout(new ColumnSpec[]{
                ColumnSpec.decode("left:100px:grow"),
                ColumnSpec.decode("pref"),

                ColumnSpec.decode("fill:100px:grow"),
                ColumnSpec.decode("pref"),

                ColumnSpec.decode("right:pref:grow"),
                ColumnSpec.decode("pref"),
        },
                new RowSpec[]{
                        RowSpec.decode("fill:12dlu:grow"),//roi and stuff
                        RowSpec.decode("fill:pref:grow"),
                        RowSpec.decode("fill:12dlu:grow"),//selection info
                        RowSpec.decode("top:pref"),
                        RowSpec.decode("fill:12dlu:grow"), //physics
                        RowSpec.decode("fill:pref"),
                        RowSpec.decode("fill:pref"),
                        RowSpec.decode("fill:pref")
                });

        JPanel panel = new JPanel(layout);
        CellConstraints cc = new CellConstraints();
        panel.add(new JLabel("Event Information"), cc.xywh(1, 1, 6, 1));
        panel.add(new JLabel("ROI "), cc.xy(1, 2));
        panel.add(roiField, cc.xy(2, 2));

        panel.add(new JLabel("Time "), cc.xy(3, 2));
        panel.add(timeField, cc.xy(4, 2));

        panel.add(new JLabel("Run ID "), cc.xy(5, 2));
        panel.add(runIDField, cc.xy(6, 2));
        panel.add(new JLabel("Selection Information"), cc.xywh(1, 3, 6, 1));
        panel.add(new JLabel(("Pixel IDs")), cc.xy(1, 4));
        panel.add(new JScrollPane(pixIDList), cc.xywh(2, 4, 5, 1));

        panel.add(new JLabel("Addition Physics Information"), cc.xywh(1, 5, 6, 1));
        panel.add(new JLabel("Charge Mean/Deviation"), cc.xywh(1, 6, 2, 1));
        panel.add(chargeField, cc.xywh(3, 6, 1, 1));
        panel.add(chargeFieldStd, cc.xywh(4, 6, 1, 1));
        panel.add(new JLabel("Width, Length"), cc.xywh(1, 7, 2, 1));
        panel.add(widthField, cc.xywh(3, 7, 1, 1));
        panel.add(lengthField, cc.xywh(4, 7, 1, 1));

        panel.add(new JLabel("Size (of Shower)"), cc.xywh(1, 8, 2, 1));
        panel.add(sizeField, cc.xywh(3, 8, 2, 1));


        contentPanel.add(panel);
        add(contentPanel);
    }
 
開發者ID:fact-project,項目名稱:fact-tools,代碼行數:78,代碼來源:EventInfoPanel.java


注:本文中的com.jgoodies.forms.layout.ColumnSpec.decode方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。