javax.swing.JPanel.setUI()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(331)

本文整理了Java中javax.swing.JPanel.setUI()方法的一些代码示例,展示了JPanel.setUI()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPanel.setUI()方法的具体详情如下:
包路径:javax.swing.JPanel
类名称:JPanel
方法名:setUI

JPanel.setUI介绍

暂无

代码示例

代码示例来源:origin: tomighty/tomighty

@Inject
public Window(SexyPanelUI panelUI) {
  super("Tomighty");
  panel.setUI(panelUI);
  setAlwaysOnTop(true);
  setContentPane(panel);
  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  setLocation(100, 100);
  setResizable(false);
  setSize(180, 115);
  setUndecorated(true);
  addWindowFocusListener(new HideWindowWhenLosingFocus());
  addMouseListener(dragger);
  addMouseMotionListener(dragger);
}

代码示例来源:origin: org.gephi/ui-components

/**
 * Sets the look and feel (L&F) object that renders this component.
 *
 * @param ui
 *            The UI delegate.
 */
protected void setUI(RichTooltipPanelUI ui) {
  super.setUI(ui);
}

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

/**
 * Sets the L&F object that renders this component.
 * 
 * @param ui the <code>TaskPaneUI</code> L&F object
 * @see javax.swing.UIDefaults#getUI
 * 
 * @beaninfo bound: true hidden: true description: The UI object that
 * implements the taskpane group's LookAndFeel.
 */
public void setUI(TaskPaneUI ui) {
 super.setUI(ui);
}

代码示例来源:origin: com.github.insubstantial/flamingo

/**
 * Sets the look and feel (L&F) object that renders this component.
 * 
 * @param ui
 *            the PopupGalleryUI L&F object
 */
protected void setUI(PopupPanelUI ui) {
  super.setUI(ui);
}

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

/**
 * Sets the L&F object that renders this component.
 * 
 * @param ui the <code>TaskPaneUI</code> L&F object
 * @see javax.swing.UIDefaults#getUI
 * 
 * @beaninfo bound: true hidden: true description: The UI object that
 * implements the taskpane group's LookAndFeel.
 */
public void setUI(TaskPaneUI ui) {
 super.setUI(ui);
}

代码示例来源:origin: org.swinglabs.swingx/swingx-all

/**
 * Sets the L&F object that renders this component.
 * 
 * @param ui the <code>TaskPaneUI</code> L&F object
 * @see javax.swing.UIDefaults#getUI
 * 
 * @beaninfo bound: true hidden: true description: The UI object that
 * implements the taskpane group's LookAndFeel.
 */
public void setUI(TaskPaneUI ui) {
 super.setUI(ui);
}

代码示例来源:origin: com.github.insubstantial/flamingo

/**
 * Sets the look and feel (L&F) object that renders this component.
 * 
 * @param ui
 *            The UI delegate.
 */
protected void setUI(RichTooltipPanelUI ui) {
  super.setUI(ui);
}

代码示例来源:origin: org.swinglabs.swingx/swingx-core

/**
 * Sets the L&F object that renders this component.
 * 
 * @param ui the <code>TaskPaneUI</code> L&F object
 * @see javax.swing.UIDefaults#getUI
 * 
 * @beaninfo bound: true hidden: true description: The UI object that
 * implements the taskpane group's LookAndFeel.
 */
public void setUI(TaskPaneUI ui) {
 super.setUI(ui);
}

代码示例来源:origin: com.jidesoft/jide-oss

/**
 * Sets the UI object which implements the L&F for this component.
 *
 * @param ui the new UI object
 * @see javax.swing.UIDefaults#getUI
 */
public void setUI(SidePaneUI ui) {
  super.setUI(ui);
}

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

public void setUI(PanelUI ui) {
    if (ui instanceof ToolWindowTitleBarUI)
      super.setUI(ui);
  }
};

代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop

/**
 * Sets the L&F object that renders this component.
 * 
 * @param ui the <code>TaskPaneUI</code> L&F object
 * @see javax.swing.UIDefaults#getUI
 * 
 * @beaninfo bound: true hidden: true description: The UI object that
 * implements the taskpane group's LookAndFeel.
 */
public void setUI(TaskPaneUI ui) {
 super.setUI(ui);
}

代码示例来源:origin: com.fifesoft.rtext/fife.common

@Override
public void setUI(PanelUI ui) {
  super.setUI(ui);
  refreshMinimizeIcon();
}

