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


Java BorderFactory.createLineBorder方法代码示例

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


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

示例1: DataTableColumnListCellRenderer

import javax.swing.BorderFactory; //导入方法依赖的package包/类
public DataTableColumnListCellRenderer() {

		container = new JPanel(new GridBagLayout());

		tableColumnLabel = new JLabel();

		focusBorder = BorderFactory.createLineBorder(BORDER_SELECTION_COLOR);
		noFocusBorder = BorderFactory.createLineBorder(Color.WHITE);

		GridBagConstraints itemConstraint = new GridBagConstraints();
		itemConstraint.insets = new Insets(2, 1, 2, 1);
		itemConstraint.anchor = GridBagConstraints.WEST;
		itemConstraint.weightx = 1;
		itemConstraint.fill = GridBagConstraints.HORIZONTAL;

		container.add(tableColumnLabel, itemConstraint);
	}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:18,代码来源:DataTableColumnListCellRenderer.java

示例2: jbInit

import javax.swing.BorderFactory; //导入方法依赖的package包/类
private void jbInit() throws Exception {
  border1 = BorderFactory.createLineBorder(Color.gray,1);
  this.setClosable(true);
  this.setTitle(Local.getString("Select date"));
  this.setBorder(border1);
  //this.setPreferredSize(new Dimension(200, 200));
  this.setToolTipText("");
  cal.setPreferredSize(new Dimension(this.getContentPane().getWidth(),
  this.getContentPane().getHeight()));
  this.getContentPane().add(cal,  BorderLayout.CENTER);
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:12,代码来源:CalendarFrame.java

示例3: setFullyEditable

import javax.swing.BorderFactory; //导入方法依赖的package包/类
/**
 * Sets all the cells in the <code>ETable</code> to be editable if
 * <code>fullyEditable</code> is true.
 * if <code>fullyEditable</code> is false, sets the table cells into
 * their default state as in JTable.
 *
 * @param   fullyEditable   true if the table is meant to be fully editable.
 *                          false if the table is meant to take the defalut
 *                          state for editing.
 * @see #isFullyEditable()
 */
public void setFullyEditable(boolean fullyEditable) {
    if (fullyEditable) {
        editing = FULLY_EDITABLE;
        if(!getShowHorizontalLines()) {
            setShowHorizontalLines(true);
        }
        Color colorBorderAllEditable = UIManager.getColor("Table.borderAllEditable");
        Border border = null;
        if (colorBorderAllEditable != null) {
            border = BorderFactory.createLineBorder(colorBorderAllEditable);
        } else {
            border = BorderFactory.createLineBorder(Color.GRAY);
        }
        Border filler = BorderFactory.createLineBorder(getBackground());
        CompoundBorder compound = new CompoundBorder(border, filler);
        setBorder(new CompoundBorder(compound, border));
    } else {
        editing = DEFAULT;
        setBorder( null );
    }
    Color c = UIManager.getColor("Table.defaultGrid");
    if (c != null) {
        setGridColor(c);
    }
    if (isFullyNonEditable()) {
        setupSearch();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:40,代码来源:ETable.java

示例4: init

import javax.swing.BorderFactory; //导入方法依赖的package包/类
private void init() {
    Border b = UIManager.getBorder( "nb.popupswitcher.border" ); //NOI18N
    if( null == b )
        b = BorderFactory.createLineBorder(getForeground());
    setBorder(b);
    setShowHorizontalLines(false);
    // Calc row height here so that TableModel can adjust number of columns.
    calcRowHeight(getOffscreenGraphics());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:SwitcherTable.java

示例5: PopupPane

import javax.swing.BorderFactory; //导入方法依赖的package包/类
PopupPane(Component content, boolean resize) {
    super(new BorderLayout());
    add(content, BorderLayout.CENTER);
    
    setFocusCycleRoot(true);
    setFocusTraversalPolicyProvider(true);
    setFocusTraversalPolicy(new PopupFocusTraversalPolicy());
    
    if (UIUtils.isAquaLookAndFeel()) {
        if (resize) {
            setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8));
            addMouseListener(this);
            addMouseMotionListener(this);
        }
    } else {
        Border border = BorderFactory.createLineBorder(UIUtils.getDisabledLineColor());
        
        if (resize) {
            setBorder(BorderFactory.createCompoundBorder(border,
                      BorderFactory.createEmptyBorder(8, 8, 8, 8)));
            addMouseListener(this);
            addMouseMotionListener(this);
        } else {
            setBorder(border);
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:28,代码来源:ProfilerPopup.java

示例6: getQuickSearchBorder

import javax.swing.BorderFactory; //导入方法依赖的package包/类
/**
 * Get customizable border for QuickSearch. See bug 246907.
 *
 * @return Custom border if defined in {@link UIManager} or default line
 * border.
 */
private Border getQuickSearchBorder() {
    Border border = UIManager.getBorder("nb.quicksearch.border"); //NOI18N
    return border != null
            ? border
            : BorderFactory.createLineBorder(getComboBorderColor());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:QuickSearchComboBar.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: AttributeDropTextField

import javax.swing.BorderFactory; //导入方法依赖的package包/类
public AttributeDropTextField(JTree plotConfigurationTree, DataTableColumnListTransferHandler th, SeriesUsageType type) {
	th.addDragListener(this);

	this.setFocusable(false);
	this.setEditable(false);
	this.setBackground(Color.white);
	this.setTransferHandler(new DataTableColumnDropTextFieldTransferHandler(plotConfigurationTree, type, this));

	ongoingDropBorder = BorderFactory.createLineBorder(ProcessDrawer.BORDER_DRAG_COLOR, 1);
	dropEndedBorder = BorderFactory.createEmptyBorder(1, 1, 1, 1);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:12,代码来源:AttributeDropTextField.java

示例9: jbInit

import javax.swing.BorderFactory; //导入方法依赖的package包/类
/**
 * Sets up calendar frame.
 * @throws Exception
 */
private void jbInit() throws Exception {
  border1 = BorderFactory.createLineBorder(ColorMap.CALENDARFRAMEBORDER,1);
  this.setClosable(true);
  this.setTitle(Local.getString("Select date"));
  this.setBorder(border1);
  //this.setPreferredSize(new Dimension(200, 200));
  this.setToolTipText("");
  cal.setPreferredSize(new Dimension(this.getContentPane().getWidth(),
  this.getContentPane().getHeight()));
  this.getContentPane().add(cal,  BorderLayout.CENTER);
  this.setResizable(Configuration.get("RESIZABLE_WINDOW").equals("yes"));
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:17,代码来源:CalendarFrame.java

示例10: getToolTipBorder

import javax.swing.BorderFactory; //导入方法依赖的package包/类
/**
 * Returns the border used by tool tips in this look and feel.
 *
 * @return The border.
 */
public static Border getToolTipBorder() {

	Border border = UIManager.getBorder("ToolTip.border");

	if (border==null || isNimbusLookAndFeel()) {
		border = UIManager.getBorder("nimbusBorder");
		if (border==null) {
			border = BorderFactory.createLineBorder(SystemColor.controlDkShadow);
		}
	}

	return border;

}
 
开发者ID:Thecarisma,项目名称:powertext,代码行数:20,代码来源:TipUtil.java

示例11: ParameterControlPanel

import javax.swing.BorderFactory; //导入方法依赖的package包/类
/** Builds a new panel around the Object f. Any properties of the Object (defined by matching <code>setX/getX</code> methods)
     * are added to the panel. If the object implements {@link HasPropertyTooltips} then a tooltip is added for the property if the 
     * {@link HasPropertyTooltips#getPropertyTooltip(java.lang.String) } returns a non-null String property.
     * 
     * @param obj the object
     */
    public ParameterControlPanel(Object obj) {
        setClazz(obj);
        initComponents();
        String cn = getClazz().getClass().getName();
        int lastdot = cn.lastIndexOf('.');
        String name = cn.substring(lastdot + 1);
        setName(name);
        titledBorder = new TitledBorder(name);
        titledBorder.getBorderInsets(this).set(1, 1, 1, 1);
        setBorder(titledBorder);
        normalBorder = titledBorder.getBorder();
        redLineBorder = BorderFactory.createLineBorder(Color.red);
        addIntrospectedControls();
//            add(new JPanel()); // to fill vertical space in GridLayout
            add(Box.createVerticalGlue()); // to fill space at bottom - not needed
        try {
            // when clazz fires a property change event, propertyChangeEvent is called here and we refresh all our controls
            Method m=obj.getClass().getMethod("getPropertyChangeSupport", (Class[])null);
            support=(PropertyChangeSupport)m.invoke(obj, (Object[]) null);
            support.addPropertyChangeListener(this);
        } catch (Exception ex) {
            
        } 
//            if(f instanceof PropertyChangeListener){
//        ((PropertyChangeListener)f).getPropertyChangeSupport().addPropertyChangeListener(this);
//                }
        ToolTipManager.sharedInstance().setDismissDelay(10000); // to show tips
        revalidate();
    }
 
开发者ID:SensorsINI,项目名称:jaer,代码行数:36,代码来源:ParameterControlPanel.java

示例12: Console

import javax.swing.BorderFactory; //导入方法依赖的package包/类
public Console() {
	console = new JTextArea();
	clearButton = new JButton("Clear");
	//exportButton = new JButton("Export");
	setPanelTitle(PANEL_TITLE);

	clearButton.addActionListener(new ClearListener());
	//exportButton.addActionListener(new ExportListener());
	
	JPanel buttonsPanel = new JPanel();
	buttonsPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
	buttonsPanel.add(clearButton);
	//buttonsPanel.add(exportButton);
	
	console.setFont(new Font(CONSOLE_STYLE, Font.PLAIN, FONT_SIZE));
	//console.setRows(NROWS);
	console.setEditable(false);
	JScrollPane sp = new JScrollPane(console);
	sp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
	sp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
	console.setSelectedTextColor(Color.GRAY);
	console.setLineWrap(true);
	console.setWrapStyleWord(true);
	
	// Automatic down scrolling
	DefaultCaret caret = (DefaultCaret) getConsole().getCaret();
	caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);
	
	setLayout(new BorderLayout());
	
	add(buttonsPanel, BorderLayout.SOUTH);
	add(sp);
	
	LineBorder lineBorderPanel = (LineBorder) BorderFactory.createLineBorder(PANEL_BORDER_COLOR);
	setBorder(BorderFactory.createTitledBorder(lineBorderPanel, getPanelTitle()));
}
 
开发者ID:tteguayco,项目名称:JITRAX,代码行数:37,代码来源:Console.java

示例13: createLineBorder

import javax.swing.BorderFactory; //导入方法依赖的package包/类
/** Factory method for a line border. */
public final Border createLineBorder() {
    return BorderFactory.createLineBorder(Color.DARK_GRAY);
}
 
开发者ID:meteoorkip,项目名称:JavaGraph,代码行数:5,代码来源:ConfigDialog.java

示例14: createTitledBorder

import javax.swing.BorderFactory; //导入方法依赖的package包/类
private void createTitledBorder(String title) {
	LineBorder lineBorderPanel = (LineBorder) BorderFactory.createLineBorder(PANEL_BORDER_COLOR);
	setBorder(BorderFactory.createTitledBorder(lineBorderPanel, title));
}
 
开发者ID:tteguayco,项目名称:JITRAX,代码行数:5,代码来源:Workspace.java


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