当前位置: 首页>>代码示例>>Java>>正文


Java PanelBuilder.getPanel方法代码示例

本文整理汇总了Java中com.jgoodies.forms.builder.PanelBuilder.getPanel方法的典型用法代码示例。如果您正苦于以下问题:Java PanelBuilder.getPanel方法的具体用法?Java PanelBuilder.getPanel怎么用?Java PanelBuilder.getPanel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.jgoodies.forms.builder.PanelBuilder的用法示例。


在下文中一共展示了PanelBuilder.getPanel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: definePanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private JPanel definePanel (Classifier classifier)
{
    final String pi = Panel.getPanelInterline();
    FormLayout layout = new FormLayout("pref", "pref," + pi + ",pref," + pi + ",pref");

    CellConstraints cst = new CellConstraints();
    PanelBuilder builder = new PanelBuilder(layout, new TitledPanel(classifier.getName()));
    Task task = new Task(classifier);

    int r = 1; // --------------------------------
    builder.add(new TrainingPanel(task, selectionPanel).getComponent(), cst.xy(1, r));

    r += 2; // --------------------------------
    builder.add(new ValidationPanel(task, selectionPanel, true).getComponent(), cst.xy(1, r));

    r += 2; // --------------------------------
    builder.add(new ValidationPanel(task, selectionPanel, false).getComponent(), cst.xy(1, r));

    return builder.getPanel();
}
 
开发者ID:Audiveris,项目名称:audiveris,代码行数:21,代码来源:Trainer.java

示例2: getPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
public JPanel getPanel() {
	if (_panel == null) {
		PanelBuilder b = new PanelBuilder(new FormLayout(
			"center:pref",
			"max(140px;pref), 3dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref"
		));
		b.opaque(true);
		CellConstraints cc = new CellConstraints();
		b.add(icon, cc.xy(1, 1));
		b.add(label, cc.xy(1, 3, CellConstraints.CENTER, CellConstraints.DEFAULT));
		b.add(rendererProgressBar, cc.xy(1, 5));
		b.add(playing, cc.xy(1, 7, CellConstraints.CENTER, CellConstraints.DEFAULT));
		b.add(time, cc.xy(1, 9));
		_panel = b.getPanel();
	}
	return _panel;
}
 
开发者ID:DigitalMediaServer,项目名称:DigitalMediaServer,代码行数:18,代码来源:StatusTab.java

示例3: init

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
protected void init(String labelString, List<JComponent> components)
{
	JComponent componentToAdd;
       if (components.size() == 1) {
           componentToAdd = components.get(0);
       } else {
           componentToAdd = new JPanel(new FlowLayout(0, 0, FlowLayout.CENTER));
           componentToAdd.setOpaque(false);
           for (JComponent component : components) {
               componentToAdd.add(component);
           }
       }

       // definte the FormLayout columns and rows.
       FormLayout layout = new FormLayout("p", "fill:p:grow, p");
       // create the cell constraints to use in the layout.
       CellConstraints cc = new CellConstraints();
       // create the builder with our panel as the component to be filled.
       PanelBuilder builder = new PanelBuilder(layout, new JPanel());

       builder.add(componentToAdd, cc.xy(1, 1, "center, center"));
       builder.add(createLabel(labelString), cc.xy(1, 2, "center, top"));

       fComponent = builder.getPanel();
       fComponent.setOpaque(false);
}
 
开发者ID:mathieulegoc,项目名称:SmartTokens,代码行数:27,代码来源:LabeledComponentGroup.java

示例4: createGlobalPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private JPanel createGlobalPanel ()
{
    final String panelInterline = Panel.getPanelInterline();
    FormLayout layout = new FormLayout(
            "pref",
            "pref," + panelInterline + "," + "pref," + panelInterline + ","
            + "pref," + panelInterline + "," + "pref");

    CellConstraints cst = new CellConstraints();
    PanelBuilder builder = new PanelBuilder(layout, new Panel());
    builder.setDefaultDialogBorder();

    int r = 1; // --------------------------------
    builder.add(selectionPanel.getComponent(), cst.xy(1, r));

    r += 2; // --------------------------------
    builder.add(networkPanel.getComponent(), cst.xy(1, r));

    r += 2; // --------------------------------
    builder.add(validationPanel.getComponent(), cst.xy(1, r));

    r += 2; // --------------------------------
    builder.add(regressionPanel.getComponent(), cst.xy(1, r));

    return builder.getPanel();
}
 
