BrightSide Workbench Full Report + Source Code
org.turro.elephant.menu.AbstractUserAction Class Reference
Inheritance diagram for org.turro.elephant.menu.AbstractUserAction:
Collaboration diagram for org.turro.elephant.menu.AbstractUserAction:

Public Member Functions

String getId ()
 
String getLabel ()
 
String getImage ()
 
String getLink ()
 
boolean isValid ()
 
boolean isCaption ()
 
boolean isOnlyLabel ()
 
boolean isOnlyImage ()
 
void execute ()
 
boolean addChild (IUserAction action)
 

Protected Attributes

String id
 
IUserCommand command
 
List< IUserActionchildren = new ArrayList<>()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 30 of file AbstractUserAction.java.

Member Function Documentation

◆ addChild()

boolean org.turro.elephant.menu.AbstractUserAction.addChild ( IUserAction  action)

Definition at line 83 of file AbstractUserAction.java.

83  {
84  return children.add(action);
85  }

◆ execute()

void org.turro.elephant.menu.AbstractUserAction.execute ( )

Implements org.turro.elephant.menu.IUserAction.

Definition at line 79 of file AbstractUserAction.java.

79  {
80  if(command != null) command.execute(this);
81  }
void execute(IUserAction action)
Here is the call graph for this function:

◆ getId()

String org.turro.elephant.menu.AbstractUserAction.getId ( )

Implements org.turro.elephant.menu.IUserAction.

Definition at line 37 of file AbstractUserAction.java.

37  {
38  return id;
39  }

◆ getImage()

String org.turro.elephant.menu.AbstractUserAction.getImage ( )

Implements org.turro.elephant.menu.IUserAction.

Definition at line 47 of file AbstractUserAction.java.

47  {
48  return image;
49  }

◆ getLabel()

String org.turro.elephant.menu.AbstractUserAction.getLabel ( )

Implements org.turro.elephant.menu.IUserAction.

Definition at line 42 of file AbstractUserAction.java.

42  {
43  return label;
44  }

◆ getLink()

String org.turro.elephant.menu.AbstractUserAction.getLink ( )

Implements org.turro.elephant.menu.IUserAction.

Definition at line 52 of file AbstractUserAction.java.

52  {
53  return link == null ? UserCommand.createURL(this) : link;
54  }
Here is the call graph for this function:

◆ isCaption()

boolean org.turro.elephant.menu.AbstractUserAction.isCaption ( )

Implements org.turro.elephant.menu.IUserAction.

Definition at line 64 of file AbstractUserAction.java.

64  {
65  return Strings.isBlank(link);
66  }

◆ isOnlyImage()

boolean org.turro.elephant.menu.AbstractUserAction.isOnlyImage ( )

Implements org.turro.elephant.menu.IUserAction.

Definition at line 74 of file AbstractUserAction.java.

74  {
75  return Strings.isBlank(label);
76  }

◆ isOnlyLabel()

boolean org.turro.elephant.menu.AbstractUserAction.isOnlyLabel ( )

Implements org.turro.elephant.menu.IUserAction.

Definition at line 69 of file AbstractUserAction.java.

69  {
70  return Strings.isBlank(image);
71  }

◆ isValid()

boolean org.turro.elephant.menu.AbstractUserAction.isValid ( )

Implements org.turro.elephant.menu.IUserAction.

Definition at line 57 of file AbstractUserAction.java.

57  {
58  return !Strings.isBlank(id) &&
59  (!Strings.isBlank(link) || command != null) &&
60  (!Strings.isBlank(label) || !Strings.isBlank(image));
61  }

Member Data Documentation

◆ children

List<IUserAction> org.turro.elephant.menu.AbstractUserAction.children = new ArrayList<>()
protected

Definition at line 34 of file AbstractUserAction.java.

◆ command

IUserCommand org.turro.elephant.menu.AbstractUserAction.command
protected

Definition at line 33 of file AbstractUserAction.java.

◆ id

String org.turro.elephant.menu.AbstractUserAction.id
protected

Definition at line 32 of file AbstractUserAction.java.


The documentation for this class was generated from the following file: