Class FacebookShare
java.lang.Object
com.codename1.ui.Command
com.codename1.share.ShareService
com.codename1.share.FacebookShare
- All Implemented Interfaces:
ActionListener<ActionEvent>
Facebook sharing service
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is called when the soft button/Menu item is clickedbooleanThe implementing service needs to declare if it is capable to share an imagebooleancompare two commandsgetIcon()Returns the icon representing the commandinthashCode()Allows storing commands in a vector/hashtablevoidThis is the sharing method which should be implemented by the service.voidThis is the image sharing method which should be implemented by the service, if the service returned true on the canShareImage() method Notice not all services are able to share text and image together, in this case the image sharing will be preferred by these servicesMethods inherited from class ShareService
finish, getOriginal, setImage, setMessage, setOriginalFormModifier and TypeMethodDescriptionvoidfinish()Once the share service has finished sharing it should call the finish methodGets the original FormvoidSets the image to share, this is done by the ShareButton and shouldn't be used by the developersvoidsetMessage(String message) Sets the message to share, this is done by the ShareButton and shouldn't be used by the developersvoidsetOriginalForm(Form original) Sets the Original Form (this is the Form of the share button)Methods inherited from class Command
create, createMaterial, getClientProperty, getCommandName, getDisabledIcon, getIconFont, getIconGapMM, getId, getMaterialIcon, getMaterialIconSize, getPressedIcon, getRolloverIcon, isDisposesDialog, isEnabled, putClientProperty, setCommandName, setDisabledIcon, setDisposesDialog, setEnabled, setIcon, setIconFont, setIconGapMM, setMaterialIcon, setMaterialIconSize, setPressedIcon, setRolloverIcon, toStringModifier and TypeMethodDescriptionstatic Commandcreate(String name, Image icon, ActionListener ev) Creates a new command instance that encapsulates the action listener and details, the main value of this approach is in our ability to write commands using the shorthand lambda syntax of Java 8.static CommandcreateMaterial(String name, char icon, ActionListener ev) Creates a new command instance that encapsulates the action listener and details, the main value of this approach is in our ability to write commands using the shorthand lambda syntax of Java 8.getClientProperty(String key) The client properties are a useful way to associate meta-data with a command without subclassinggets the Command NameIndicates the icon that is displayed on the button when the button is in the disabled stateReturns
floatThe gap between the text and the icon in millimeters or -1 for defaultintgetId()Return the command IDcharReturns
floatReturns
Indicates the icon that is displayed on the button when the button is in pressed stateIndicates the icon that is displayed on the button when the button is in rolled over statebooleanIndicates whether this command causes the dialog to dispose implicitly, defaults to truebooleanAllows disabling/enabling the commandvoidputClientProperty(String key, Object value) The client properties are a useful way to associate meta-data with a command without sub classingvoidsetCommandName(String command) sets the Command namevoidsetDisabledIcon(Image disabledIcon) Indicates the icon that is displayed on the button when the button is in the disabled statevoidsetDisposesDialog(boolean disposesDialog) Indicates whether this command causes the dialog to dispose implicitly, defaults to truevoidsetEnabled(boolean enabled) Allows disabling/enabling the commandvoidSets the icon for the commandvoidsetIconFont(Font iconFont) Parameters
voidsetIconGapMM(float iconGapMM) The gap between the text and the icon in millimeters or -1 for defaultvoidsetMaterialIcon(char materialIcon) Parameters
voidsetMaterialIconSize(float materialIconSize) Parameters
voidsetPressedIcon(Image pressedIcon) Indicates the icon that is displayed on the button when the button is in pressed statevoidsetRolloverIcon(Image rolloverIcon) Indicates the icon that is displayed on the button when the button is in rolled over statetoString()Returns a string representation of the objectMethods inherited from class Object
clone, getClass, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()final ClassgetClass()Returns the runtime class of an object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.final voidwait()Causes current thread to wait until another thread invokes the method or the method for this object.final voidwait(long timeout) Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.final voidwait(long timeout, int nanos) Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
-
Constructor Details
-
FacebookShare
public FacebookShare()Default Constructor
-
-
Method Details
-
getIcon
-
equals
-
hashCode
-
actionPerformed
This method is called when the soft button/Menu item is clicked
Parameters
evt: the Event Object
- Specified by:
actionPerformedin interfaceActionListener<ActionEvent>- Overrides:
actionPerformedin classShareService
-