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


Java JTabbedPane.setPreferredSize方法代码示例

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


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

示例1: createTabsPanel

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
private JComponent createTabsPanel() {
    JTabbedPane result = new JTabbedPane();
    result.setPreferredSize(new Dimension(500, 100));
    // panel with basic settings
    SettingsPanel searchPanel = new SettingsPanel(this, "Search");
    addEditor(searchPanel, ExploreKey.TRAVERSE);
    addEditor(searchPanel, ExploreKey.RANDOM);
    addEditor(searchPanel, ExploreKey.ACCEPTOR);
    addEditor(searchPanel, ExploreKey.COUNT);
    addTab(result, searchPanel);
    // panel with basic settings
    SettingsPanel checkingPanel = new SettingsPanel(this, "Model Checking");
    addEditor(checkingPanel, ExploreKey.CHECKING);
    addTab(result, checkingPanel);
    // panel with advanced settings
    SettingsPanel advancedPanel = new SettingsPanel(this, "Advanced");
    addEditor(advancedPanel, ExploreKey.ALGEBRA);
    addEditor(advancedPanel, ExploreKey.ISO);
    addEditor(advancedPanel, ExploreKey.MATCHER);
    addTab(result, advancedPanel);
    return result;
}
 
开发者ID:meteoorkip,项目名称:JavaGraph,代码行数:23,代码来源:ExploreConfigDialog.java

示例2: createClientEditorsSection

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
protected JComponent createClientEditorsSection()
{
	freemarker = createHtmlHighlightingPane();
	jquery = new JShuffleBox<NameValue>();
	onloadJs = createJavascriptHighlightingPane();
	onsubmitJs = createJavascriptHighlightingPane();

	JTabbedPane clientEditors = new JTabbedPane();
	addCodeTab(clientEditors, "tab.template", new RTextScrollPane(freemarker)); //$NON-NLS-1$
	addCodeTab(clientEditors, "tab.onload", new RTextScrollPane(onloadJs)); //$NON-NLS-1$
	addCodeTab(clientEditors, "tab.onsubmit", new RTextScrollPane(onsubmitJs)); //$NON-NLS-1$
	clientEditors.addTab(getString("tab.libraries"), jquery); //$NON-NLS-1$
	clientEditors.setPreferredSize(new Dimension(clientEditors.getWidth(), CODE_HEIGHT));

	return clientEditors;
}
 
开发者ID:equella,项目名称:Equella,代码行数:17,代码来源:AdvancedScriptControlEditor.java

