本文整理汇总了Java中javax.help.HelpSetException类的典型用法代码示例。如果您正苦于以下问题:Java HelpSetException类的具体用法?Java HelpSetException怎么用?Java HelpSetException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HelpSetException类属于javax.help包,在下文中一共展示了HelpSetException类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: doAction
import javax.help.HelpSetException; //导入依赖的package包/类
/**
* Do action.
*/
@Override
protected void doAction() {
try {
if (helpBroker != null) {
if (helpBroker.isDisplayed()) {
return; // Help already displayed
}
helpBroker.setDisplayed(true); // Help already created but
// hidden - redisplay
return;
}
createAndDisplayHelp();
} catch (HelpSetException ex) {
DError.displayError(frame, ex);
}
}
开发者ID:kaikramer,项目名称:keystore-explorer,代码行数:22,代码来源:HelpAction.java
示例2: initHelpSystem
import javax.help.HelpSetException; //导入依赖的package包/类
/**
* Initialize the JavaHelp system.
*/
public static void initHelpSystem() {
// optimization to avoid repeated init
if (fHelp != null && fDisplayHelp != null)
return;
// (uses the classloader mechanism)
ClassLoader loader = IntroduceHelp.class.getClassLoader();
URL helpSetURL = HelpSet.findHelpSet(loader, "Introduce.hs");
try {
helpSet = new HelpSet(null, helpSetURL);
fHelp = helpSet.createHelpBroker();
fDisplayHelp = new CSH.DisplayHelpFromSource(fHelp);
} catch (HelpSetException ex) {
logger.warn("Cannot create help system with: " + helpSetURL + " " + ex.getMessage());
}
}
开发者ID:NCIP,项目名称:cagrid-core,代码行数:21,代码来源:IntroduceHelp.java
示例3: createAndDisplayHelp
import javax.help.HelpSetException; //导入依赖的package包/类
private void createAndDisplayHelp() throws HelpSetException {
URL hsUrl = getClass().getResource(res.getString("HelpAction.HelpSet"));
HelpSet hs = new HelpSet(getClass().getClassLoader(), hsUrl);
if (LnfUtil.isDarculaAvailable()) {
URL hsDarculaUrl = getClass().getResource(res.getString("HelpAction.DarculaHelpSet"));
HelpSet hsDarcula = new HelpSet(getClass().getClassLoader(), hsDarculaUrl);
hs.add(hsDarcula);
}
helpBroker = new DefaultHelpBroker(hs);
WindowPresentation windowPresentation = helpBroker.getWindowPresentation();
windowPresentation.createHelpWindow();
// Make window immune to modal dialogs in application
Window helpWindow = windowPresentation.getHelpWindow();
helpWindow.setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
// Set help icons - set lots of different sizes to give each OS the most
// flexibility in choosing an icon for display
ArrayList<Image> icons = new ArrayList<Image>();
icons.add(Toolkit.getDefaultToolkit().createImage(
getClass().getResource(res.getString("HelpAction.image.16x16"))));
icons.add(Toolkit.getDefaultToolkit().createImage(
getClass().getResource(res.getString("HelpAction.image.24x24"))));
icons.add(Toolkit.getDefaultToolkit().createImage(
getClass().getResource(res.getString("HelpAction.image.32x32"))));
helpWindow.setIconImages(icons);
helpBroker.setLocation(new Point(frame.getX() + 25, frame.getY() + 25));
helpBroker.setSize(new Dimension(850, 600));
helpBroker.setCurrentID(START_ID);
helpBroker.setDisplayed(true);
}
开发者ID:kaikramer,项目名称:keystore-explorer,代码行数:38,代码来源:HelpAction.java
示例4: HelpSet_JavaHelp
import javax.help.HelpSetException; //导入依赖的package包/类
public HelpSet_JavaHelp(HelpModule descriptor) throws MalformedURLException, HelpSetException {
super(descriptor);
String url = descriptor.getUrl();
helpSet = new HelpSet(HelpSet_JavaHelp.class.getClassLoader(),
url.startsWith("/web/") ? getClass().getResource(url) : new URL(url));
initViews();
}
开发者ID:carewebframework,项目名称:carewebframework-core,代码行数:8,代码来源:HelpSet_JavaHelp.java
示例5: initialize_help
import javax.help.HelpSetException; //导入依赖的package包/类
private void initialize_help(java.util.Locale p_locale)
{
// try to find the helpset and create a HelpBroker object
if (BoardFrame.help_broker == null)
{
String language = p_locale.getLanguage();
String helpset_name;
if (language.equalsIgnoreCase("de"))
{
helpset_name = "helpset/de/Help.hs";
}
else
{
helpset_name = "helpset/en/Help.hs";
}
try
{
URL hsURL = HelpSet.findHelpSet(this.getClass().getClassLoader(), helpset_name);
if (hsURL == null)
{
System.out.println("HelpSet " + helpset_name + " not found.");
}
else
{
BoardFrame.help_set = new HelpSet(null, hsURL);
}
}
catch (HelpSetException ee)
{
System.out.println("HelpSet " + helpset_name + " could not be opened.");
System.out.println(ee.getMessage());
}
if (BoardFrame.help_set != null)
{
BoardFrame.help_broker = BoardFrame.help_set.createHelpBroker();
}
if (BoardFrame.help_broker != null)
{
// CSH.DisplayHelpFromSource is a convenience class to display the helpset
contents_help = new CSH.DisplayHelpFromSource(BoardFrame.help_broker);
direct_help = new CSH.DisplayHelpAfterTracking(BoardFrame.help_broker);
}
}
}
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:45,代码来源:BoardMenuHelp.java
示例6: initialize_help
import javax.help.HelpSetException; //导入依赖的package包/类
private void initialize_help(java.util.Locale p_locale)
{
// try to find the helpset and create a HelpBroker object
if (BoardFrame.help_broker == null)
{
String language = p_locale.getLanguage();
String helpset_name;
if (language.equalsIgnoreCase("de"))
{
helpset_name = "helpset/de/Help.hs";
}
else
{
helpset_name = "helpset/en/Help.hs";
}
try
{
URL hsURL = HelpSet.findHelpSet(this.getClass().getClassLoader(), helpset_name);
if (hsURL == null)
{
FRLogger.warning("HelpSet " + helpset_name + " not found.");
}
else
{
BoardFrame.help_set = new HelpSet(null, hsURL);
}
}
catch (HelpSetException ee)
{
System.out.println("HelpSet " + helpset_name + " could not be opened.");
System.out.println(ee.getMessage());
}
if (BoardFrame.help_set != null)
{
BoardFrame.help_broker = BoardFrame.help_set.createHelpBroker();
}
if (BoardFrame.help_broker != null)
{
// CSH.DisplayHelpFromSource is a convenience class to display the helpset
contents_help = new CSH.DisplayHelpFromSource(BoardFrame.help_broker);
direct_help = new CSH.DisplayHelpAfterTracking(BoardFrame.help_broker);
}
}
}
开发者ID:freerouting,项目名称:freerouting,代码行数:45,代码来源:BoardMenuHelp.java
注:本文中的javax.help.HelpSetException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论