Skip to main content

WinFileSpecification Class

Contains Windows-specific settings for a launch action.

Declaration

public class WinFileSpecification extends JavaObject

Remarks

The following code snippet creates a bookmark that opens a PDF file when a user selects the bookmark in a PDF document.

The code configures a Windows file specification that points to Invoice.pdf. The file specification defines the default directory, the launch operation, and the option to open the file in a new window.

// Create a bookmark with the specified title.
Bookmark bookmark = new Bookmark("Introduction");

// Create Windows-specific launch settings.
WinFileSpecification fileSpecification = new WinFileSpecification();
fileSpecification.setFileName("Invoice.pdf");
fileSpecification.setDefaultDirectory("C:\\Reports");
fileSpecification.setOperation(LaunchOperation.OPEN);
fileSpecification.setNewWindow(DefaultBoolean.TRUE);

// Create a launch action.
LaunchAction action = new LaunchAction();

// Assign the file specification to the action.
action.setWinFileSpecification(fileSpecification);

// Attach the action to the bookmark.
bookmark.setAction(action);

// Add the bookmark to the document.
document.getBookmarks().add(bookmark);

Inherited Members

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.initFields()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
com.devexpress.system.JavaObject
WinFileSpecification

WinFileSpecification()

Initializes a new instance of the WinFileSpecification class.

Declaration

public WinFileSpecification()

Methods

clone() Method

Creates a copy of the current object.

Declaration

public WinFileSpecification clone()

Returns

Type Description
WinFileSpecification

A WinFileSpecification copy.

getDefaultDirectory() Method

Returns the default working directory for the application.

Declaration

public String getDefaultDirectory()

Returns

Type Description
String

The default working directory for the application.

getFileName() Method

Returns the file or application to open.

Declaration

public String getFileName()

Returns

Type Description
String

The file or application to open.

getNewWindow() Method

returns whether to open the target in a new window.

Declaration

public DefaultBoolean getNewWindow()

Returns

Type Description
com.devexpress.utils.DefaultBoolean

true if the target in opened in a new window; otherwise, false.

getOperation() Method

Returns the operation that the launch action performs.

Declaration

public LaunchOperation getOperation()

Returns

Type Description
LaunchOperation

The operation that the launch action performs.

getParameters() Method

Returns command-line arguments passed to the application.

Declaration

public String getParameters()

Returns

Type Description
String

Command-line arguments.

setDefaultDirectory(String value) Method

Sets the default working directory for the application.

Declaration

public void setDefaultDirectory(String value)

Parameters

Name Type Description
value String

The default working directory for the application.

setFileName(String value) Method

Sets the file or application to open.

Declaration

public void setFileName(String value)

Parameters

Name Type Description
value String

The file or application to open.

setNewWindow(DefaultBoolean value) Method

Sets whether to open the target in a new window.

Declaration

public void setNewWindow(DefaultBoolean value)

Parameters

Name Type Description
value com.devexpress.utils.DefaultBoolean

true to open the target in a new window; otherwise, false.

setOperation(LaunchOperation value) Method

Sets the operation that the launch action performs.

Declaration

public void setOperation(LaunchOperation value)

Parameters

Name Type Description
value LaunchOperation

The operation that the launch action performs.

setParameters(String value) Method

Sets command-line arguments passed to the application.

Declaration

public void setParameters(String value)

Parameters

Name Type Description
value String

Command-line arguments.