示例3: createRightPane

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
@Override
protected JComponent createRightPane() {
	JTabbedPane tabs = new JTabbedPane();
	tabs.addTab("One", new SelectionPanel(graphpanel));
	tabs.addTab("Two", new JLabel("Two"));
	tabs.addTab("Three", new JLabel("Three"));
	tabs.setPreferredSize(new Dimension(80, 300));
	return tabs;
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:10,代码来源:PaneledGuiDemo.java

示例4: initializeRightPane

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
private void initializeRightPane() {
	JTabbedPane tabs = new JTabbedPane();

	tabs.addTab("Selection", new SelectionPanel(new MySelectionTreeModel(),
			graphpanel));
	tabs.addTab("Mapping",
			mappingPanel = new MappingPanel(graphpanel, scenario));

	tabs.setPreferredSize(new Dimension(250, 300));
	this.rightPane.add(tabs, BorderLayout.CENTER);
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:12,代码来源:GUI.java

示例5: createServerEditorsSection

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
protected JComponent createServerEditorsSection()
{
	readJs = createJavascriptHighlightingPane();
	storeJs = createJavascriptHighlightingPane();

	JTabbedPane serverEditors = new JTabbedPane();
	addCodeTab(serverEditors, "tab.read", new RTextScrollPane(readJs)); //$NON-NLS-1$
	addCodeTab(serverEditors, "tab.store", new RTextScrollPane(storeJs)); //$NON-NLS-1$
	serverEditors.setPreferredSize(new Dimension(serverEditors.getWidth(), CODE_HEIGHT));

	return serverEditors;
}
 
开发者ID:equella,项目名称:Equella,代码行数:13,代码来源:AdvancedScriptControlEditor.java

示例6: PreferencesFrame

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
private PreferencesFrame() {
	setDefaultCloseOperation(HIDE_ON_CLOSE);
	setJMenuBar(new LogisimMenuBar(this, null));

	panels = new OptionsPanel[] { new TemplateOptions(this), new IntlOptions(this), new WindowOptions(this),
			new LayoutOptions(this), new ExperimentalOptions(this), new ForkOptions(this), };
	tabbedPane = new JTabbedPane();
	int intlIndex = -1;
	for (int index = 0; index < panels.length; index++) {
		OptionsPanel panel = panels[index];
		tabbedPane.addTab(panel.getTitle(), null, panel, panel.getToolTipText());
		if (panel instanceof IntlOptions)
			intlIndex = index;
	}

	JPanel buttonPanel = new JPanel();
	buttonPanel.add(close);
	close.addActionListener(myListener);

	Container contents = getContentPane();
	tabbedPane.setPreferredSize(new Dimension(450, 300));
	contents.add(tabbedPane, BorderLayout.CENTER);
	contents.add(buttonPanel, BorderLayout.SOUTH);

	if (intlIndex >= 0)
		tabbedPane.setSelectedIndex(intlIndex);

	LocaleManager.addLocaleListener(myListener);
	myListener.localeChanged();
	pack();
	setLocationRelativeTo(null);
}
 
开发者ID:LogisimIt,项目名称:Logisim,代码行数:33,代码来源:PreferencesFrame.java

示例7: LogFrame

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
public LogFrame(Project project) {
	this.project = project;
	this.windowManager = new WindowMenuManager();
	project.addProjectListener(myListener);
	project.addLibraryListener(myListener);
	setDefaultCloseOperation(HIDE_ON_CLOSE);
	setJMenuBar(new LogisimMenuBar(this, project));
	setSimulator(project.getSimulator(), project.getCircuitState());

	panels = new LogPanel[] { new SelectionPanel(this), new ScrollPanel(this), new FilePanel(this), };
	tabbedPane = new JTabbedPane();
	for (int index = 0; index < panels.length; index++) {
		LogPanel panel = panels[index];
		tabbedPane.addTab(panel.getTitle(), null, panel, panel.getToolTipText());
	}

	JPanel buttonPanel = new JPanel();
	buttonPanel.add(clearLog);
	clearLog.addActionListener(myListener);

	Container contents = getContentPane();
	tabbedPane.setPreferredSize(new Dimension(450, 300));
	contents.add(tabbedPane, BorderLayout.CENTER);
	contents.add(buttonPanel, BorderLayout.SOUTH);

	LocaleManager.addLocaleListener(myListener);
	myListener.localeChanged();
	pack();
	setLocationRelativeTo(null);
}
 
开发者ID:LogisimIt,项目名称:Logisim,代码行数:31,代码来源:LogFrame.java

示例8: OptionsFrame

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
public OptionsFrame(Project project) {
	this.project = project;
	this.file = project.getLogisimFile();
	file.addLibraryListener(myListener);
	setDefaultCloseOperation(HIDE_ON_CLOSE);
	setJMenuBar(new LogisimMenuBar(this, project));

	panels = new OptionsPanel[] { new SimulateOptions(this), new ToolbarOptions(this), new MouseOptions(this), };
	tabbedPane = new JTabbedPane();
	for (int index = 0; index < panels.length; index++) {
		OptionsPanel panel = panels[index];
		tabbedPane.addTab(panel.getTitle(), null, panel, panel.getToolTipText());
	}

	JPanel buttonPanel = new JPanel();
	buttonPanel.add(revert);
	buttonPanel.add(close);
	revert.addActionListener(myListener);
	close.addActionListener(myListener);

	Container contents = getContentPane();
	tabbedPane.setPreferredSize(new Dimension(450, 300));
	contents.add(tabbedPane, BorderLayout.CENTER);
	contents.add(buttonPanel, BorderLayout.SOUTH);

	LocaleManager.addLocaleListener(myListener);
	myListener.localeChanged();
	pack();
	setLocationRelativeTo(null);
}
 
开发者ID:LogisimIt,项目名称:Logisim,代码行数:31,代码来源:OptionsFrame.java

示例9: initOutputPane

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
private void initOutputPane()
{
    JTabbedPane output = new JTabbedPane(JTabbedPane.BOTTOM);
    JConsole console = new JConsole();

    console.setBackground(Color.WHITE);
    _model = new DemoModel(console);
    _console = new JConsole();

    output.addTab("Console", _console);
    output.setBackground(Color.WHITE);
    output.setPreferredSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));
    output.addTab("Interpreter", console);
    try
    {

        //
        _helpTextArea.setText(_model.help());
    }
    catch (IOException x)
    {
        exceptionThrown(x);
    }

    //
    _container.add(output);
}
 