代码示例来源:origin: it.tidalwave.solidblue/it-tidalwave-netbeans-lookandfeel

/***************************************************************************
 *
 *
 **************************************************************************/
public static void installHeaderUI (final JPanel pnHeader) 
 { 
  pnHeader.setUI(HeaderPanelUI.createUI(pnHeader));
 }

代码示例来源:origin: nroduit/Weasis

private static void updateUIToRemoveLF(JPanel panel) {
  panel.setUI(new javax.swing.plaf.PanelUI() {
  });
  panel.setBackground(Color.WHITE);
  panel.setForeground(Color.BLACK);
  panel.setBorder(null);
  panel.setOpaque(true);
}

代码示例来源:origin: it.tidalwave.netbeans/it-tidalwave-netbeans-lookandfeel

/***************************************************************************
 *
 *
 **************************************************************************/
public static void installHeaderUI (final JPanel pnHeader) 
 { 
  pnHeader.setUI(HeaderPanelUI.createUI(pnHeader));
 }

代码示例来源:origin: net.sf.tinylaf/tinylaf

public void setUI(PanelUI ui) {
  super.setUI(ui);
  init();
}

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

public Component create(Context context) {
    JPanel titleBar = new JPanel() {
      public void setUI(PanelUI ui) {
        if (ui instanceof ToolWindowTitleBarUI)
          super.setUI(ui);
      }
    };
    titleBar.setBorder(null);
    titleBar.setUI((PanelUI) context.get(ResourceManager.class)
        .createComponentUI(MyDoggyKeySpace.TOOL_WINDOW_TITLE_BAR_UI, context)
    );
    return titleBar;
  }
}

代码示例来源:origin: nroduit/Weasis

private void initGrid() {
  // For having a black background with any Look and Feel
  grid.setUI(new PanelUI() {
  });
  setGridBackground(Color.BLACK);
  add(grid, BorderLayout.CENTER);
}

代码示例来源:origin: nroduit/Weasis

public ImageViewerPlugin(ImageViewerEventManager<E> eventManager, GridBagLayoutModel layoutModel, String uid,
  String pluginName, Icon icon, String tooltips) {
  super(uid, pluginName, icon, tooltips);
  if (eventManager == null) {
    throw new IllegalArgumentException("EventManager cannot be null"); //$NON-NLS-1$
  }
  this.eventManager = eventManager;
  view2ds = new ArrayList<>();
  components = new ArrayList<>();
  grid = new JPanel();
  // For having a black background with any Look and Feel
  grid.setUI(new PanelUI() {
  });
  grid.setBackground(Color.BLACK);
  grid.setFocusCycleRoot(true);
  grid.setLayout(new GridBagLayout());
  add(grid, BorderLayout.CENTER);
  setLayoutModel(layoutModel);
  this.mouseHandler = new MouseHandler();
  grid.addMouseListener(mouseHandler);
  grid.addMouseMotionListener(mouseHandler);
}

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
protected void buildChooser() {
  initComponents();
  PaletteLookAndFeel laf = PaletteLookAndFeel.getInstance();
  setUI(PalettePanelUI.createUI(this));
  slidersHolder.setUI((PanelUI) PalettePanelUI.createUI(slidersHolder));
  
  slidersComboBox.setFont(laf.getFont("ColorChooser.font"));
  slidersHolder.add(new PaletteRGBChooser(),""+laf.getString("ColorChooser.rgbSliders"));
  slidersHolder.add(new PaletteCMYKChooser(),""+laf.getString("ColorChooser.cmykSliders"));
  slidersHolder.add(new PaletteHSBChooser(),""+laf.getString("ColorChooser.hsbSliders"));
  DefaultComboBoxModel cbm = new DefaultComboBoxModel();
  cbm.addElement(laf.getString("ColorChooser.rgbSliders"));
  cbm.addElement(laf.getString("ColorChooser.cmykSliders"));
  cbm.addElement(laf.getString("ColorChooser.hsbSliders"));
  slidersComboBox.setModel(cbm);
  slidersComboBox.addItemListener(new ItemListener() {
    @Override
    public void itemStateChanged(ItemEvent evt) {
      if (evt.getStateChange() == ItemEvent.SELECTED) {
        ((CardLayout) slidersHolder.getLayout()).show(slidersHolder, (String) evt.getItem());
        lastSelectedPanelIndex = slidersComboBox.getSelectedIndex(); 
      }
    }
  });
  slidersComboBox.setSelectedIndex(lastSelectedPanelIndex);
}

相关文章

JPanel类方法