本文整理汇总了Java中javax.swing.border.BevelBorder类的典型用法代码示例。如果您正苦于以下问题:Java BevelBorder类的具体用法?Java BevelBorder怎么用?Java BevelBorder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BevelBorder类属于javax.swing.border包,在下文中一共展示了BevelBorder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
import javax.swing.border.BevelBorder; //导入依赖的package包/类
@Override
Style create() {
// Font
Color foreground = new Color(42, 18, 0); // Brown
Color highlight = new Color(142, 90, 0); // Light brown (also text shadow)
PixmapStyle style = new PixmapStyle("data/gui/panel_honeycomb_001.png",
false, highlight, Color.white, Color.white, foreground);
// Border
Color blightout = new Color(255, 255, 180);
Color blightin = new Color(202, 202, 101);
Color bshadowin = new Color(160, 128, 32);
Color bshadowout = new Color(86, 69, 17);
style.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED,
blightout, blightin, bshadowout, bshadowin));
style.setBorderDown(BorderFactory.createBevelBorder(BevelBorder.LOWERED,
blightout, blightin, bshadowin, bshadowout));
return style;
}
示例2: BevelTypePropertyEditor
import javax.swing.border.BevelBorder; //导入依赖的package包/类
public BevelTypePropertyEditor() {
super(
new int[] {
BevelBorder.RAISED,
BevelBorder.LOWERED,
},
new String[] {
"javax.swing.border.BevelBorder.RAISED", // NOI18N
"javax.swing.border.BevelBorder.LOWERED", // NOI18N
},
new String[] {
"VALUE_BevelRaised", // NOI18N
"VALUE_BevelLowered", // NOI18N
}
);
}
示例3: initComponents
import javax.swing.border.BevelBorder; //导入依赖的package包/类
private void initComponents() {
setLayout(new BorderLayout());
previewPanel = new JPanel(new FlowLayout(0, 0, FlowLayout.LEADING));
previewPanel.setBorder(BorderFactory.createEmptyBorder(4, 7, 2, 7));
label = new JLabel();
label.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(2, 7, 7, 7),
new ThinBevelBorder(BevelBorder.LOWERED)));
label.setBorder(BorderFactory.createCompoundBorder(label.getBorder(), BorderFactory.createEmptyBorder(4, 3, 4, 3)));
label.setFont(label.getFont().deriveFont(Font.BOLD));
JPanel p = new JPanel(new BorderLayout());
p.setBorder(BorderFactory.createRaisedBevelBorder());
p.add(previewPanel, BorderLayout.NORTH);
p.add(label, BorderLayout.CENTER);
add(p, BorderLayout.CENTER);
}
示例4: fromField
import javax.swing.border.BevelBorder; //导入依赖的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;
}
示例5: initializePanels
import javax.swing.border.BevelBorder; //导入依赖的package包/类
/**
* Initialize the panels.
*/
private void initializePanels() {
this.mMainPanel = new JPanel();
this.mMainPanel.setBounds(10, 10, WIDTH - 25, 240);
this.mContainer.add(this.mMainPanel);
this.mMainPanel.setLayout(null);
this.mLogPane = new JScrollPane();
this.mLogPane.setViewportBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
this.mLogPane.setBounds(10, 270, WIDTH - 25, 100);
this.mContainer.add(this.mLogPane);
this.mTrailerPanel = new JPanel();
this.mTrailerPanel.setBounds(10, 370, WIDTH - 25, 50);
this.mContainer.add(this.mTrailerPanel);
this.mTrailerPanel.setLayout(null);
}
示例6: InformationFrame
import javax.swing.border.BevelBorder; //导入依赖的package包/类
public InformationFrame() {
setType(Type.POPUP);
setResizable(false);
setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
this.setTitle("Approving question");
this.setPreferredSize(new Dimension(350, 170));
this.setAlwaysOnTop(isAlwaysOnTopSupported());
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().setLayout(new BorderLayout());
final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation(screenSize.width / 2 - 150, screenSize.height / 2 - 75);
this.setIconImage(Toolkit.getDefaultToolkit().getImage(InformationFrame.class.getResource(LOGOPATH)));
final JPanel panel = new JPanel();
getContentPane().add(panel, BorderLayout.CENTER);
panel.setLayout(null);
okBtn = new JButton("OK");
okBtn.setIcon(new ImageIcon(InformationFrame.class.getResource("/com/coder/hms/icons/info_ok.png")));
okBtn.setFont(new Font("Lucida Grande", Font.PLAIN, 15));
okBtn.setBorder(new SoftBevelBorder(BevelBorder.RAISED, null, null, null, null));
okBtn.setBounds(119, 102, 132, 35);
okBtn.addActionListener(getAction());
panel.add(okBtn);
lblMessage = new JLabel("");
lblMessage.setHorizontalTextPosition(SwingConstants.CENTER);
lblMessage.setHorizontalAlignment(SwingConstants.LEFT);
lblMessage.setBounds(87, 21, 246, 74);
panel.add(lblMessage);
lblIcon = new JLabel("");
lblIcon.setIcon(new ImageIcon(InformationFrame.class.getResource("/com/coder/hms/icons/dialogPane_question.png")));
lblIcon.setBounds(6, 36, 69, 70);
panel.add(lblIcon);
this.pack();
}
示例7: FInfoDialogWeb
import javax.swing.border.BevelBorder; //导入依赖的package包/类
/**
* Creates new form FInfoDialogWeb
*/
public FInfoDialogWeb(java.awt.Frame parent, boolean modal) {
super(parent, modal);
initComponents();
javafxPanel = new JFXPanel();
javafxPanel.setOpaque(false);
javafxPanel.setBorder(new BevelBorder(0));
javafxPanel.setLayout(new GridLayout(1, 1));
final GridLayout gl = new GridLayout(1, 1);
panel.setLayout(gl);
panel.add(javafxPanel, BorderLayout.CENTER);
Platform.runLater(() -> {
bro = new Browser();
Scene scene = new Scene(bro, 750, 500, Color.web("#666970"));
//bro.load(WelcomeParams.getInstance().infoURL);
javafxPanel.setScene(scene);
});
if (WelcomeParams.getInstance().btnFont != null) {
btnBack.setFont(WelcomeParams.getInstance().btnFont);
btnClose.setFont(WelcomeParams.getInstance().btnFont);
btnForward.setFont(WelcomeParams.getInstance().btnFont);
btnHome.setFont(WelcomeParams.getInstance().btnFont);
}
}
示例8: FooterBar
import javax.swing.border.BevelBorder; //导入依赖的package包/类
public FooterBar() {
setPreferredSize(new Dimension(640, 16));
setLayout(new GridLayout());
setBorder(new BevelBorder(BevelBorder.LOWERED));
Border margin = new EmptyBorder(0, 5, 0, 5);
label = new JLabel("Ready", SwingConstants.LEFT);
label.setBorder(margin);
add(label);
progress = new JProgressBar();
progress.setMaximum(6);
progress.setStringPainted(true);
progress.setPreferredSize(new Dimension(10, 16));
progress.setValue(0);
add(progress);
}
示例9: initComponents
import javax.swing.border.BevelBorder; //导入依赖的package包/类
@Override
protected void initComponents() {
jvse = Box.createHorizontalBox();
jvse.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
add(jvse);
jskelneikony = Box.createVerticalBox();
jskelneikony.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
jskelneikony.setMinimumSize(new Dimension(250, 150));
debugVyberIkon = new JDebugVyberIkon(jskelneikony);
jvse.add(debugVyberIkon);
jvse.add(Box.createHorizontalStrut(5));
jvse.add(jskelneikony);
jvse.setPreferredSize(new Dimension(700, 600));
}
示例10: initComponents
import javax.swing.border.BevelBorder; //导入依赖的package包/类
protected void initComponents() {
jvyber1 = Box.createVerticalBox();
final JScrollPane sp1 = new JScrollPane(jvyber1);
sp1.setViewportBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
// sp1.setAutoscrolls(true);
FComponent.enableMouseSroll(jvyber1);
jvyber2 = Box.createVerticalBox();
final JScrollPane sp2 = new JScrollPane(jvyber2);
sp2.setViewportBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
FComponent.enableMouseSroll(sp2);
add(sp1);
add(Box.createHorizontalStrut(5));
add(sp2);
}
示例11: StatusPanel
import javax.swing.border.BevelBorder; //导入依赖的package包/类
public StatusPanel() {
super();
setBorder(BorderFactory.createCompoundBorder(
BorderFactory.createMatteBorder(1, 0, 0, 0, Color.BLACK),
BorderFactory.createCompoundBorder(
BorderFactory.createBevelBorder(BevelBorder.LOWERED),
BorderFactory.createEmptyBorder(3, 3, 3, 3))));
//statusPanel.setPreferredSize(new Dimension(frame.getWidth(), 16));
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
statusLabel = new JLabel(".");
defaultColor = statusLabel.getForeground();
statusLabel.setForeground(statusLabel.getBackground());
// int height = statusLabel.getPreferredSize().height;
statusLabel.setHorizontalAlignment(SwingConstants.LEFT);
// statusLabel.setText("");
add(statusLabel);
//
// Dimension d = getPreferredSize();
// d.height = height + 5;
// setPreferredSize(d);
// System.out.println(d);
}
示例12: SplashScreen
import javax.swing.border.BevelBorder; //导入依赖的package包/类
public SplashScreen() {
p = new JPanel();
//p.setPreferredSize(new Dimension(400,300));
p.setLayout(new BorderLayout());
p.add(image, BorderLayout.CENTER);
p.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
message.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
message.setHorizontalAlignment(SwingConstants.LEFT);
progressBar.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
progressBar.setIndeterminate(true);
Box box = Box.createVerticalBox();
box.add(message);
box.add(progressBar);
p.add(box, BorderLayout.SOUTH);
setContentPane(p);
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
pack();
Dimension screen = getToolkit().getScreenSize();
setLocation((screen.width - getSize().width) / 2,
(screen.height - getSize().height) / 2);
}
示例13: getTableCellRendererComponent
import javax.swing.border.BevelBorder; //导入依赖的package包/类
/**
* Returns the rendered header cell for the supplied value and column.
*
* @param jtRevokedCerts The JTable
* @param value The value to assign to the cell
* @param bIsSelected True if cell is selected
* @param iRow The row of the cell to render
* @param iCol The column of the cell to render
* @param bHasFocus If true, render cell appropriately
* @return The rendered cell
*/
@Override
public Component getTableCellRendererComponent(JTable jtRevokedCerts, Object value, boolean bIsSelected,
boolean bHasFocus, int iRow, int iCol)
{
// Get header renderer
JLabel header = (JLabel) jtRevokedCerts.getColumnModel().getColumn(iCol).getHeaderRenderer();
// The headers contain text
header.setText(value.toString());
header.setHorizontalAlignment(LEFT);
// Set tool tips
if (iCol == 0)
{
header.setToolTipText(RB.getString("RevokedCertsTableHeadRend.SerialNumberColumn.tooltip"));
}
else
{
header.setToolTipText(RB.getString("RevokedCertsTableHeadRend.RevocationDateColumn.tooltip"));
}
header.setBorder(new CompoundBorder(new BevelBorder(BevelBorder.RAISED), new EmptyBorder(0, 5, 0, 5)));
return header;
}
示例14: getTableCellRendererComponent
import javax.swing.border.BevelBorder; //导入依赖的package包/类
/**
* Returns the rendered header cell for the supplied value and column.
*
* @param jtJarInfo The JTable
* @param value The value to assign to the cell
* @param bIsSelected True if cell is selected
* @param iRow The row of the cell to render
* @param iCol The column of the cell to render
* @param bHasFocus If true, render cell appropriately
* @return The rendered cell
*/
@Override
public Component getTableCellRendererComponent(JTable jtJarInfo, Object value, boolean bIsSelected,
boolean bHasFocus, int iRow, int iCol)
{
// Get header renderer
JLabel header = (JLabel) jtJarInfo.getColumnModel().getColumn(iCol).getHeaderRenderer();
// The headers contain left-aligned text
header.setText(value.toString());
header.setHorizontalAlignment(LEFT);
header.setBorder(new CompoundBorder(new BevelBorder(BevelBorder.RAISED), new EmptyBorder(0, 5, 0, 5)));
return header;
}
示例15: getTableCellRendererComponent
import javax.swing.border.BevelBorder; //导入依赖的package包/类
/**
* Returns the rendered header cell for the supplied value and column.
*
* @param jtSystemProperties The JTable
* @param value The value to assign to the cell
* @param bIsSelected True if cell is selected
* @param iRow The row of the cell to render
* @param iCol The column of the cell to render
* @param bHasFocus If true, render cell appropriately
* @return The rendered cell
*/
@Override
public Component getTableCellRendererComponent(JTable jtSystemProperties, Object value, boolean bIsSelected,
boolean bHasFocus, int iRow, int iCol)
{
// Get header renderer
JLabel header = (JLabel) jtSystemProperties.getColumnModel().getColumn(iCol).getHeaderRenderer();
// The headers contain left-aligned text
header.setText(value.toString());
header.setHorizontalAlignment(LEFT);
header.setBorder(new CompoundBorder(new BevelBorder(BevelBorder.RAISED), new EmptyBorder(0, 5, 0, 5)));
return header;
}