本文整理汇总了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();
}
示例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
}
);
}
示例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;
}
示例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);
}
示例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);
}
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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));
}
示例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);
}