public class SharableImpl extends java.lang.Object implements Sharable
| Constructor and Description |
|---|
SharableImpl()
Instantiates a new sharable impl.
|
SharableImpl(boolean sharing)
Instantiates a new sharable impl.
|
SharableImpl(java.lang.Object group,
boolean sharing)
Instantiates a new sharable impl.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applySharableProperties()
Apply sharable properties.
|
void |
doShare(java.lang.Object dataId,
java.lang.Object data)
Share the data identified by dataId with both internal and external objects.
|
void |
doShare(java.lang.Object dataId,
java.lang.Object[] data)
Share the data identified by dataId with both internal and external objects.
|
void |
doShareExternal(java.lang.Object dataId,
java.lang.Object data)
Share the data identified by dataId with only external (to the jvm) objects.
|
void |
doShareInternal(java.lang.Object dataId,
java.lang.Object data)
Share the data identified by dataId with only internal (to the jvm) objects.
|
java.lang.Long |
getReceiveShareTime(java.lang.Object dataId)
Get the last time this object rcvd the share
|
javax.swing.JComponent |
getSharablePropertiesComponent()
Gets the sharable properties component.
|
java.lang.Object |
getShareGroup()
Gets the share group.
|
boolean |
getSharing()
Gets the sharing.
|
java.lang.String |
getUniqueId()
Gets the unique id.
|
protected void |
initSharable()
Initialize this sharable.
|
void |
receiveShareData(Sharable from,
java.lang.Object dataId,
java.lang.Object[] data)
Receive share data.
|
void |
removeSharable()
Removes the sharable.
|
void |
setReceiveShareTime(java.lang.Object dataId,
java.lang.Long time)
Record the time when this object rcvd the share
|
void |
setShareGroup(java.lang.Object shareGroup)
Sets the share group.
|
void |
setSharing(boolean sharing)
Sets the sharing.
|
void |
setUniqueId(java.lang.String id)
Sets the unique id.
|
void |
showSharableDialog()
Show sharable dialog.
|
public SharableImpl()
public SharableImpl(boolean sharing)
sharing - the sharingpublic SharableImpl(java.lang.Object group,
boolean sharing)
group - the groupsharing - the sharingpublic void showSharableDialog()
public javax.swing.JComponent getSharablePropertiesComponent()
public void applySharableProperties()
protected void initSharable()
public boolean getSharing()
getSharing in interface Sharablepublic void setSharing(boolean sharing)
sharing - the new sharingpublic java.lang.Object getShareGroup()
getShareGroup in interface Sharablepublic void removeSharable()
public void setShareGroup(java.lang.Object shareGroup)
shareGroup - the new share grouppublic void receiveShareData(Sharable from, java.lang.Object dataId, java.lang.Object[] data)
receiveShareData in interface Sharablefrom - the fromdataId - the data iddata - the datapublic java.lang.Long getReceiveShareTime(java.lang.Object dataId)
getReceiveShareTime in interface SharabledataId - data idpublic void setReceiveShareTime(java.lang.Object dataId,
java.lang.Long time)
setReceiveShareTime in interface SharabledataId - data idtime - timepublic void doShare(java.lang.Object dataId,
java.lang.Object[] data)
dataId - Identifies the attribute that is being shareddata - The array of data that is being sharedpublic void doShare(java.lang.Object dataId,
java.lang.Object data)
dataId - Identifies the attribute that is being shareddata - The data that is being sharedpublic void doShareExternal(java.lang.Object dataId,
java.lang.Object data)
dataId - Identifies the attribute that is being shareddata - The data that is being sharedpublic void doShareInternal(java.lang.Object dataId,
java.lang.Object data)
dataId - the data iddata - the datapublic java.lang.String getUniqueId()
getUniqueId in interface Sharablepublic void setUniqueId(java.lang.String id)
id - the new unique id