|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.gadgets.dashboard.internal.impl.GadgetImpl
public final class GadgetImpl
Basic Gadget
implementation.
Constructor Summary | |
---|---|
GadgetImpl(GadgetState state,
GadgetSpec gadgetSpec)
Constructor. |
|
GadgetImpl(GadgetState stateOnLoadAttempt,
String errorMessage)
Constructor used by the dashboard when there is an error loading the gadget. |
Method Summary | |
---|---|
Color |
getColor()
|
String |
getErrorMessage()
Returns an error message if the gadget was constructed with one, which should be the case when isLoaded() returns false |
String |
getGadgetSpecUrl()
|
Integer |
getHeight()
|
GadgetId |
getId()
|
GadgetState |
getState()
|
String |
getTitle()
|
URI |
getTitleUrl()
Returns an optional URL that the gagdget's title will link to |
Iterable<UserPref> |
getUserPrefs()
|
Integer |
getWidth()
|
boolean |
hasNonHiddenUserPrefs()
Returns true if the gadget contains at least one pref that isn't hidden. |
boolean |
isLoaded()
Tells if the gadget has been loaded successfully |
boolean |
isMaximizable()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GadgetImpl(GadgetState state, GadgetSpec gadgetSpec)
state
- the GadgetState
for this instancegadgetSpec
- the Shindig GadgetSpec
to build this instance frompublic GadgetImpl(GadgetState stateOnLoadAttempt, String errorMessage)
stateOnLoadAttempt
- the GadgetState
when the gadget failed to loaderrorMessage
- the error message explaining why the gadget failed to loadMethod Detail |
---|
public GadgetId getId()
getId
in interface Gadget
public String getTitle()
getTitle
in interface Gadget
public URI getTitleUrl()
Gadget
getTitleUrl
in interface Gadget
public String getGadgetSpecUrl()
getGadgetSpecUrl
in interface Gadget
public Integer getHeight()
getHeight
in interface Gadget
public Integer getWidth()
getWidth
in interface Gadget
public Color getColor()
getColor
in interface Gadget
public boolean isMaximizable()
isMaximizable
in interface Gadget
public boolean hasNonHiddenUserPrefs()
Gadget
hasNonHiddenUserPrefs
in interface Gadget
public Iterable<UserPref> getUserPrefs()
getUserPrefs
in interface Gadget
public GadgetState getState()
getState
in interface Gadget
public String getErrorMessage()
Gadget
isLoaded()
returns false
getErrorMessage
in interface Gadget
public boolean isLoaded()
Gadget
isLoaded
in interface Gadget
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |