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


Java LookAndFeel.installBorder方法代码示例

本文整理汇总了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");
  */
}
 
开发者ID:vilie,项目名称:javify,代码行数:24,代码来源:BasicOptionPaneUI.java

示例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);
}
 
开发者ID:vilie,项目名称:javify,代码行数:21,代码来源:BasicMenuUI.java

示例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);
      }
}
 
开发者ID:vilie,项目名称:javify,代码行数:20,代码来源:BasicInternalFrameUI.java

示例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);
}
 
开发者ID:vilie,项目名称:javify,代码行数:19,代码来源:BasicScrollPaneUI.java

示例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);
}
 
开发者ID:equella,项目名称:Equella,代码行数:13,代码来源:MultiLineLabel.java

示例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);
    }
 
开发者ID:Naoghuman,项目名称:typewriter,代码行数:10,代码来源:PRoPanel.java

示例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");
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:12,代码来源:RowNumberHeader.java

示例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);
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:8,代码来源:BasicTipOfTheDayUI.java

示例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");
}
 
开发者ID:teddyted,项目名称:iSeleda,代码行数:8,代码来源:BasicCategoryUI.java

示例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");
}
 
开发者ID:teddyted,项目名称:iSeleda,代码行数:8,代码来源:BasicTipOfTheDayUI.java

示例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");
}
 
开发者ID:vilie,项目名称:javify,代码行数:18,代码来源:BasicScrollBarUI.java

示例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);
}
 
开发者ID:vilie,项目名称:javify,代码行数:33,代码来源:BasicProgressBarUI.java

示例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);
}
 
开发者ID:vilie,项目名称:javify,代码行数:24,代码来源:BasicSpinnerUI.java

示例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);
}
 
开发者ID:vilie,项目名称:javify,代码行数:18,代码来源:BasicSliderUI.java

示例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");
}
 
开发者ID:vilie,项目名称:javify,代码行数:19,代码来源:BasicPanelUI.java


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