本文整理汇总了Java中org.jdesktop.swingx.JXTipOfTheDay类的典型用法代码示例。如果您正苦于以下问题:Java JXTipOfTheDay类的具体用法?Java JXTipOfTheDay怎么用?Java JXTipOfTheDay使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JXTipOfTheDay类属于org.jdesktop.swingx包,在下文中一共展示了JXTipOfTheDay类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: showDialog
import org.jdesktop.swingx.JXTipOfTheDay; //导入依赖的package包/类
public void showDialog(final boolean forceShow) {
if (tipOfTheDay != null) {
tipOfTheDay.showDialog(parentCompo, new JXTipOfTheDay.ShowOnStartupChoice() {
public boolean isShowingOnStartup() {
if (forceShow) return true;
else return isStartupChoiceOption();
}
public void setShowingOnStartup(boolean showOnStartup) {
setStartupChoiceOption(showOnStartup);
setNextStartingTipLocation(tipOfTheDay.getCurrentTip());
}
});
} else {
logger.error("tip of the day has not been loaded correctly. Does the tips.properties file exist?");
}
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:18,代码来源:TipOfTheDay.java
示例2: addBasicDefaults
import org.jdesktop.swingx.JXTipOfTheDay; //导入依赖的package包/类
@Override
protected void addBasicDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
super.addBasicDefaults(addon, defaults);
Font font = UIManagerExt.getSafeFont("Label.font", new Font("Dialog", Font.PLAIN, 12));
font = font.deriveFont(Font.BOLD, 13f);
defaults.add(JXTipOfTheDay.uiClassID, BasicTipOfTheDayUI.class.getName());
defaults.add("TipOfTheDay.font", UIManagerExt.getSafeFont("TextPane.font",
new FontUIResource("Serif", Font.PLAIN, 12)));
defaults.add("TipOfTheDay.tipFont", new FontUIResource(font));
defaults.add("TipOfTheDay.background", new ColorUIResource(Color.WHITE));
defaults.add("TipOfTheDay.icon",
LookAndFeel.makeIcon(BasicTipOfTheDayUI.class, "resources/TipOfTheDay24.gif"));
defaults.add("TipOfTheDay.border", new BorderUIResource(
BorderFactory.createLineBorder(new Color(117, 117, 117))));
UIManagerExt.addResourceBundle(
"org.jdesktop.swingx.plaf.basic.resources.TipOfTheDay");
}
开发者ID:teddyted,项目名称:iSeleda,代码行数:21,代码来源:TipOfTheDayAddon.java
示例3: addWindowsDefaults
import org.jdesktop.swingx.JXTipOfTheDay; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void addWindowsDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
super.addWindowsDefaults(addon, defaults);
Font font = UIManagerExt.getSafeFont("Label.font",
new Font("Dialog", Font.PLAIN, 12));
font = font.deriveFont(13f);
defaults.add(JXTipOfTheDay.uiClassID, WindowsTipOfTheDayUI.class.getName());
defaults.add("TipOfTheDay.background", new ColorUIResource(Color.GRAY));
defaults.add("TipOfTheDay.font", new FontUIResource(font));
defaults.add("TipOfTheDay.icon",
LookAndFeel.makeIcon(WindowsTipOfTheDayUI.class, "resources/tipoftheday.png"));
defaults.add("TipOfTheDay.border" ,new BorderUIResource(new WindowsTipOfTheDayUI.TipAreaBorder()));
UIManagerExt.addResourceBundle(
"org.jdesktop.swingx.plaf.windows.resources.TipOfTheDay");
}
开发者ID:teddyted,项目名称:iSeleda,代码行数:22,代码来源:TipOfTheDayAddon.java
示例4: createTipOfTheDayDemo
import org.jdesktop.swingx.JXTipOfTheDay; //导入依赖的package包/类
private void createTipOfTheDayDemo() {
model = createTipOfTheDayModel();
JXPanel panel = new JXPanel(new VerticalLayout());
totd = new JXTipOfTheDay(model);
totd.setName("totd");
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
panel.add(totd);
nextTipLink = new JXHyperlink();
nextTipLink.setName("nextTipLink");
panel.add(nextTipLink, BorderLayout.SOUTH);
add(panel);
dialogLink = new JXHyperlink();
dialogLink.setName("dialogLink");
add(dialogLink, BorderLayout.SOUTH);
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:19,代码来源:TipOfTheDayDemo.java
示例5: showTipOfTheDayIfNotDisabled
import org.jdesktop.swingx.JXTipOfTheDay; //导入依赖的package包/类
public void showTipOfTheDayIfNotDisabled(Component parent) {
Properties p = new Properties();
try {
p.load(this.getClass().getClassLoader().getResourceAsStream("tipoftheday.properties"));
TipOfTheDayModel model = new RandomTipOfTheDayModel(TipLoader.load(p));
JXTipOfTheDay jxTipOfTheDay = new JXTipOfTheDay(model);
jxTipOfTheDay.showDialog(parent, new ShowOnStartupChoice() {
@Override
public void setShowingOnStartup(boolean arg0) {
dataConfiguration.setProperty(GUI_SHOW_TIP_OF_THE_DAY, arg0);
}
@Override
public boolean isShowingOnStartup() {
return dataConfiguration.getBoolean(GUI_SHOW_TIP_OF_THE_DAY, true);
}
});
} catch (IOException e) {
LOGGER.warn("Can't load tip of the day: " + e.getMessage());
}
}
开发者ID:otros-systems,项目名称:otroslogviewer,代码行数:23,代码来源:TipOfTheDay.java
示例6: TipOfTheDay
import org.jdesktop.swingx.JXTipOfTheDay; //导入依赖的package包/类
public TipOfTheDay(Component parentCompo) {
prefs = Preferences.userNodeForPackage(OrbitImageAnalysis.class);
try {
this.parentCompo = parentCompo;
tipOfTheDay = new JXTipOfTheDay(loadModel());
tipOfTheDay.setCurrentTip(getStartingTipLocation());
} catch (Exception e) {
logger.error("error loading tips.properties", e);
}
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:12,代码来源:TipOfTheDay.java
示例7: showTips
import org.jdesktop.swingx.JXTipOfTheDay; //导入依赖的package包/类
public static void showTips(JFrame parent, boolean force) {
try {
if (nextTip == -1) {
nextTip = tipPrefs.getInt(NEXT_TIP_NR_KEY, 0);
}
TipOfTheDayModel tipOfTheDayModel = loadModel();
int tipCount = tipOfTheDayModel.getTipCount();
if (nextTip < 0) {
nextTip = 0;
}
if (nextTip > tipCount - 1) {
nextTip = tipCount - 1;
}
JXTipOfTheDay tipOfTheDay = new JXTipOfTheDay(tipOfTheDayModel);
tipOfTheDay.setCurrentTip(nextTip);
tipOfTheDay.showDialog(parent, tipPrefs, force); // this stops until the user hits close
int lastTipIndex = tipOfTheDay.getCurrentTip();
if (lastTipIndex < tipCount - 1) {
nextTip = lastTipIndex + 1;
} else {
nextTip = 0;
}
} catch (IOException ex) {
Dialogs.showExceptionDialog(ex);
}
}
开发者ID:teddyted,项目名称:iSeleda,代码行数:30,代码来源:TipsOfTheDay.java
示例8: createUI
import org.jdesktop.swingx.JXTipOfTheDay; //导入依赖的package包/类
public static ComponentUI createUI(JComponent c) {
return new WindowsTipOfTheDayUI((JXTipOfTheDay)c);
}
开发者ID:teddyted,项目名称:iSeleda,代码行数:4,代码来源:WindowsTipOfTheDayUI.java
示例9: WindowsTipOfTheDayUI
import org.jdesktop.swingx.JXTipOfTheDay; //导入依赖的package包/类
public WindowsTipOfTheDayUI(JXTipOfTheDay tipPane) {
super(tipPane);
}
开发者ID:teddyted,项目名称:iSeleda,代码行数:4,代码来源:WindowsTipOfTheDayUI.java
示例10: createUI
import org.jdesktop.swingx.JXTipOfTheDay; //导入依赖的package包/类
public static ComponentUI createUI(JComponent c) {
return new BasicTipOfTheDayUI((JXTipOfTheDay)c);
}
开发者ID:teddyted,项目名称:iSeleda,代码行数:4,代码来源:BasicTipOfTheDayUI.java
示例11: BasicTipOfTheDayUI
import org.jdesktop.swingx.JXTipOfTheDay; //导入依赖的package包/类
public BasicTipOfTheDayUI(JXTipOfTheDay tipPane) {
this.tipPane = tipPane;
}
开发者ID:teddyted,项目名称:iSeleda,代码行数:4,代码来源:BasicTipOfTheDayUI.java
示例12: propertyChange
import org.jdesktop.swingx.JXTipOfTheDay; //导入依赖的package包/类
public void propertyChange(PropertyChangeEvent evt) {
if (JXTipOfTheDay.CURRENT_TIP_CHANGED_KEY.equals(evt.getPropertyName())) {
showCurrentTip();
}
}
开发者ID:teddyted,项目名称:iSeleda,代码行数:6,代码来源:BasicTipOfTheDayUI.java
示例13: propertyChange
import org.jdesktop.swingx.JXTipOfTheDay; //导入依赖的package包/类
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (JXTipOfTheDay.CURRENT_TIP_CHANGED_KEY.equals(evt.getPropertyName())) {
showCurrentTip();
}
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:7,代码来源:BasicTipOfTheDayUI.java
示例14: displayTipDialog
import org.jdesktop.swingx.JXTipOfTheDay; //导入依赖的package包/类
@org.jdesktop.application.Action
public void displayTipDialog() {
JXTipOfTheDay totd = new JXTipOfTheDay(model);
totd.setCurrentTip(0);
totd.showDialog(this);
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:7,代码来源:TipOfTheDayDemo.java
示例15: createDialog
import org.jdesktop.swingx.JXTipOfTheDay; //导入依赖的package包/类
/**
* Creates a new JDialog to display a JXTipOfTheDay panel. If
* <code>choice</code> is not null then the window will offer a way for the
* end-user to not show the tip of the day dialog.
*
* @param parentComponent
* @param choice
* @return a new JDialog to display a JXTipOfTheDay panel
*/
public abstract JDialog createDialog(Component parentComponent,
JXTipOfTheDay.ShowOnStartupChoice choice);
开发者ID:teddyted,项目名称:iSeleda,代码行数:12,代码来源:TipOfTheDayUI.java
注:本文中的org.jdesktop.swingx.JXTipOfTheDay类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论