當前位置: 首頁>>代碼示例>>Java>>正文


Java EtchedBorder類代碼示例

本文整理匯總了Java中javax.swing.border.EtchedBorder的典型用法代碼示例。如果您正苦於以下問題:Java EtchedBorder類的具體用法?Java EtchedBorder怎麽用?Java EtchedBorder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EtchedBorder類屬於javax.swing.border包,在下文中一共展示了EtchedBorder類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initialize

import javax.swing.border.EtchedBorder; //導入依賴的package包/類
/**
	 * Initialize.
	 */
	private void initialize() {
		
		this.setClosable(true);
		this.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
		this.setVisible(true);
		this.registerEscapeKeyStroke();
		this.addInternalFrameListener(new InternalFrameAdapter() {
			/* (non-Javadoc)
			 * @see javax.swing.event.InternalFrameAdapter#internalFrameClosing(javax.swing.event.InternalFrameEvent)
			 */
			@Override
			public void internalFrameClosing(InternalFrameEvent ife) {
				projectWindow.tabRestore();
				super.internalFrameClosing(ife);
			}
			/* (non-Javadoc)
			 * @see javax.swing.event.InternalFrameAdapter#internalFrameDeactivated(javax.swing.event.InternalFrameEvent)
			 */
			@Override
			public void internalFrameDeactivated(InternalFrameEvent e) {
//				projectWindow.tabRestore();
				super.internalFrameDeactivated(e);
			}
			
		});
		((BasicInternalFrameUI) this.getUI()).setNorthPane(null);
	
		// --- Add ComponentListener to MainWindow -------- 
		this.addComponentListenerOfMainWindow();
		
	}
 
開發者ID:EnFlexIT,項目名稱:AgentWorkbench,代碼行數:35,代碼來源:MaximizedTab.java

示例2: EtchTypePropertyEditor

