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


Java BorderFactory.createTitledBorder方法代码示例

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


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

示例1: configureObjAttribTree

import javax.swing.BorderFactory; //导入方法依赖的package包/类
/**
 * Add the tree panel to the view and configure other gui components.
 */
private void configureObjAttribTree() {
    // set the position of the tree panel
    java.awt.GridBagConstraints gbc = new java.awt.GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.fill = java.awt.GridBagConstraints.BOTH;
    gbc.weightx = 0.01;
    gbc.weighty = 0.01;

    jPObjAttribPreviewTree.add(objTreePanel, gbc);
    objTreePanel.addObserver(this);

    // set the title of the panel
    TitledBorder titledBorder = BorderFactory.createTitledBorder(Constants.OBJECT_ATTRIBUTES_TEXT);
    jPObjAttribButtons.setBorder(titledBorder);

    objTreePanel.selectRoot();

    objTreePanel.expandRows();
}
 
开发者ID:buni-rock,项目名称:Pixie,代码行数:24,代码来源:AttributesDefinition.java

示例2: configureFrameAttribTree

import javax.swing.BorderFactory; //导入方法依赖的package包/类
/**
 * Add the tree panel to the view and configure other gui components.
 */
private void configureFrameAttribTree() {
    // set the position of the tree panel
    java.awt.GridBagConstraints gbc = new java.awt.GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.fill = java.awt.GridBagConstraints.BOTH;
    gbc.weightx = 0.01;
    gbc.weighty = 0.01;

    jPFrameAttribPreviewTree.add(frameTreePanel, gbc);
    frameTreePanel.addObserver(this);

    // set the title of the panel
    TitledBorder titledBorder = BorderFactory.createTitledBorder(Constants.FRAME_ATTRIBUTES_TEXT);
    jPFrameAttribButtons.setBorder(titledBorder);

    frameTreePanel.selectRoot();

    frameTreePanel.expandRows();
}
 
开发者ID:buni-rock,项目名称:Pixie,代码行数:24,代码来源:AttributesDefinition.java

示例3: setLayout

import javax.swing.BorderFactory; //导入方法依赖的package包/类
/**
 * Define appearance of this component
 */
