org.jdesktop.swingx.tips.TipLoader Java Examples
The following examples show how to use
org.jdesktop.swingx.tips.TipLoader.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TipOfTheDay.java From otroslogviewer with Apache License 2.0 | 6 votes |
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()); } }
Example #2
Source File: TipsOfTheDayDialog.java From MtgDesktopCompanion with GNU General Public License v3.0 | 5 votes |
public TipsOfTheDayDialog() throws IOException { Properties tips = new Properties(); tips.load(MTGConstants.TOOLTIPS_FILE.openStream()); TipOfTheDayModel model = TipLoader.load(tips); setModel(model); }
Example #3
Source File: TipsOfTheDay.java From Pixelitor with GNU General Public License v3.0 | 5 votes |
private static TipOfTheDayModel loadModel() throws IOException { var properties = new Properties(); TipOfTheDayModel model; try (var propertiesInputStream = TipsOfTheDay.class.getResourceAsStream("/tips.properties")) { properties.load(propertiesInputStream); model = TipLoader.load(properties); } return model; }
Example #4
Source File: TipOfTheDay.java From orbit-image-analysis with GNU General Public License v3.0 | 4 votes |
private TipOfTheDayModel loadModel() throws Exception { Properties properties = new Properties(); InputStream propertiesIn = OrbitUtils.DARKUI ? OrbitImageAnalysis.class.getResourceAsStream("/resource/tips.properties") : OrbitImageAnalysis.class.getResourceAsStream("/resource/tipsold.properties"); properties.load(propertiesIn); return TipLoader.load(properties); }