• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java JXRadioGroup类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.jdesktop.swingx.JXRadioGroup的典型用法代码示例。如果您正苦于以下问题:Java JXRadioGroup类的具体用法?Java JXRadioGroup怎么用?Java JXRadioGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

JXRadioGroup类属于org.jdesktop.swingx包,在下文中一共展示了JXRadioGroup类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: initComponents

点赞 3

import org.jdesktop.swingx.JXRadioGroup; //导入依赖的package包/类
/**
 * This method is called from within the constructor to initialize the form.
 */
private void initComponents() {

    table = new JXTable(createTableModel());

    // table = new JXTreeTable(new ActionMapTreeTableModel(new
    // JXTreeTable()));

    list = new JXList(createListModel());

    tree = new JXTree(createTreeModel());

    // control components
    nextButton = new JButton("Find next");
    radioGroup = new JXRadioGroup();
    inputText = new JTextField();
    patternText = new JTextField();
}
 

开发者ID:RockManJoe64,
项目名称:swingx,
代码行数:21,
代码来源:DecoratorDemo.java

示例2: createDemo

点赞 2

import org.jdesktop.swingx.JXRadioGroup; //导入依赖的package包/类
protected void createDemo() {
        JXRadioGroup<String> rg = JXRadioGroup.create(new String[]{"a", "b", "c"});
//        rg.setText("Title");
//        rg.setMnemonic(KeyEvent.VK_T);
        add(rg);
        add(new JButton("something else"));
    }
 

开发者ID:RockManJoe64,
项目名称:swingx,
代码行数:8,
代码来源:RadioGroupDemo.java

示例3: init

点赞 2

import org.jdesktop.swingx.JXRadioGroup; //导入依赖的package包/类
private void init() {
		header = new DialogHeader("Auto-validate Session", "Fill IPA tiers for the session.");
		
		FormLayout tierLayout = new FormLayout(
				"fill:pref:grow", "pref, pref, pref");
		CellConstraints cc = new CellConstraints();
		
		JPanel tierPanel = new JPanel(tierLayout);
		
		validateTargetBox = new JCheckBox("Auto-validate IPA Target");
		validateTargetBox.setSelected(true);
		
		validateActualBox = new JCheckBox("Auto-validate IPA Actual");
		validateActualBox.setSelected(true);
		
		overwriteDataBox = new JCheckBox("Overwrite existing data");
		overwriteDataBox.setSelected(false);
		
		tierPanel.add(validateTargetBox, cc.xy(1, 1));
		tierPanel.add(validateActualBox, cc.xy(1, 2));
		tierPanel.add(overwriteDataBox, cc.xy(1, 3));
		tierPanel.setBorder(BorderFactory.createTitledBorder("Tiers"));
		
		FormLayout trLayout = new FormLayout(
				"fill:pref:grow", "pref, pref, pref");
		JPanel trPanel = new JPanel(trLayout);
		
		trGroup = new JXRadioGroup<String>();
		trGroup.setLayoutAxis(BoxLayout.Y_AXIS);
		
		List<String> trNames = new ArrayList<String>();
		for(Transcriber tr:session.getTranscribers()) {
			trNames.add(getTrDisplayString(tr));
		}
		
//		ITranscriber[] trs = session.getTranscribers().toArray(new ITranscriber[0]);
		trGroup.setValues(trNames.toArray(new String[0]));
		if(trNames.size() > 0)
			trGroup.setSelectedValue(trNames.get(0));
		
		trPanel.add(new JLabel("If only one IPA transcript exists it is selected."), cc.xy(1,1));
		trPanel.add(new JLabel("If more than one IPA transcript exists, choose IPA for transcriber:"), cc.xy(1, 2));
		trPanel.add(trGroup, cc.xy(1,3));
		
		trPanel.setBorder(BorderFactory.createTitledBorder("IPA Selection"));
		
		recordFilterPanel = new RecordFilterPanel(project, session);
		recordFilterPanel.setBorder(BorderFactory.createTitledBorder("Record Selection"));
		FormLayout centerLayout = new FormLayout(
				"fill:pref:grow", "pref, pref, pref");
		JPanel centerPanel = new JPanel(centerLayout);
		
		centerPanel.add(tierPanel, cc.xy(1,1));
		centerPanel.add(trPanel, cc.xy(1,2));
		centerPanel.add(recordFilterPanel, cc.xy(1,3));
		
		// button bar
		PhonUIAction okAction = new PhonUIAction(this, "onOk");
		okAction.putValue(Action.NAME, "Ok");
		okAction.putValue(Action.SHORT_DESCRIPTION, "Perform auto-validation and close dialog");
		
		okButton = new JButton(okAction);
		
		PhonUIAction cancelAction = new PhonUIAction(this, "onCancel");
		cancelAction.putValue(Action.NAME, "Cancel");
		cancelAction.putValue(Action.SHORT_DESCRIPTION, "Cancel auto-validation and close dialog");
		
		cancelButton = new JButton(cancelAction);
		
		final JComponent buttonBar = ButtonBarBuilder.buildOkCancelBar(okButton, cancelButton);
		
		setLayout(new BorderLayout());
		add(header, BorderLayout.NORTH);
		add(centerPanel, BorderLayout.CENTER);
		add(buttonBar, BorderLayout.SOUTH);
		
		getRootPane().setDefaultButton(okButton);
	}
 

开发者ID:phon-ca,
项目名称:phon,
代码行数:79,
代码来源:AutoValidateDialog.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)