當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。