Package com.nomagic.magicdraw.core
Class GUILog.DefaultURLActionHandler
- java.lang.Object
-
- com.nomagic.magicdraw.core.GUILog.DefaultURLActionHandler
-
- All Implemented Interfaces:
GUILog.URLActionHandler
- Enclosing class:
- GUILog
@OpenApiAll public static class GUILog.DefaultURLActionHandler extends java.lang.Object implements GUILog.URLActionHandler
Default implementation for URLActionHandler
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<? extends NMAction>
actions
Actionsprivate boolean
closeWindow
CLose window on action execution-
Fields inherited from interface com.nomagic.magicdraw.core.GUILog.URLActionHandler
ACTION_URL_PROTOCOL
-
-
Constructor Summary
Constructors Constructor Description DefaultURLActionHandler(NMAction action)
Constructor for a handler with a single actionDefaultURLActionHandler(NMAction action, boolean closeWindow)
Constructor for a handler with a single actionDefaultURLActionHandler(java.util.Collection<? extends NMAction> actions)
Constructor for a handler with many actionsDefaultURLActionHandler(java.util.Collection<? extends NMAction> actions, boolean closeWindow)
Constructor for a handler with many actions
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.util.Collection<? extends NMAction>
collectAllActions(java.util.Collection<? extends NMAction> actions)
boolean
openURL(java.lang.String url, java.awt.event.InputEvent event)
Opens given url.
-
-
-
Field Detail
-
closeWindow
private final boolean closeWindow
CLose window on action execution
-
actions
private final java.util.Collection<? extends NMAction> actions
Actions
-
-
Constructor Detail
-
DefaultURLActionHandler
public DefaultURLActionHandler(@Nonnull NMAction action)
Constructor for a handler with a single action- Parameters:
action
- action
-
DefaultURLActionHandler
public DefaultURLActionHandler(@Nonnull NMAction action, boolean closeWindow)
Constructor for a handler with a single action- Parameters:
action
- actioncloseWindow
- close window in which hyperlink was activated
-
DefaultURLActionHandler
public DefaultURLActionHandler(@Nonnull java.util.Collection<? extends NMAction> actions)
Constructor for a handler with many actions- Parameters:
actions
- actions
-
DefaultURLActionHandler
public DefaultURLActionHandler(@Nonnull java.util.Collection<? extends NMAction> actions, boolean closeWindow)
Constructor for a handler with many actions- Parameters:
actions
- actionscloseWindow
- close window in which hyperlink was activated
-
-
Method Detail
-
openURL
public boolean openURL(java.lang.String url, java.awt.event.InputEvent event)
Description copied from interface:GUILog.URLActionHandler
Opens given url.- Specified by:
openURL
in interfaceGUILog.URLActionHandler
- Parameters:
url
- urlevent
- event- Returns:
- true if url was handled, false if not
-
-