當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。