当前位置: 首页>>代码示例>>Java>>正文


Java CSH.DisplayHelpFromSource方法代码示例

本文整理汇总了Java中javax.help.CSH.DisplayHelpFromSource方法的典型用法代码示例。如果您正苦于以下问题:Java CSH.DisplayHelpFromSource方法的具体用法?Java CSH.DisplayHelpFromSource怎么用?Java CSH.DisplayHelpFromSource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.help.CSH的用法示例。


在下文中一共展示了CSH.DisplayHelpFromSource方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: actionPerformed

import javax.help.CSH; //导入方法依赖的package包/类
public void actionPerformed(ActionEvent e) {
    try {
        String helpHS = "jhelpset.hs"; //$NON-NLS-1$
        ClassLoader cl = getClass().getClassLoader();
        URL hsURL = HelpSet.findHelpSet(cl, helpHS);
        HelpSet hs = new HelpSet(null, hsURL);
        HelpBroker hb = hs.createHelpBroker();
        Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
 
        // Default HelpBroker size is too small, make bigger unless on anciente "VGA" resolution
        if (d.width >= 1024 && d.height >= 800) {
            hb.setSize(new Dimension(1024, 700));
        } else {
            hb.setSize(new Dimension(640, 480));
        }
        CSH.DisplayHelpFromSource helpDisplay = new CSH.DisplayHelpFromSource(hb);
        helpDisplay.actionPerformed(e);

    } catch (Exception ev) {
        setEnabled(false);
        SPSUtils.showExceptionDialogNoReport(parentFrame,
                "Could not load help file",
                ev);
    }         
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:26,代码来源:HelpAction.java

示例2: initHelpSystem

import javax.help.CSH; //导入方法依赖的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: getHelpSetListener

import javax.help.CSH; //导入方法依赖的package包/类
/**
 * Get a Action listener for the helpset. Use this by adding it as an
 * actionListener to a button
 * @return the ActionListener
 * TODO: return action listener that pops up a notification dialog.
 */
public ActionListener getHelpSetListener() {
    if (helpBroker != null) {
        return new CSH.DisplayHelpFromSource(helpBroker);
    }
    return new HelpErrorListener();
}
 
开发者ID:asaladino,项目名称:folder-monitor,代码行数:13,代码来源:DocumentationHelper.java

示例4: actionPerformed

import javax.help.CSH; //导入方法依赖的package包/类
public void actionPerformed(ActionEvent e) {
	try {
		String helpHS = "jhelpset.hs";
		ClassLoader cl = getClass().getClassLoader();
		URL hsURL = HelpSet.findHelpSet(cl, helpHS);
		HelpSet hs = new HelpSet(null, hsURL);
		HelpBroker hb = hs.createHelpBroker();
		Dimension d = Toolkit.getDefaultToolkit().getScreenSize();

		// Default HelpBroker size is too small, make bigger unless on anciente "VGA" resolution
		if (d.width >= 1024 && d.height >= 800) {
			hb.setSize(new Dimension(1024, 700));
		} else {
			hb.setSize(new Dimension(640, 480));
		}
		CSH.DisplayHelpFromSource helpDisplay = new CSH.DisplayHelpFromSource(hb);
		helpDisplay.actionPerformed(e);

	} catch (Exception ev) {
		setEnabled(false);
		SPSUtils.showExceptionDialogNoReport(parent,
				"Could not load the help file. The dqguruhelp.jar file either " +
				"doesn't exist or isn't in your classpath.\nThis error usually " +
				"occurrs because you are running the DQguru within an IDE.\n" +
				"The Help function is now disabled",
				ev);
	}         
}
 
开发者ID:SQLPower,项目名称:power-matchmaker,代码行数:29,代码来源:HelpAction.java

示例5: initialize_help

import javax.help.CSH; //导入方法依赖的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: getHelpDisplay

import javax.help.CSH; //导入方法依赖的package包/类
public static CSH.DisplayHelpFromSource getHelpDisplay() {
    return csh;
}
 
开发者ID:Torridity,项目名称:dsworkbench,代码行数:4,代码来源:GlobalOptions.java

示例7: initialize_help

import javax.help.CSH; //导入方法依赖的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

示例8: getFDisplayHelp

import javax.help.CSH; //导入方法依赖的package包/类
public static CSH.DisplayHelpFromSource getFDisplayHelp() {
    return fDisplayHelp;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:4,代码来源:IntroduceHelp.java

示例9: setFDisplayHelp

import javax.help.CSH; //导入方法依赖的package包/类
public static void setFDisplayHelp(CSH.DisplayHelpFromSource displayHelp) {
    IntroduceHelp.fDisplayHelp = displayHelp;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:4,代码来源:IntroduceHelp.java


注:本文中的javax.help.CSH.DisplayHelpFromSource方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。