本文整理汇总了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);
}
}
示例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());
}
}
示例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();
}
示例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);
}
}
示例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);
}
}
}
示例6: getHelpDisplay
import javax.help.CSH; //导入方法依赖的package包/类
public static CSH.DisplayHelpFromSource getHelpDisplay() {
return csh;
}
示例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);
}
}
}
示例8: getFDisplayHelp
import javax.help.CSH; //导入方法依赖的package包/类
public static CSH.DisplayHelpFromSource getFDisplayHelp() {
return fDisplayHelp;
}
示例9: setFDisplayHelp
import javax.help.CSH; //导入方法依赖的package包/类
public static void setFDisplayHelp(CSH.DisplayHelpFromSource displayHelp) {
IntroduceHelp.fDisplayHelp = displayHelp;
}