开发者ID:jlpoolen,项目名称:libreveris,代码行数:27,代码来源:GlyphTrainer.java

示例5: getSelectorsPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private JPanel getSelectorsPanel ()
{
    FormLayout layout = new FormLayout(
            "max(100dlu;pref),max(150dlu;pref),max(200dlu;pref):grow", // Cols
            "pref:grow"); // Rows

    PanelBuilder builder = new PanelBuilder(layout);
    builder.setDefaultDialogBorder();

    CellConstraints cst = new CellConstraints();

    int r = 1; // --------------------------------
    builder.add(folderSelector, cst.xy(1, r));
    builder.add(shapeSelector, cst.xy(2, r));
    builder.add(glyphSelector, cst.xy(3, r));

    return builder.getPanel();
}
 
开发者ID:jlpoolen,项目名称:libreveris,代码行数:19,代码来源:SampleVerifier.java

示例6: getMainPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private Component getMainPanel() {
	FormLayout layout = new FormLayout("10dlu, p, 5dlu, p, 10dlu", getRowLayout());
	PanelBuilder builder = new PanelBuilder(layout);
	builder.add(new JLabel("RegIN Files"), cc.xy(2, 2));
	builder.addSeparator("", cc.xyw(2, 3, 3));
	int i = 0;
	
	for(String str : networkFiles.keySet()) {
		builder.add(new JLabel(networkFiles.get(str).getSourceName()), cc.xy(2, 2*i+5));
		JCheckBox box = new JCheckBox();
		box.setSelected(true);
		builder.add(box, cc.xy(4, 2*i+5));
		cbMap.put(str, box);
		i++;
	}

	JScrollPane pane = new JScrollPane(builder.getPanel());
	return pane;
}
 
开发者ID:CyTargetLinker,项目名称:cytargetlinker,代码行数:20,代码来源:RegINSelectionDlg.java

示例7: getSettings

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private Component getSettings() {
	FormLayout layout = new FormLayout("right:max(72dlu;p), 10dlu, 75dlu, 10dlu", "5dlu, p, 5dlu");
       PanelBuilder builder = new PanelBuilder(layout);
       builder.setDefaultDialogBorder();
       builder.setBorder(new TitledBorder("Settings"));
       
       Vector<Direction> vec = new Vector<Direction>();
       vec.add(Direction.BOTH);
       vec.add(Direction.SOURCE);
       vec.add(Direction.TARGET);
       cbDirection = new JComboBox(vec);
       cbDirection.setSelectedIndex(0);
       
       builder.add(new JLabel("Select direction"), cc.xy(1, 2));
       builder.add(cbDirection, cc.xy(3, 2));
       return builder.getPanel();
}
 
开发者ID:CyTargetLinker,项目名称:cytargetlinker,代码行数:18,代码来源:ExtensionDialog.java

示例8: buildPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
public JPanel buildPanel() {
	FormLayout layout = new FormLayout("left:pref, 400:grow");
	PanelBuilder builder = new PanelBuilder(layout);
	builder.border(new EmptyBorder(10, 10, 10, 10));
	int y = 0;

	builder.appendRow(rspec);
	editBar = new JPanel();
	editBar.setLayout(new BoxLayout(editBar, BoxLayout.X_AXIS));
	builder.add(editBar, cc.xyw(1, ++y, 2));
	if (/*renderer.loaded &&*/ !renderer.isFileless()) {
		buildEditBar(false);
	}
	builder.appendRow(rspec);
	builder.addLabel(" ", cc.xy(1, ++y));

	y = addMap(renderer.getDetails(), builder, y);
	if (renderer.isUpnp()) {
		y = addStrings("Services", WordUtils.wrap(StringUtils.join(renderer.getUpnpServices(), ", "), 60).split("\n"),
			builder, y);
	}

	if (renderer.isControllable()) {
		builder.appendRow(rspec);
		builder.addLabel(" ", cc.xy(1, ++y));
		builder.appendRow(rspec);
		builder.addSeparator(Messages.getString("RendererPanel.1"), cc.xyw(1, ++y, 2));
		builder.appendRow(rspec);
		builder.add(new PlayerControlPanel(renderer.getPlayer()), cc.xyw(1, ++y, 2));
	}
	return builder.getPanel();
}
 