private void setLayout() {
	GraphConstants.setSizeable(attributes, false);
	GraphConstants.setGroupOpaque(attributes, true);
	GraphConstants.setOpaque(attributes, true);
	GraphConstants.setGradientColor(attributes, new Color(.1F, .1F, .9F, .3F));
	titledBorder = BorderFactory.createTitledBorder(" " + name + " ");
	GraphConstants.setBorder(attributes, titledBorder);
	GraphConstants.setInset(attributes, (int) (GraphConstants.DEFAULTFONT.getSize() * 1.4));
	GraphConstants.setEditable(attributes, false);
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:14,代码来源:BlockingRegion.java

示例4: initializePanels

import javax.swing.BorderFactory; //导入方法依赖的package包/类
/**
 * Initialize the panels.
 */
private void initializePanels() {
	this.mDriverPanel = new JPanel();
	this.mDriverPanel.setBounds(10, 10, FRAME_WIDTH - 25, 220);
	final TitledBorder titledBorderDriver = BorderFactory.createTitledBorder(DRIVER_TITLE);
	this.mDriverPanel.setBorder(titledBorderDriver);
	this.mContainer.add(this.mDriverPanel);
	this.mDriverPanel.setLayout(null);

	this.mBrowserPanel = new JPanel();
	this.mBrowserPanel.setBounds(10, 230, FRAME_WIDTH - 25, 100);
	final TitledBorder titledBorderBinary = BorderFactory.createTitledBorder(BROWSER_TITLE);
	this.mBrowserPanel.setBorder(titledBorderBinary);
	this.mContainer.add(this.mBrowserPanel);
	this.mBrowserPanel.setLayout(null);

	this.mMiscellaneousPanel = new JPanel();
	this.mMiscellaneousPanel.setBounds(10, 330, FRAME_WIDTH - 25, 70);
	final TitledBorder titledBorderMiscellaneous = BorderFactory.createTitledBorder(MISCELLANEOUS_TITLE);
	this.mMiscellaneousPanel.setBorder(titledBorderMiscellaneous);
	this.mContainer.add(this.mMiscellaneousPanel);
	this.mMiscellaneousPanel.setLayout(null);

	this.mTrailerPanel = new JPanel();
	this.mTrailerPanel.setBounds(10, 400, FRAME_WIDTH - 25, 80);
	this.mContainer.add(this.mTrailerPanel);
	this.mTrailerPanel.setLayout(null);
}
 
开发者ID:ZabuzaW,项目名称:KivaBot,代码行数:31,代码来源:SettingsDialog.java

示例5: setLayout

import javax.swing.BorderFactory; //导入方法依赖的package包/类
/**
 * Define apparence of this component
 */
private void setLayout() {
	GraphConstants.setSizeable(attributes, false);
	GraphConstants.setGroupOpaque(attributes, true);
	GraphConstants.setOpaque(attributes, true);
	GraphConstants.setGradientColor(attributes, new Color(.1F, .1F, .9F, .3F));
	titledBorder = BorderFactory.createTitledBorder(" " + name + " ");
	GraphConstants.setBorder(attributes, titledBorder);
	GraphConstants.setInset(attributes, 15);
	GraphConstants.setEditable(attributes, false);
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:14,代码来源:BlockingRegion.java

示例6: init

import javax.swing.BorderFactory; //导入方法依赖的package包/类
public void init() {
    Font font = new Font("Dialog", Font.PLAIN, 12); // NON-NLS: the font name
    TitledBorder border = BorderFactory.createTitledBorder(
            BorderFactory.createEtchedBorder(),
            "Panel Title", // NON-NLS: the title of the border
            TitledBorder.DEFAULT_JUSTIFICATION,
            TitledBorder.DEFAULT_POSITION,
            font);

    JPanel panel = new JPanel();
    panel.setBorder(border);
    getContentPane().add(panel);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:14,代码来源:Test4243289.java

示例7: MyJPanel

import javax.swing.BorderFactory; //导入方法依赖的package包/类
public MyJPanel( String title, Color color ) {
	super();
	setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));		
	setBackground(Color.WHITE);
	Border redline = BorderFactory.createLineBorder(color);
	Border compound = BorderFactory.createTitledBorder(redline, title );
	setBorder( compound );
	//			setBorder(Border.)
}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:10,代码来源:RankingDemo.java

示例8: titledBorder

import javax.swing.BorderFactory; //导入方法依赖的package包/类
private static Border titledBorder(String title) {
    String titleBorder = UIUtils.isWindowsLookAndFeel() ? " " : ""; //NOI18N
    Border inner = BorderFactory.createEmptyBorder(0, 12, 3, 3);
    Border outer = BorderFactory.createTitledBorder(titleBorder + title);
    return BorderFactory.createCompoundBorder(outer, inner);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:TracerOptionsPanel.java

示例9: createTitledBorder

import javax.swing.BorderFactory; //导入方法依赖的package包/类
public static TitledBorder createTitledBorder(String title) {
	return BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), title);
}
 
开发者ID:kristian,项目名称:JDigitalSimulator,代码行数:4,代码来源:Guitilities.java

示例10: getTitledBorder

import javax.swing.BorderFactory; //导入方法依赖的package包/类
final public static TitledBorder getTitledBorder(String strPtitle, Font objPfont) {
	final TitledBorder objLtitledBorder = BorderFactory.createTitledBorder(Strings.doConcat(' ', strPtitle, ' '));
	objLtitledBorder.setTitleFont(objPfont);
	return objLtitledBorder;
}
 
开发者ID:jugglemaster,项目名称:JuggleMasterPro,代码行数:6,代码来源:Tools.java

示例11: localizedBorder

import javax.swing.BorderFactory; //导入方法依赖的package包/类
/**
 * Get a titled border with Messages.message(key) as text.
 *
 * @param key The key to use.
 * @return The {@code TitledBorder}.
 */
public static TitledBorder localizedBorder(String key) {
    return BorderFactory.createTitledBorder(BorderFactory
        .createEmptyBorder(), Messages.message(key));
}
 
开发者ID:FreeCol,项目名称:freecol,代码行数:11,代码来源:Utility.java


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