public class ShareButton extends Button implements ActionListener
STATE_DEFAULT, STATE_PRESSED, STATE_ROLLOVER
BASELINE, BOTTOM, BRB_CENTER_OFFSET, BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT, BRB_OTHER, CENTER, DRAG_REGION_LIKELY_DRAG_X, DRAG_REGION_LIKELY_DRAG_XY, DRAG_REGION_LIKELY_DRAG_Y, DRAG_REGION_NOT_DRAGGABLE, DRAG_REGION_POSSIBLE_DRAG_X, DRAG_REGION_POSSIBLE_DRAG_XY, DRAG_REGION_POSSIBLE_DRAG_Y, LEFT, RIGHT, TOP
Constructor and Description |
---|
ShareButton()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent evt)
invoked when the button is pressed
|
void |
addShareService(ShareService share)
Adds a sharing service.
|
String |
getImagePathToShare()
Gets the image path to share
|
String[] |
getPropertyNames()
A component may expose mutable property names for a UI designer to manipulate, this
API is designed for usage internally by the GUI builder code
|
Class[] |
getPropertyTypes()
Matches the property names method (see that method for further details).
|
Object |
getPropertyValue(String name)
Returns the current value of the property name, this method is used by the GUI builder
|
String |
getTextToShare()
Gets the text to share
|
void |
setImageToShare(String imagePath,
String imageMimeType)
Sets the image to share.
|
String |
setPropertyValue(String name,
Object value)
Sets a new value to the given property, returns an error message if failed
and null if successful.
|
void |
setTextToShare(String textToShare)
Sets the information to share
|
addActionListener, animate, calcPreferredSize, dragInitiated, fireClicked, getActionListeners, getBorder, getCommand, getDisabledIcon, getIconFromState, getListeners, getPressedIcon, getReleaseRadius, getRolloverIcon, getRolloverPressedIcon, getState, isOppositeSide, isSelectableInteraction, isSelected, isToggle, keyPressed, keyReleased, keyRepeated, paint, pointerDragged, pointerHover, pointerHoverReleased, pointerPressed, pointerReleased, pressed, released, released, removeActionListener, resetFocusable, setAlignment, setCommand, setDisabledIcon, setPressedIcon, setReleaseRadius, setRolloverIcon, setRolloverPressedIcon, setToggle
bindProperty, getAlignment, getBaseline, getBaselineResizeBehavior, getBindablePropertyNames, getBindablePropertyTypes, getBoundPropertyValue, getGap, getIcon, getMask, getMaskedIcon, getMaskName, getPropertyTypeNames, getShiftMillimeters, getShiftText, getText, getTextPosition, getVerticalAlignment, isDefaultTickerEnabled, isEndsWith3Points, isShouldLocalize, isTickerEnabled, isTickerRunning, paramString, setBoundPropertyValue, setDefaultTickerEnabled, setEndsWith3Points, setGap, setIcon, setMask, setMaskName, setShiftMillimeters, setShiftText, setShouldLocalize, setText, setTextPosition, setTickerEnabled, setVerticalAlignment, shouldTickerStart, startTicker, startTicker, stopTicker, unbindProperty
addDragOverListener, addDropListener, addFocusListener, addPointerDraggedListener, addPointerPressedListener, addPointerReleasedListener, addPullToRefresh, addScrollListener, calcScrollSize, cancelRepaints, clearClientProperties, contains, deinitialize, deinitializeCustomStyle, dragEnter, dragExit, draggingOver, drawDraggedImage, drop, focusGained, focusLost, getAbsoluteX, getAbsoluteY, getBottomGap, getBounds, getClientProperty, getCloudBoundProperty, getCloudDestinationProperty, getComponentForm, getComponentState, getDirtyRegion, getDisabledStyle, getDraggedx, getDraggedy, getDragImage, getDragRegionStatus, getDragSpeed, getGridPosX, getGridPosY, getHeight, getLabelForComponent, getName, getNextFocusDown, getNextFocusLeft, getNextFocusRight, getNextFocusUp, getParent, getPreferredH, getPreferredSize, getPreferredW, getPressedStyle, getSameHeight, getSameWidth, getScrollable, getScrollAnimationSpeed, getScrollDimension, getScrollOpacity, getScrollOpacityChangeSpeed, getScrollX, getScrollY, getSelectCommandText, getSelectedRect, getSelectedStyle, getSideGap, getStyle, getTensileLength, getUIID, getUIManager, getUnselectedStyle, getVisibleBounds, getWidth, getX, getY, growShrink, handlesInput, hasFocus, initComponent, initCustomStyle, initLaf, installDefaultPainter, isAlwaysTensile, isCellRenderer, isDragActivated, isDragAndDropOperation, isDraggable, isDragRegion, isDropTarget, isEnabled, isFlatten, isFocusable, isGrabsPointerEvents, isHideInPortrait, isInClippingRegion, isInitialized, isRTL, isScrollable, isScrollableX, isScrollableY, isScrollVisible, isSmoothScrolling, isSnapToGrid, isStickyDrag, isTactileTouch, isTactileTouch, isTensileDragEnabled, isVisible, laidOut, longKeyPress, longPointerPress, onScrollX, onScrollY, paintBackground, paintBackgrounds, paintBorder, paintComponent, paintComponent, paintLock, paintLockRelease, paintScrollbars, paintScrollbarX, paintScrollbarY, pinch, pointerDragged, pointerHoverPressed, pointerPressed, pointerReleased, putClientProperty, refreshTheme, refreshTheme, refreshTheme, removeDragOverListener, removeDropListener, removeFocusListener, removePointerDraggedListener, removePointerPressedListener, removePointerReleasedListener, removeScrollListener, repaint, repaint, requestFocus, scrollRectToVisible, scrollRectToVisible, setAlwaysTensile, setCellRenderer, setCloudBoundProperty, setCloudDestinationProperty, setComponentState, setDirtyRegion, setDisabledStyle, setDraggable, setDropTarget, setEnabled, setFlatten, setFocus, setFocusable, setGrabsPointerEvents, setHandlesInput, setHeight, setHideInPortrait, setInitialized, setIsScrollVisible, setLabelForComponent, setName, setNextFocusDown, setNextFocusLeft, setNextFocusRight, setNextFocusUp, setPreferredH, setPreferredSize, setPreferredW, setPressedStyle, setRTL, setSameHeight, setSameWidth, setScrollAnimationSpeed, setScrollOpacityChangeSpeed, setScrollSize, setScrollVisible, setScrollX, setScrollY, setSelectCommandText, setSelectedStyle, setShouldCalcPreferredSize, setSize, setSmoothScrolling, setSnapToGrid, setTactileTouch, setTensileDragEnabled, setTensileLength, setUIID, setUnselectedStyle, setVisible, setWidth, setX, setY, shouldBlockSideSwipe, styleChanged, toString
public void setTextToShare(String textToShare)
textToShare
- public String getTextToShare()
public void setImageToShare(String imagePath, String imageMimeType)
imagePath
- the full file pathimageMimeType
- the image mime type e.g. image/png, image/jpegpublic String getImagePathToShare()
public void addShareService(ShareService share)
share
- ShareServicepublic void actionPerformed(ActionEvent evt)
actionPerformed
in interface ActionListener
evt
- public String[] getPropertyNames()
Component
getPropertyNames
in class Label
public Class[] getPropertyTypes()
Component
getPropertyTypes
in class Label
public Object getPropertyValue(String name)
Component
getPropertyValue
in class Label
name
- the name of the propertypublic String setPropertyValue(String name, Object value)
Component
setPropertyValue
in class Label
name
- the name of the propertyvalue
- new value for the property