JDIC API V2006 Release 0308

org.jdesktop.jdic.filetypes
类 Action

java.lang.Object
  继承者 org.jdesktop.jdic.filetypes.Action

public class Action
extends java.lang.Object

This class represents an action that could be applied to a particular file type. An action could be added to an Association object as part of an association.

An Action object is a triple containing a description string, a verb string and a command string. Common examples of verb are "open", "edit", and "print". The command string consists of the executable file path followed by command line parameters.

另请参见:
Association

构造函数摘要
Action(java.lang.String verb, java.lang.String command)
          Constructor of an Action object.
Action(java.lang.String verb, java.lang.String command, java.lang.String desc)
          Constructor of an Action object.
 
方法摘要
 boolean equals(java.lang.Object otherObj)
          Overrides the same method of java.lang.Object.
 java.lang.String getCommand()
          Returns the value of the command field.
 java.lang.String getDescription()
          Returns the value of the description field.
 java.lang.String getVerb()
          Returns the value of the verb field.
 int hashCode()
          Overrides the same method of java.lang.Object.
 void setCommand(java.lang.String command)
          Sets the command field.
 void setDescription(java.lang.String description)
          Sets the description field.
 void setVerb(java.lang.String verb)
          Sets the verb field.
 java.lang.String toString()
          Overrides the same method of java.lang.Object.
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

构造函数详细信息

Action

public Action(java.lang.String verb,
              java.lang.String command)
Constructor of an Action object.

On Microsoft Windows platforms, the verb could be "open", "edit", or any given name; on Gnome/UNIX platforms, it could only be "open", other verbs will be ignored.

参数:
verb - a given verb string.
command - a given command string.

Action

public Action(java.lang.String verb,
              java.lang.String command,
              java.lang.String desc)
Constructor of an Action object.

参数:
verb - a given verb value.
command - a given command value.
desc - a given description value.
方法详细信息

getDescription

public java.lang.String getDescription()
Returns the value of the description field.

返回:
the value of the description field.

setDescription

public void setDescription(java.lang.String description)
Sets the description field.

This field is optional for a valid action, and only used for Microsoft Windows platforms.

参数:
description - a given description value.

getVerb

public java.lang.String getVerb()
Returns the value of the verb field.

返回:
the value of the verb field.

setVerb

public void setVerb(java.lang.String verb)
Sets the verb field.

参数:
verb - a given verb value.

getCommand

public java.lang.String getCommand()
Returns the value of the command field.

返回:
the value of the command field.

setCommand

public void setCommand(java.lang.String command)
Sets the command field.

参数:
command - a given command value.

equals

public boolean equals(java.lang.Object otherObj)
Overrides the same method of java.lang.Object.

Determines whether or not two actions are equal. Two instances of Action are equal if the values of all the fields are the same.

覆盖:
java.lang.Object 中的 equals
参数:
otherObj - an object to be compared with this Action
返回:
true if the object to be compared is an instance of Action and has the same values; false otherwise.

hashCode

public int hashCode()
Overrides the same method of java.lang.Object.

Returns the hashcode for this Action.

覆盖:
java.lang.Object 中的 hashCode
返回:
a hash code for this Action.

toString

public java.lang.String toString()
Overrides the same method of java.lang.Object.

Returns a String that represents the value of this Action.

覆盖:
java.lang.Object 中的 toString
返回:
a string representation of this Action.

JDIC API V2006 Release 0308

For more information and documentation on JDIC, see JDIC website.

That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, working code examples, license terms and bug report information.

Copyright (c) 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.