本文整理汇总了Java中org.pushingpixels.substance.api.skin.SkinInfo类的典型用法代码示例。如果您正苦于以下问题:Java SkinInfo类的具体用法?Java SkinInfo怎么用?Java SkinInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SkinInfo类属于org.pushingpixels.substance.api.skin包,在下文中一共展示了SkinInfo类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSkins
import org.pushingpixels.substance.api.skin.SkinInfo; //导入依赖的package包/类
@Override
public Set<SkinInfo> getSkins() {
final HashSet<SkinInfo> retVal = new HashSet<SkinInfo>();
final SkinInfo phonSkinInfo = new SkinInfo(PhonSubstanceSkin.NAME, PhonSubstanceSkin.class.getName());
phonSkinInfo.setDefault(true);
retVal.add(phonSkinInfo);
return retVal;
}
示例2: getSubstanceLookAndFeelList
import org.pushingpixels.substance.api.skin.SkinInfo; //导入依赖的package包/类
private static List<String> getSubstanceLookAndFeelList() {
List<String> v = new Vector<>();
for (Entry<String, SkinInfo> entry : getSubstanceLookAndFeelEntryList()) {
v.add(entry.getValue().getDisplayName());
}
return v;
}
示例3: getSubstanceLookAndFeelEntryList
import org.pushingpixels.substance.api.skin.SkinInfo; //导入依赖的package包/类
private static List<Entry<String, SkinInfo>> getSubstanceLookAndFeelEntryList() {
if (substanceLookAndFeelCache == null) {
substanceLookAndFeelCache = new ArrayList<>();
for (Entry<String, SkinInfo> entry : SubstanceLookAndFeel.getAllSkins().entrySet()) {
substanceLookAndFeelCache.add(entry);
}
}
return substanceLookAndFeelCache;
}
示例4: getAllSkins
import org.pushingpixels.substance.api.skin.SkinInfo; //导入依赖的package包/类
/**
* Returns all available skins.
*
* @return All available skins. Key - skin display name, value - skin
* information.
*/
public static Map<String, SkinInfo> getAllSkins() {
initPluginsIfNecessary();
Map<String, SkinInfo> result = new TreeMap<String, SkinInfo>();
for (Object skinPlugin : SubstanceLookAndFeel.skinPlugins
.getAvailablePlugins(true)) {
for (SkinInfo skinInfo : ((SubstanceSkinPlugin) skinPlugin)
.getSkins()) {
result.put(skinInfo.getDisplayName(), skinInfo);
}
}
return result;
}
示例5: addMenuItems
import org.pushingpixels.substance.api.skin.SkinInfo; //导入依赖的package包/类
/**
* Adds the necessary <code>JMenuItem</code>s to the specified menu.
*
* @param menu
* Menu.
*/
private void addMenuItems(JMenu menu) {
menu.add(this.restoreAction);
menu.add(this.iconifyAction);
if (Toolkit.getDefaultToolkit().isFrameStateSupported(
Frame.MAXIMIZED_BOTH)) {
menu.add(this.maximizeAction);
}
if (SubstanceCoreUtilities.toShowExtraWidgets(rootPane)) {
menu.addSeparator();
JMenu skinMenu = new JMenu(SubstanceCoreUtilities
.getResourceBundle(rootPane).getString("SystemMenu.skins"));
Map<String, SkinInfo> allSkins = SubstanceLookAndFeel.getAllSkins();
for (Map.Entry<String, SkinInfo> skinEntry : allSkins.entrySet()) {
final String skinClassName = skinEntry.getValue()
.getClassName();
JMenuItem jmiSkin = new JMenuItem(skinEntry.getKey());
jmiSkin.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
SubstanceLookAndFeel.setSkin(skinClassName);
}
});
}
});
skinMenu.add(jmiSkin);
}
menu.add(skinMenu);
}
menu.addSeparator();
menu.add(this.closeAction);
}
示例6: JPanelConfigGeneral
import org.pushingpixels.substance.api.skin.SkinInfo; //导入依赖的package包/类
public JPanelConfigGeneral() {
initComponents();
jtxtMachineHostname.getDocument().addDocumentListener(dirty);
jcboLAF.addActionListener(dirty);
jcboFontFamilyName.addActionListener(dirty);
jtxtFontSize.addActionListener(dirty);
jcboMachineScreenmode.addActionListener(dirty);
jcboMachineLeftPanel.addActionListener(dirty);
jcboTicketsBag.addActionListener(dirty);
jcboLAF.addItem(new LAFInfo("System", UIManager.getSystemLookAndFeelClassName()));
// Installed skins
LookAndFeelInfo[] lafs = UIManager.getInstalledLookAndFeels();
for (LookAndFeelInfo laf : lafs) {
jcboLAF.addItem(new LAFInfo(laf.getName(), laf.getClassName()));
}
// Substance skins
// new SubstanceLookAndFeel(); // TODO: Remove in Substance 5.0. Workaround for Substance 4.3 to initialize static variables
Map<String, SkinInfo> skins = SubstanceLookAndFeel.getAllSkins();
for (SkinInfo skin : skins.values()) {
jcboLAF.addItem(new LAFInfo(skin.getDisplayName(), skin.getClassName()));
}
jcboLAF.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent evt) {
changeLAF();
}
});
for (String fontName : GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames()) {
jcboFontFamilyName.addItem(fontName);
}
jcboMachineScreenmode.addItem("window");
jcboMachineScreenmode.addItem("fullscreen");
jcboMachineLeftPanel.addItem("open");
jcboMachineLeftPanel.addItem("hide");
jcboTicketsBag.addItem("simple");
jcboTicketsBag.addItem("standard");
jcboTicketsBag.addItem("restaurant");
jcboTicketsBag.addItem("geomap");
}
示例7: getSubstanceLookAndFeel
import org.pushingpixels.substance.api.skin.SkinInfo; //导入依赖的package包/类
private static String getSubstanceLookAndFeel(int n) {
List<Entry<String, SkinInfo>> slfl = getSubstanceLookAndFeelEntryList();
if (n >= 0 && n < slfl.size()) return slfl.get(n).getValue().getClassName();
return null;
}
示例8: getSkins
import org.pushingpixels.substance.api.skin.SkinInfo; //导入依赖的package包/类
/**
* Returns information on all available skins in <code>this</code> plugin.
*
* @return Information on all available skins in <code>this</code> plugin.
*/
public Set<SkinInfo> getSkins();