Package com.oorian.messaging.commands
Class NewBrowserWindowCommand
java.lang.Object
com.oorian.messaging.commands.Command
com.oorian.messaging.commands.NewBrowserWindowCommand
Command to open a new browser window or tab.
This command instructs the client to open a new browser window with a URL. It supports window naming and parameter configuration for controlling window features and behavior.
Features:
- Opens new browser windows or tabs
- Configurable window parameters (size, position, features)
- Named windows for management and reuse
- URL encoding for safe transmission
Usage:
// Open a URL in a new window
NewBrowserWindowCommand win1 = new NewBrowserWindowCommand("http://example.com");
// Open with window name
NewBrowserWindowCommand win2 = new NewBrowserWindowCommand("http://example.com", "myWindow");
// Open with name and parameters
NewBrowserWindowCommand win3 = new NewBrowserWindowCommand(
"http://example.com", "myWindow", "width=600,height=400");
- Since:
- 2007
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new NewBrowserWindowCommand to open a URL.NewBrowserWindowCommand(String url, String name) Constructs a new NewBrowserWindowCommand to open a URL with a window name.NewBrowserWindowCommand(String url, String name, String params) Constructs a new NewBrowserWindowCommand to open a URL with a name and parameters. -
Method Summary
Modifier and TypeMethodDescriptiontoJson()Generates the JSON representation of this new browser window command.Methods inherited from class com.oorian.messaging.commands.Command
getElementId, getId, setElementId, toString
-
Constructor Details
-
NewBrowserWindowCommand
Constructs a new NewBrowserWindowCommand to open a URL.- Parameters:
url- the URL to open in the new window
-
NewBrowserWindowCommand
Constructs a new NewBrowserWindowCommand to open a URL with a window name.- Parameters:
url- the URL to open in the new windowname- the name of the window
-
NewBrowserWindowCommand
Constructs a new NewBrowserWindowCommand to open a URL with a name and parameters.- Parameters:
url- the URL to open in the new windowname- the name of the windowparams- the window parameters (e.g., "width=600,height=400")
-
-
Method Details
-
toJson
Generates the JSON representation of this new browser window command.The JSON includes the command ID, URL (if URL-based), window title/name, and parameters. URLs are encoded for safe transmission.
-