本文整理汇总了Java中javax.swing.LookAndFeel.installBorder方法的典型用法代码示例。如果您正苦于以下问题:Java LookAndFeel.installBorder方法的具体用法?Java LookAndFeel.installBorder怎么用?Java LookAndFeel.installBorder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.LookAndFeel
的用法示例。
在下文中一共展示了LookAndFeel.installBorder方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: installDefaults
import javax.swing.LookAndFeel; //导入方法依赖的package包/类
/**
* This method installs defaults for the JOptionPane.
*/
protected void installDefaults()
{
LookAndFeel.installColorsAndFont(optionPane, "OptionPane.background",
"OptionPane.foreground",
"OptionPane.font");
LookAndFeel.installBorder(optionPane, "OptionPane.border");
optionPane.setOpaque(true);
minimumSize = UIManager.getDimension("OptionPane.minimumSize");
// FIXME: Image icons don't seem to work properly right now.
// Once they do, replace the synthetic icons with these ones.
/*
warningIcon = (IconUIResource) defaults.getIcon("OptionPane.warningIcon");
infoIcon = (IconUIResource) defaults.getIcon("OptionPane.informationIcon");
errorIcon = (IconUIResource) defaults.getIcon("OptionPane.errorIcon");
questionIcon = (IconUIResource) defaults.getIcon("OptionPane.questionIcon");
*/
}
示例2: installDefaults
import javax.swing.LookAndFeel; //导入方法依赖的package包/类
/**
* Initializes any default properties that this UI has from the defaults for
* the Basic look and feel.
*/
protected void installDefaults()
{
LookAndFeel.installBorder(menuItem, "Menu.border");
LookAndFeel.installColorsAndFont(menuItem, "Menu.background",
"Menu.foreground", "Menu.font");
menuItem.setMargin(UIManager.getInsets("Menu.margin"));
acceleratorFont = UIManager.getFont("Menu.acceleratorFont");
acceleratorForeground = UIManager.getColor("Menu.acceleratorForeground");
acceleratorSelectionForeground = UIManager.getColor("Menu.acceleratorSelectionForeground");
selectionBackground = UIManager.getColor("Menu.selectionBackground");
selectionForeground = UIManager.getColor("Menu.selectionForeground");
arrowIcon = UIManager.getIcon("Menu.arrowIcon");
oldBorderPainted = UIManager.getBoolean("Menu.borderPainted");
((JMenu) menuItem).setDelay(200);
}
示例3: installDefaults
import javax.swing.LookAndFeel; //导入方法依赖的package包/类
/**
* This method installs the defaults specified by the look and feel.
*/
protected void installDefaults()
{
internalFrameLayout = createLayoutManager();
frame.setLayout(internalFrameLayout);
LookAndFeel.installBorder(frame, "InternalFrame.border");
frame.setFrameIcon(UIManager.getIcon("InternalFrame.icon"));
// Let the content pane inherit the background color from its
// frame by setting the background to null.
Component contentPane = frame.getContentPane();
if (contentPane != null
&& contentPane.getBackground() instanceof UIResource)
{
contentPane.setBackground(null);
}
}
示例4: installDefaults
import javax.swing.LookAndFeel; //导入方法依赖的package包/类
protected void installDefaults(JScrollPane p)
{
scrollpane = p;
LookAndFeel.installColorsAndFont(p, "ScrollPane.background",
"ScrollPane.foreground",
"ScrollPane.font");
LookAndFeel.installBorder(p, "ScrollPane.border");
// Install Viewport border.
Border vpBorder = p.getViewportBorder();
if (vpBorder == null || vpBorder instanceof UIResource)
{
vpBorder = UIManager.getBorder("ScrollPane.viewportBorder");
p.setViewportBorder(vpBorder);
}
p.setOpaque(true);
}
示例5: updateUI
import javax.swing.LookAndFeel; //导入方法依赖的package包/类
@Override
public void updateUI()
{
super.updateUI();
setLineWrap(true);
setWrapStyleWord(true);
setHighlighter(null);
setEditable(false);
setFocusable(false);
LookAndFeel.installBorder(this, LABEL_BORDER);
LookAndFeel.installColorsAndFont(this, LABEL_BACKGROUND, LABEL_FOREGROUND, LABEL_FONT);
}
示例6: installDefaults
import javax.swing.LookAndFeel; //导入方法依赖的package包/类
protected void installDefaults(final PRoPanel pp) {
LookAndFeel.installColorsAndFont(
pp, "Panel.background",
"Panel.foreground", "Panel.font"
);
LookAndFeel.installBorder(pp, "Panel.border");
LookAndFeel.installProperty(pp, "opaque", Boolean.TRUE);
}
示例7: RowNumberHeader
import javax.swing.LookAndFeel; //导入方法依赖的package包/类
public RowNumberHeader(JTable table) {
super();
mainTable = table;
setModel(new RowNumberTableModel());
setPreferredScrollableViewportSize(getMinimumSize());
setRowSelectionAllowed(false);
JComponent renderer = (JComponent) getDefaultRenderer(Object.class);
LookAndFeel.installColorsAndFont(renderer, "TableHeader.background",
"TableHeader.foreground", "TableHeader.font");
LookAndFeel.installBorder(this, "TableHeader.cellBorder");
}
示例8: installDefaults
import javax.swing.LookAndFeel; //导入方法依赖的package包/类
protected void installDefaults() {
LookAndFeel.installColorsAndFont(tipPane, "TipOfTheDay.background",
"TipOfTheDay.foreground", "TipOfTheDay.font");
LookAndFeel.installBorder(tipPane, "TipOfTheDay.border");
tipFont = UIManager.getFont("TipOfTheDay.tipFont");
tipPane.setOpaque(true);
}
示例9: installDefaults
import javax.swing.LookAndFeel; //导入方法依赖的package包/类
protected void installDefaults() {
LookAndFeel.installColorsAndFont(tipPane, "Category.background",
"Category.foreground", "Category.font");
LookAndFeel.installBorder(tipPane, "Category.border");
LookAndFeel.installProperty(tipPane, "opaque", Boolean.TRUE);
tipFont = UIManager.getFont("Category.tipFont");
}
示例10: installDefaults
import javax.swing.LookAndFeel; //导入方法依赖的package包/类
protected void installDefaults() {
LookAndFeel.installColorsAndFont(tipPane, "TipOfTheDay.background",
"TipOfTheDay.foreground", "TipOfTheDay.font");
LookAndFeel.installBorder(tipPane, "TipOfTheDay.border");
LookAndFeel.installProperty(tipPane, "opaque", Boolean.TRUE);
tipFont = UIManager.getFont("TipOfTheDay.tipFont");
}
示例11: installDefaults
import javax.swing.LookAndFeel; //导入方法依赖的package包/类
/**
* This method installs the defaults for the scrollbar specified by the
* Basic Look and Feel.
*/
protected void installDefaults()
{
LookAndFeel.installColors(scrollbar, "ScrollBar.background",
"ScrollBar.foreground");
LookAndFeel.installBorder(scrollbar, "ScrollBar.border");
scrollbar.setOpaque(true);
scrollbar.setLayout(this);
configureScrollBarColors();
maximumThumbSize = UIManager.getDimension("ScrollBar.maximumThumbSize");
minimumThumbSize = UIManager.getDimension("ScrollBar.minimumThumbSize");
}
示例12: installDefaults
import javax.swing.LookAndFeel; //导入方法依赖的package包/类
/**
* This method changes the settings for the progressBar to
* the defaults provided by the current Look and Feel.
*/
protected void installDefaults()
{
LookAndFeel.installColorsAndFont(progressBar, "ProgressBar.background",
"ProgressBar.foreground",
"ProgressBar.font");
LookAndFeel.installBorder(progressBar, "ProgressBar.border");
progressBar.setOpaque(true);
selectionForeground = UIManager.getColor("ProgressBar.selectionForeground");
selectionBackground = UIManager.getColor("ProgressBar.selectionBackground");
cellLength = UIManager.getInt("ProgressBar.cellLength");
cellSpacing = UIManager.getInt("ProgressBar.cellSpacing");
int repaintInterval = UIManager.getInt("ProgressBar.repaintInterval");
int cycleTime = UIManager.getInt("ProgressBar.cycleTime");
if (cycleTime % repaintInterval != 0
&& (cycleTime / repaintInterval) % 2 != 0)
{
int div = (cycleTime / repaintInterval) + 2;
div /= 2;
div *= 2;
cycleTime = div * repaintInterval;
}
setAnimationIndex(0);
numFrames = cycleTime / repaintInterval;
animationTimer.setDelay(repaintInterval);
}
示例13: installDefaults
import javax.swing.LookAndFeel; //导入方法依赖的package包/类
/**
* Called by <code>installUI</code>. This should set various defaults
* obtained from <code>UIManager.getLookAndFeelDefaults</code>, as well as
* set the layout obtained from <code>createLayout</code>
*
* @see javax.swing.UIManager#getLookAndFeelDefaults
* @see #createLayout
* @see #installUI
*/
protected void installDefaults()
{
LookAndFeel.installColorsAndFont(spinner, "Spinner.background",
"Spinner.foreground", "Spinner.font");
LookAndFeel.installBorder(spinner, "Spinner.border");
JComponent e = spinner.getEditor();
if (e instanceof JSpinner.DefaultEditor)
{
JSpinner.DefaultEditor de = (JSpinner.DefaultEditor) e;
de.getTextField().setBorder(null);
}
spinner.setLayout(createLayout());
spinner.setOpaque(true);
}
示例14: installDefaults
import javax.swing.LookAndFeel; //导入方法依赖的package包/类
/**
* Initializes any default properties that this UI has from the defaults for
* the Basic look and feel.
*
* @param slider The {@link JSlider} that is having this UI installed.
*/
protected void installDefaults(JSlider slider)
{
LookAndFeel.installColors(slider, "Slider.background",
"Slider.foreground");
LookAndFeel.installBorder(slider, "Slider.border");
shadowColor = UIManager.getColor("Slider.shadow");
highlightColor = UIManager.getColor("Slider.highlight");
focusColor = UIManager.getColor("Slider.focus");
focusInsets = UIManager.getInsets("Slider.focusInsets");
slider.setOpaque(true);
}
示例15: installDefaults
import javax.swing.LookAndFeel; //导入方法依赖的package包/类
/**
* Installs the defaults for this UI delegate in the specified panel.
*
* @param p the panel (<code>null</code> not permitted).
*/
protected void installDefaults(JPanel p)
{
LookAndFeel.installColorsAndFont(p, "Panel.background", "Panel.foreground",
"Panel.font");
// A test against the reference implementation shows that this method will
// install a border if one is defined in the UIDefaults table (even though
// the BasicLookAndFeel doesn't actually define a "Panel.border"). This
// test was written after discovering that a null argument to
// uninstallDefaults throws a NullPointerException in
// LookAndFeel.uninstallBorder()...
LookAndFeel.installBorder(p, "Panel.border");
}