import javax.swing.border.EtchedBorder; //導入依賴的package包/類
public EtchTypePropertyEditor() {
    super(
        new int[] {
            EtchedBorder.LOWERED,
            EtchedBorder.RAISED,
        },
        new String[] {
            "javax.swing.border.EtchedBorder.LOWERED", // NOI18N
            "javax.swing.border.EtchedBorder.RAISED" // NOI18N
        },
        new String[] {
            "VALUE_EtchLowered", // NOI18N
            "VALUE_EtchRaised", // NOI18N
        }
    );
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:17,代碼來源:EtchedBorderBeanInfo.java

示例3: fromField

import javax.swing.border.EtchedBorder; //導入依賴的package包/類
static BorderBuilder fromField(Instance instance, String field, boolean uiresource, Heap heap) {
    Object _border = instance.getValueOfField(field);
    if (!(_border instanceof Instance)) return null;

    Instance border = (Instance)_border;

    // Make sure subclasses are listed before base class if using isSubclassOf
    if (DetailsUtils.isSubclassOf(border, BevelBorder.class.getName())) {
        return new BevelBorderBuilder(border, heap);
    } else if (DetailsUtils.isSubclassOf(border, MatteBorder.class.getName())) { // Must be before EmptyBorder (extends EmptyBorder)
        return new EmptyBorderBuilder(border, heap);
    } else if (DetailsUtils.isSubclassOf(border, EmptyBorder.class.getName())) {
        return new MatteBorderBuilder(border, heap);
    } else if (DetailsUtils.isSubclassOf(border, EtchedBorder.class.getName())) {
        return new EtchedBorderBuilder(border, heap);
    } else if (DetailsUtils.isSubclassOf(border, LineBorder.class.getName())) {
        return new LineBorderBuilder(border, heap);
    } else if (DetailsUtils.isSubclassOf(border, TitledBorder.class.getName())) {
        return new TitledBorderBuilder(border, heap);
    } else if (DetailsUtils.isSubclassOf(border, CompoundBorder.class.getName())) {
        return new CompoundBorderBuilder(border, heap);
    }

    return null;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:26,代碼來源:BorderBuilders.java

示例4: KMeanScatterPanelChoose

import javax.swing.border.EtchedBorder; //導入依賴的package包/類
public KMeanScatterPanelChoose(WorkloadAnalysisSession m) {
	super(new BorderLayout());
	setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "Scatter Clustering"));

	model = (ModelWorkloadAnalysis) m.getDataModel();
	this.session = m;

	varXCombo = new JComboBox(model.getMatrix().getVariableNames());
	varYCombo = new JComboBox(model.getMatrix().getVariableNames());
	varXCombo.setSelectedIndex(0);
	varYCombo.setSelectedIndex(1);

	JButton vis = new JButton(VIS_SCATTER);

	JPanel combos = new JPanel(new GridLayout(1, 2, 5, 0));
	combos.add(varXCombo);
	combos.add(varYCombo);

	add(combos, BorderLayout.NORTH);
	add(vis, BorderLayout.SOUTH);
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:22,代碼來源:KMeanScatterPanelChoose.java

示例5: initComponents

import javax.swing.border.EtchedBorder; //導入依賴的package包/類
protected void initComponents() {
	removeAll();
	setLayout(new BorderLayout());

	WarningScrollTable wST = new WarningScrollTable(csTable, WARNING_CLASS);
	setBorder(new TitledBorder(new EtchedBorder(), "CS Strategies"));
	setMinimumSize(new Dimension(180, 100));
	descriptionLabel = new JLabel(DESCRIPTION);
	normalizzationErrorLabel = new JLabel(NORMALIZATION_ERROR);
	normalizzationWarningLabel = new JLabel(NORMALIZATION_WARNING);
	checkRowLessThanOne();
	add(wST, BorderLayout.CENTER);
	add(descriptionLabel, BorderLayout.SOUTH);
	JPanel msgPanel = new JPanel(new BorderLayout());
	msgPanel.add(normalizzationErrorLabel, BorderLayout.NORTH);
	msgPanel.add(normalizzationWarningLabel, BorderLayout.SOUTH);
	add(msgPanel, BorderLayout.NORTH);
	if (descriptionLabel != null) {
		descriptionLabel.setVisible(classData.getClassKeys().size() != 0);
	}
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:22,代碼來源:ClassSwitchSectionPanel.java

示例6: setData

import javax.swing.border.EtchedBorder; //導入依賴的package包/類
/**
 * Sets data for this panel
 * @param cd class definition data structure
 * @param brd blocking region definition data structure
 * @param key search's key for given blocking region
 */
public void setData(ClassDefinition cd, BlockingRegionDefinition brd, Object key) {
	this.cd = cd;
	this.brd = brd;
	this.key = key;

	mainPanel.removeAll();
	mainPanel.setBorder(BorderFactory.createTitledBorder(new EtchedBorder(), "Specific Properties of " + brd.getRegionName(key)));
	if (classTablePanel == null) {
		classTablePanel = new BlockingRegionClassPanel(cd, brd, key);
	} else {
		classTablePanel.setData(cd, brd, key);
	}
	if (groupTablePanel == null) {
		groupTablePanel = new BlockingRegionGroupPanel(cd, brd, key, gNumber);
	} else {
		groupTablePanel.setData(cd, brd, key);
	}
	mainPanel.add(classTablePanel, "Class Specific");
	mainPanel.add(groupTablePanel, "Group Specific");

	current = (WizardPanel) mainPanel.getSelectedComponent();
	updateData();
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:30,代碼來源:BlockingRegionParameterPanel.java

示例7: initComponents

import javax.swing.border.EtchedBorder; //導入依賴的package包/類
private void initComponents() {
	this.setLayout(new BorderLayout());
	//building mainPanel
	mainPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
	mainPanel.setDividerSize(4);
	mainPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
	//layout of main panel
	WarningScrollTable jsp = new WarningScrollTable(joinStrategies, WARNING_CLASS);
	jsp.setBorder(new TitledBorder(new EtchedBorder(), "Join Strategies"));
	mainPanel.setResizeWeight(1.0);
	jsp.setMinimumSize(new Dimension(200, 100));
	mainPanel.setLeftComponent(jsp);
	joinEditor.setMinimumSize(new Dimension(225, 100));
	mainPanel.setRightComponent(joinEditor);
	add(mainPanel, BorderLayout.CENTER);
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:17,代碼來源:JoinSectionPanel.java

示例8: initComponents

import javax.swing.border.EtchedBorder; //導入依賴的package包/類
private void initComponents() {
	setLayout(new BorderLayout(5, 5));
	setBorder(new EmptyBorder(5, 5, 5, 5));

	capacitySpinner = new JSpinner();
	capacitySpinner.setPreferredSize(DIM_BUTTON_XS);
	infiniteCheckBox = new JCheckBox("Infinite");
	JPanel capacityPanel = new JPanel();
	capacityPanel.setBorder(new TitledBorder(new EtchedBorder(), "Storage Capacity"));
	capacityPanel.add(new JLabel("Capacity: "));
	capacityPanel.add(capacitySpinner);
	capacityPanel.add(infiniteCheckBox);

	optionTable = new StorageOptionTable();
	JPanel optionPanel = new JPanel(new BorderLayout());
	optionPanel.setBorder(new TitledBorder(new EtchedBorder(), "Storage Options"));
	optionPanel.add(new WarningScrollTable(optionTable, WARNING_CLASS));

	add(capacityPanel, BorderLayout.NORTH);
	add(optionPanel, BorderLayout.CENTER);
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:22,代碼來源:StorageSectionPanel.java

示例9: initComponents

import javax.swing.border.EtchedBorder; //導入依賴的package包/類
private void initComponents() {
	this.setLayout(new BorderLayout());
	//building mainPanel
	mainPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
	mainPanel.setDividerSize(4);
	mainPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
	//layout of main panel
	WarningScrollTable jsp = new WarningScrollTable(semaphoreStrategies, WARNING_CLASS);
	jsp.setBorder(new TitledBorder(new EtchedBorder(), "Semaphore Strategies"));
	mainPanel.setResizeWeight(1.0);
	jsp.setMinimumSize(new Dimension(200, 100));
	mainPanel.setLeftComponent(jsp);
	semaphoreEditor.setMinimumSize(new Dimension(225, 100));
	mainPanel.setRightComponent(semaphoreEditor);
	add(mainPanel, BorderLayout.CENTER);
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:17,代碼來源:SemaphoreSectionPanel.java

示例10: initComponents

import javax.swing.border.EtchedBorder; //導入依賴的package包/類
protected void initComponents() {
	this.setLayout(new BorderLayout());
	//building mainPanel
	mainPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
	mainPanel.setDividerSize(4);
	mainPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
	//layout of main panel
	WarningScrollTable jsp = new WarningScrollTable(routingStrategies, WARNING_CLASS);
	jsp.setBorder(new TitledBorder(new EtchedBorder(), "Routing Strategies"));
	mainPanel.setResizeWeight(1.0);
	jsp.setMinimumSize(new Dimension(200, 100));
	mainPanel.setLeftComponent(jsp);
	routingProbEditor.setMinimumSize(new Dimension(225, 100));
	mainPanel.setRightComponent(routingProbEditor);
	add(mainPanel, BorderLayout.CENTER);
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:17,代碼來源:RoutingSectionPanel.java

示例11: initComponents

import javax.swing.border.EtchedBorder; //導入依賴的package包/類
private void initComponents() {
	mixPane = new WarningScrollTable(mixTable, WARNING_CLASS);
	mixPane.setBorder(new TitledBorder(new EtchedBorder(), "Semaphore Options"));
	noOptLabelPanel.setBorder(new TitledBorder(new EtchedBorder(), "Semaphore Options"));
	noOptLabel.setOpaque(false);
	noOptLabel.setEditable(false);
	noOptLabel.setLineWrap(true);
	noOptLabel.setWrapStyleWord(true);
	descrTextPane.setOpaque(false);
	descrTextPane.setEditable(false);
	descrTextPane.setLineWrap(true);
	descrTextPane.setWrapStyleWord(true);
	descrPane.setBorder(new TitledBorder(new EtchedBorder(), "Description"));
	descrPane.setViewportView(descrTextPane);
	semaphorePane.setLayout(new FlowLayout());
	JLabel text = new JLabel("Number of Required Tasks:");
	jNumField.setPreferredSize(DIM_BUTTON_XS);
	semaphorePane.add(text);
	semaphorePane.add(jNumField);
	semaphorePane.setBorder(new TitledBorder(new EtchedBorder(), "Semaphore Options"));
	setLeftComponent(descrPane);
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:23,代碼來源:SemaphoreEditor.java

示例12: initComponents

import javax.swing.border.EtchedBorder; //導入依賴的package包/類
private void initComponents() {
	rtPane = new WarningScrollTable(routingTable, WARNING_OUTGOING_ROUTING);
	noOptLabelPanel.setBorder(new TitledBorder(new EtchedBorder(), "Routing Options"));
	noOptLabel.setOpaque(false);
	noOptLabel.setEditable(false);
	noOptLabel.setLineWrap(true);
	noOptLabel.setWrapStyleWord(true);
	rtPane.setBorder(new TitledBorder(new EtchedBorder(), "Routing Options"));
	descrTextPane.setOpaque(false);
	descrTextPane.setEditable(false);
	descrTextPane.setLineWrap(true);
	descrTextPane.setWrapStyleWord(true);
	descrPane.setBorder(new TitledBorder(new EtchedBorder(), "Description"));
	descrPane.setViewportView(descrTextPane);
	setLeftComponent(descrPane);
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:17,代碼來源:RoutingProbabilitiesEditor.java

示例13: initComponents

import javax.swing.border.EtchedBorder; //導入依賴的package包/類
private void initComponents() {
	mixPane = new WarningScrollTable(mixTable, WARNING_CLASS);
	mixPane.setBorder(new TitledBorder(new EtchedBorder(), "Join Options"));
	noOptLabelPanel.setBorder(new TitledBorder(new EtchedBorder(), "Join Options"));
	noOptLabel.setOpaque(false);
	noOptLabel.setEditable(false);
	noOptLabel.setLineWrap(true);
	noOptLabel.setWrapStyleWord(true);
	descrTextPane.setOpaque(false);
	descrTextPane.setEditable(false);
	descrTextPane.setLineWrap(true);
	descrTextPane.setWrapStyleWord(true);
	descrPane.setBorder(new TitledBorder(new EtchedBorder(), "Description"));
	descrPane.setViewportView(descrTextPane);
	joinPane.setLayout(new FlowLayout());
	JLabel text = new JLabel("Number of Required Tasks:");
	jNumField.setPreferredSize(DIM_BUTTON_XS);
	joinPane.add(text);
	joinPane.add(jNumField);
	joinPane.setBorder(new TitledBorder(new EtchedBorder(), "Join Options"));
	setLeftComponent(descrPane);
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:23,代碼來源:JoinEditor.java

示例14: GlobalMap

import javax.swing.border.EtchedBorder; //導入依賴的package包/類
public GlobalMap() {
  view = new View();
  view.addMouseListener(view);

  scroll = new GlobalMapScrollPane(view);
  scroll.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED));
  scroll.setAlignmentX(0.0f);
  scroll.setAlignmentY(0.0f);

  ActionListener al = new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      scroll.setVisible(!scroll.isVisible());
    }
  };

  launch = new LaunchButton(null, TOOLTIP, BUTTON_TEXT,
                            HOTKEY, ICON_NAME, al);
  launch.setAttribute(TOOLTIP, "Show/Hide overview window");
  launch.setAttribute(HOTKEY,
    NamedKeyStroke.getNamedKeyStroke(KeyEvent.VK_O,
                           KeyEvent.CTRL_MASK + KeyEvent.SHIFT_MASK));
}
 
開發者ID:ajmath,項目名稱:VASSAL-src,代碼行數:23,代碼來源:GlobalMap.java

示例15: initComponents

import javax.swing.border.EtchedBorder; //導入依賴的package包/類
protected void initComponents() {
	this.setLayout(new BorderLayout());
	//building mainPanel
	mainPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
	mainPanel.setDividerSize(4);
	mainPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
	//layout of main panel
	WarningScrollTable jsp = new WarningScrollTable(routingStrategies, WARNING_CLASS);
	//routing strategy selector on the left, routing probabilities editor on the right
	jsp.setBorder(new TitledBorder(new EtchedBorder(), "Routing Strategies"));
	mainPanel.setResizeWeight(.80); // Gives more space to left component
	jsp.setMinimumSize(new Dimension(180, 100));
	mainPanel.setLeftComponent(jsp);
	routingProbEditor.setMinimumSize(new Dimension(160, 100));
	mainPanel.setRightComponent(routingProbEditor);
	add(mainPanel, BorderLayout.CENTER);
}
 
開發者ID:HOMlab,項目名稱:QN-ACTR-Release,代碼行數:18,代碼來源:RoutingSectionPanel.java


注:本文中的javax.swing.border.EtchedBorder類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。