开发者ID:DigitalMediaServer,项目名称:DigitalMediaServer,代码行数:33,代码来源:RendererPanel.java

示例9: getJContentPane

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private JPanel getJContentPane() {
	if (jContentPane == null) {
     FormLayout layout = new FormLayout(
         "2dlu:grow ,left:100dlu, 2dlu:grow",  //$NON-NLS-1$
         "5dlu, pref, 2dlu, pref, 2dlu:grow"); //$NON-NLS-1$
     CellConstraints cc = new CellConstraints();
     pb = new PanelBuilder(layout);
     pb.setDefaultDialogBorder();
     pb.addLabel(Messages.getString("circulation.note"), cc.xy(2,2)); //$NON-NLS-1$
     pb.add(getJTextField(), cc.xy(2,4,"fill, fill")); //$NON-NLS-1$
		jContentPane = pb.getPanel();
	}
	return jContentPane;
}
 
开发者ID:unsftn,项目名称:bisis-v4,代码行数:15,代码来源:Note.java

示例10: createFileList

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private Component createFileList() {

		String rowLayout = "4dlu,pref,15dlu,4dlu,";
		for(int i = 0; i < files.size(); i++) {
			rowLayout = rowLayout + "pref,4dlu,";
		}
		rowLayout = rowLayout + "4dlu";
		
		FormLayout layout = new FormLayout("4dlu,pref,4dlu,pref,5dlu", rowLayout);
		CellConstraints cc = new CellConstraints();
		
		PanelBuilder panel = new PanelBuilder(layout);
		panel.setBackground(Color.white);
		panel.addLabel("Please select all files that implement the PathVisio plugin interface.", cc.xy(2, 2));
		panel.addSeparator("", cc.xyw(2, 3, 3));
		
		int row = 5;
		for(File f : files) {
			panel.add(new JLabel(f.getName()), cc.xy(2, row));
			JCheckBox cb = new JCheckBox();
			cb.setBackground(Color.white);
			panel.add(cb, cc.xy(4, row));
			cbs.put(f,cb);
			row = row + 2;
		}
		
		JScrollPane pane = new JScrollPane(panel.getPanel());
		pane.setBackground(Color.white);
		
		return pane;
	}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:32,代码来源:RunLocalPluginDialog.java