开发者ID:JetBrains,项目名称:intellij-deps-ini4j,代码行数:28,代码来源:Demo.java

示例10: initPanel

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
private void initPanel() {
	this.setLayout(new BorderLayout(20, 5));

	/*Set Description Label*/
	Box label = Box.createVerticalBox();
	label.add(Box.createVerticalStrut(10));
	label.add(new JLabel(CLUSTERING_INFO_DESCRIPTION));
	this.add(label, BorderLayout.NORTH);
	JPanel p1 = new JPanel(new BorderLayout());

	/*Set list of clustering*/
	Box listsPanel = Box.createHorizontalBox();
	listsPanel.add(Box.createHorizontalStrut(10));

	JPanel west = new JPanel(new GridLayout(2, 1, 0, 0));
	west.setPreferredSize(new Dimension(200, 400));

	listsPanel.add(west);
	listsPanel.add(Box.createHorizontalStrut(10));

	JPanel clusting = new JPanel(new BorderLayout(0, 5));

	//La Table del clustering sempre presente e poi aggiunta a seconda del tipo
	clusting.add(new JLabel(HTML_START + HTML_FONT_TITLE + "Clusterings" + HTML_FONT_TIT_END_NO_CAPO + HTML_FONT_NORM), BorderLayout.NORTH);
	clusting.add(new JScrollPane(getClusteringTable(), ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
			ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED), BorderLayout.CENTER);

	west.add(clusting);
	west.add(cluster);
	p1.add(listsPanel, BorderLayout.WEST);

	/*Set Tabbed for statistics*/
	tabbed = new JTabbedPane();
	tabbed.setPreferredSize(new Dimension(600, 400));
	p1.add(tabbed, BorderLayout.CENTER);

	clusingP = new JPanel(new GridLayout(1, 1));
	clusingP.setName("Clustering Info");
	clusingP.setPreferredSize(new Dimension(600, 400));
	tabbed.add(clusingP);

	clustP = new JPanel(new GridLayout(1, 1));
	clustP.setName("Cluster Info");
	clustP.setPreferredSize(new Dimension(600, 400));
	tabbed.add(clustP);

	matrixPanel = new JPanel(new GridLayout(1, 1));
	matrixPanel.setPreferredSize(new Dimension(600, 400));
	matrixPanel.setName("Dispersion Matrix");
	tabbed.add(matrixPanel);

	this.add(p1, BorderLayout.CENTER);
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:54,代码来源:ClusteringInfoPanel.java

示例11: initPanel

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
private void initPanel() {
	this.setLayout(new BorderLayout(20, 5));

	/*Set Description Label*/
	Box label = Box.createVerticalBox();
	label.add(Box.createVerticalStrut(10));
	label.add(new JLabel(CLUSTERING_INFO_DESCRIPTION));
	this.add(label, BorderLayout.NORTH);
	//JPanel p1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
	JPanel p1 = new JPanel(new BorderLayout());

	/*Set list of clustering*/
	Box listsPanel = Box.createHorizontalBox();
	listsPanel.add(Box.createHorizontalStrut(10));

	JPanel west = new JPanel(new GridLayout(2, 1, 0, 0));
	west.setPreferredSize(new Dimension(200, 400));

	listsPanel.add(west);
	listsPanel.add(Box.createHorizontalStrut(10));

	JPanel clusting = new JPanel(new BorderLayout(0, 5));
	//JPanel cluster=new JPanel(new BorderLayout(0,5));

	//La Table del clustering sempre presente e poi aggiunta a seconda del tipo
	clusting.add(new JLabel(HTML_START + HTML_FONT_TITLE + "Clusterings" + HTML_FONT_TIT_END_NO_CAPO + HTML_FONT_NORM), BorderLayout.NORTH);
	clusting.add(new JScrollPane(getClusteringTable(), ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
			ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED), BorderLayout.CENTER);

	//cluster.add(new JLabel(HTML_START
	//		+ HTML_FONT_TITLE +"Num. Of Clusters"+ HTML_FONT_TIT_END_NO_CAPO + HTML_FONT_NORM),BorderLayout.NORTH);
	//cluster.add(new JScrollPane(getClusterTable(),JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED),BorderLayout.CENTER);

	west.add(clusting);
	west.add(cluster);
	p1.add(listsPanel, BorderLayout.WEST);

	/*Set Tabbed for statistics*/
	tabbed = new JTabbedPane();
	tabbed.setPreferredSize(new Dimension(600, 400));
	p1.add(tabbed, BorderLayout.CENTER);

	clusingP = new JPanel(new GridLayout(1, 1));
	clusingP.setName("Clustering Info");
	clusingP.setPreferredSize(new Dimension(600, 400));
	tabbed.add(clusingP);

	clustP = new JPanel(new GridLayout(1, 1));
	clustP.setName("Cluster Info");
	clustP.setPreferredSize(new Dimension(600, 400));
	tabbed.add(clustP);

	matrixPanel = new JPanel(new GridLayout(1, 1));
	matrixPanel.setPreferredSize(new Dimension(600, 400));
	matrixPanel.setName("Dispersion Matrix");
	tabbed.add(matrixPanel);

	this.add(p1, BorderLayout.CENTER);
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:60,代码来源:ClusteringInfoPanel.java

示例12: DataEntry

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
public DataEntry() throws IOException
{
    super("DataEntry");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new BarcodeScannerWatcher());

    menus = new Menus();
    setJMenuBar(menus);

    setupBar = new SelectionBar();
    numberTree = new ClassTree();
    addByName = new AddByNamePanel();
    announcer = new AnnouncerPanel();

    tabs = new JTabbedPane();
    tabs.setMinimumSize(new Dimension(270, 400));
    tabs.setPreferredSize(new Dimension(270, 768));
    tabs.addTab("Add By Name", addByName);
    tabs.addTab("Quick Entry", new QuickEntrySearch());
    tabs.addTab("Preregistered", new JScrollPane(numberTree));
    tabs.addTab("Announcer Data", announcer);

    DoubleTableContainer tableScroll = new DoubleTableContainer();
    timeEntry = new TimeEntry();
    menus.add(timeEntry.getTimerMenu());

    HelpPanel help = new HelpPanel();
    MyIpLabel myip = new MyIpLabel();
    help.setBorder(BorderFactory.createLoweredBevelBorder());
    myip.setBorder(BorderFactory.createLoweredBevelBorder());

    JPanel infoBoxes = new JPanel(new MigLayout("fill, ins 0", "[75%]0[25%]"));
    infoBoxes.add(help, "grow, hmin 20");
    infoBoxes.add(myip, "grow");

    JPanel miniPanels = new JPanel(new MigLayout("fill, ins 0, gap 0", "", ""));
    miniPanels.add(new MiniInput.ManualBarcodeInput(), "growx, growy 0, hidemode 2, wrap");
    miniPanels.add(new MiniInput.FilterEntries(), "growx, growy 0, hidemode 2, wrap");

    JPanel content = new JPanel(new MigLayout("fill, ins 1, gap 2", "[grow 0][fill][grow 0]", "[grow 0][grow 0][grow 100][grow 0]"));
    content.add(setupBar, "spanx 3, growx, wrap");
    content.add(tabs, "spany 2, growx 0, growy");
    content.add(miniPanels, "growx, growy 0, hidemode 2");
    content.add(timeEntry, "spany 2, growx 0, growy, w 150!, wrap");
    content.add(tableScroll, "grow, wrap");
    content.add(infoBoxes, "spanx 3, growx, wrap");

    setContentPane(content);
    setBounds(Prefs.getWindowBounds("dataentry"));
    Prefs.trackWindowBounds(this, "dataentry");
    setVisible(true);

    log.log(Level.INFO, "Starting Application: {0}", new java.util.Date());

    Messenger.register(MT.OBJECT_DCLICKED, this);
    Messenger.register(MT.TIME_RECEIVED, this);
    Messenger.register(MT.DATABASE_NOTIFICATION, this);
    Database.openDefault();
}
 
开发者ID:drytoastman,项目名称:scorekeeperfrontend,代码行数:60,代码来源:DataEntry.java


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