示例11: getNorthPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private JPanel getNorthPanel() {
	FormLayout layout = new FormLayout("5dlu,pref,5dlu,pref,fill:pref:grow","10dlu,pref,5dlu,pref,15dlu");
	PanelBuilder builder = new PanelBuilder(layout);
	builder.setBackground(Color.white);
	CellConstraints cc = new CellConstraints();
	
	builder.addLabel("Browse by tag", cc.xy(2, 2));
	tagBox = new JComboBox(getTags());
	tagBox.setSelectedItem(currentTag);
	tagBox.addActionListener(new ActionListener() {
		
		@Override
		public void actionPerformed(ActionEvent arg0) {
			String item = (String) tagBox.getSelectedItem();
	        if (item != null) {
	        	currentTag = item;
	        	updatePluginPanel();
	        }
		}
	});
	
	builder.add(tagBox, cc.xy(4, 2));
	numPlugins = new JLabel();
	Font newLabelFont=new Font(numPlugins.getFont().getName(),Font.ITALIC,numPlugins.getFont().getSize());
	numPlugins.setFont(newLabelFont);
	numPlugins.setText(countPlugins + " plugins were found.");
	builder.add(numPlugins, cc.xyw(4, 4, 2));
	
	builder.addSeparator("", cc.xyw(2, 5, 4));
	
	return builder.getPanel();
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:33,代码来源:InstalledPluginsPanel.java

示例12: getNorthPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private JPanel getNorthPanel() {
	FormLayout layout = new FormLayout("5dlu,pref,5dlu,pref,fill:pref:grow","10dlu,pref,5dlu,pref,15dlu");
	PanelBuilder builder = new PanelBuilder(layout);
	builder.setBackground(Color.white);
	CellConstraints cc = new CellConstraints();
	
	builder.addLabel("Browse by tag", cc.xy(2, 2));
	tagBox = new JComboBox(getTags());
	tagBox.setSelectedItem(currentTag);
	tagBox.addActionListener(new ActionListener() {
		
		@Override
		public void actionPerformed(ActionEvent arg0) {
			String item = (String) tagBox.getSelectedItem();
	        if (item != null) {
	        	currentTag = item;
	        	updatePluginPanel();
	        }
		}
	});
	
	builder.add(tagBox, cc.xy(4, 2));
	numPlugins = new JLabel();
	Font newLabelFont=new Font(numPlugins.getFont().getName(),Font.ITALIC,numPlugins.getFont().getSize());
	numPlugins.setFont(newLabelFont);
	numPlugins.setText(countPlugins + " plugins were found.");
	builder.add(numPlugins, cc.xyw(4, 4, 2));
	builder.addSeparator("", cc.xyw(2, 5, 4));
	
	return builder.getPanel();
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:32,代码来源:AvailablePluginsPanel.java

示例13: getConnectionSuccessPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private JPanel getConnectionSuccessPanel() {
	FormLayout layout = new FormLayout("5dlu,pref,5dlu,pref,fill:pref:grow","10dlu,pref,5dlu,pref,15dlu");
	PanelBuilder builder = new PanelBuilder(layout);
	builder.setBackground(Color.white);
	CellConstraints cc = new CellConstraints();
	
	builder.addLabel(manager.getStatusMessage(), cc.xy(2, 2));
	
	builder.addSeparator("", cc.xyw(2, 5, 4));
	
	return builder.getPanel();
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:13,代码来源:StatusPanel.java

示例14: getRepositoryList

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private JComponent getRepositoryList() {
	int count = manager.getOnlineRepos().size();
	String row = "10dlu,pref,5dlu,";
	for(int i = 0; i < count; i++) {
		row = row + "pref, 5dlu,";
	}
	row = row + "5dlu";

	FormLayout layout = new FormLayout("5dlu,pref,5dlu,pref,5dlu",row);
	PanelBuilder builder = new PanelBuilder(layout);
	builder.setBackground(Color.white);
	CellConstraints cc = new CellConstraints();

	builder.addLabel("Repository name", cc.xy(2, 2));
	builder.addLabel("URL", cc.xy(4, 2));
	
	int currRow = 4;
	for(PVRepository repo : manager.getOnlineRepos()) {
		JLabel name = new JLabel(repo.getName());
		Font newLabelFont=new Font(name.getFont().getName(),Font.ITALIC, name.getFont().getSize());
		name.setFont(newLabelFont);
		builder.add(name, cc.xy(2, currRow));
		
		JEditorPane link = new JEditorPane();
		link.setBackground(Color.white);
		link.setEditable(false);
		link.setContentType("text/html");
		link.setText("<html><a href=\"" + repo.getUrl() + "\">" + repo.getUrl() + "</a></html>");
		link.addHyperlinkListener(manager.getDesktop().getSwingEngine());
		builder.add(link, cc.xy(4, currRow));
		currRow = currRow + 2;
	}
	return builder.getPanel();
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:35,代码来源:StatusPanel.java

示例15: getConnectionErrorPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private JPanel getConnectionErrorPanel() {
	FormLayout layout = new FormLayout("5dlu,pref,5dlu,pref,fill:pref:grow","10dlu,pref,5dlu,pref,15dlu");
	PanelBuilder builder = new PanelBuilder(layout);
	builder.setBackground(Color.white);
	CellConstraints cc = new CellConstraints();
	
	builder.addLabel(manager.getStatusMessage(), cc.xy(2, 2));
	
	builder.addSeparator("", cc.xyw(2, 5, 4));
	
	return builder.getPanel();
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:13,代码来源:StatusPanel.java


注:本文中的com.jgoodies.forms.builder.PanelBuilder.getPanel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。