Interface StreamItem
- All Superinterfaces:
StreamKeyListener
- All Known Implementing Classes:
AbstractStreamItem, ExecutableItem, FolderItem, PagedFolderItem, PagedFolderItem.PageItem, ProxyItem, RunnableItem, ToggleItem, URIItem
Interface to bind actions to a key of a stream deck. Can also be used with
the
MIT License Copyright (c) 2017 Roland von Werden Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
StreamDeckController.
MIT License Copyright (c) 2017 Roland von Werden Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Version:
- 1.0.0
- Author:
- Roland von Werden
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intValue to indicate that the text for this item should be displayed at the bottom.static final intValue to indicate that the text for this item should be displayed at the center.static final intValue to indicate that the text for this item should be displayed at the top. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIconUpdateListener(IconUpdateListener listener) Adds anIconUpdateListenerto the item.Returns the animation of the item.intdefault StreamItemgetChild(int i) intdefault intgetChildId(StreamItem item) Returns the Index of the childdefault StreamItem[]Returns an array with the children of this item.intReturns theStreamKeyListeners for dialsgetIcon()Returns the icon to be displayed on the stream deck.Returns the parent of the item.intgetText()Retrns the text on the item.Returns theSDImagefor the touch screenReturns theStreamKeyListeners for the touch screenbooleanReturns if the item has an animation that can be displayedbooleanReturns if the Item has dedicatedStreamKeyListeners for dials on the stream deckbooleanReturns if the Item has dedicatedSDImagefor the touch screen on the stream deckbooleanReturns if the Item has dedicatedStreamKeyListeners for the touch screen on the stream deckdefault booleanisLeaf()Returns whether this item has children --> is a folder, or if it is a simple key.voidremoveIconUpdateListener(IconUpdateListener listener) Removes the given listener.voidsetAnimation(AnimationStack animation) Sets the animation of the itemvoidsetButtonCount(int count) voidSets the icon for the item.voidsetIconPackage(IconPackage iconPackage) Apply the icon and animation of theIconPackageto the itemvoidsetParent(StreamItem parent) voidsetRowCount(int count) voidSets the text to be displayed of the item.voidsetTextPosition(int textPos) Position of the displayed text.Methods inherited from interface StreamKeyListener
onKeyEvent
-
Field Details
-
TEXT_POS_TOP
static final int TEXT_POS_TOPValue to indicate that the text for this item should be displayed at the top.- See Also:
-
TEXT_POS_CENTER
static final int TEXT_POS_CENTERValue to indicate that the text for this item should be displayed at the center.- See Also:
-
TEXT_POS_BOTTOM
static final int TEXT_POS_BOTTOMValue to indicate that the text for this item should be displayed at the bottom.- See Also:
-
-
Method Details
-
getChildren
Returns an array with the children of this item. If the item has a parent, the parent must be the 5th item (getChildren()[4] ) in the array.- Returns:
- Children of this item, or null, if not a folder
-
getChildCount
int getChildCount() -
getChild
-
getChildId
Returns the Index of the child- Parameters:
item- Child to be identified- Returns:
- Index of the child or -1 if its not a child.
-
isLeaf
default boolean isLeaf()Returns whether this item has children --> is a folder, or if it is a simple key.- Returns:
trueif the Streamitem has children,falseif not
-
getParent
StreamItem getParent()Returns the parent of the item.- Returns:
- StreamItem that is the parent of this item,
nullif the StreamItem has nor parent.
-
setParent
-
getIcon
SDImage getIcon()Returns the icon to be displayed on the stream deck.- Returns:
- Returns the icon object of the Item
-
getButtonCount
int getButtonCount() -
setButtonCount
void setButtonCount(int count) -
getRowCount
int getRowCount() -
setRowCount
void setRowCount(int count) -
getColumnCount
int getColumnCount() -
hasAnimation
boolean hasAnimation()Returns if the item has an animation that can be displayed- Returns:
trueif an animation exists,falseif the item has no animation.
-
getAnimation
AnimationStack getAnimation()Returns the animation of the item.- Returns:
- Animation in form of the
AnimationStack,nullif the item has no no animation
-
getText
-
setText
Sets the text to be displayed of the item.- Parameters:
text- Text to be displayed
-
setTextPosition
void setTextPosition(int textPos) Position of the displayed text.- Parameters:
textPos- Position of the text (Top -TEXT_POS_TOP, center-TEXT_POS_CENTER, bottom,TEXT_POS_BOTTOM)
-
setIconPackage
Apply the icon and animation of theIconPackageto the item- Parameters:
iconPackage- IconPackage to be applied
-
setIcon
-
setAnimation
Sets the animation of the item- Parameters:
animation-AnimationStackwith the animation
-
addIconUpdateListener
Adds anIconUpdateListenerto the item.- Parameters:
listener- Listener that listens for changes on the icon
-
removeIconUpdateListener
Removes the given listener. If the listener has not been added before it will do nothing.- Parameters:
listener- Listener to be removed.
-
hasDialListeners
boolean hasDialListeners()Returns if the Item has dedicatedStreamKeyListeners for dials on the stream deck- Returns:
- True if there is at least one Listener for changes in dials
-
getDialListeners
StreamKeyListener[] getDialListeners()Returns theStreamKeyListeners for dials- Returns:
- an Array of
StreamKeyListeners, or an empty arrary or null
-
hasTouchScreenListeners
boolean hasTouchScreenListeners()Returns if the Item has dedicatedStreamKeyListeners for the touch screen on the stream deck- Returns:
- True if there is at least one Listener for changes in dials
-
getTouchScreenListeners
StreamKeyListener[] getTouchScreenListeners()Returns theStreamKeyListeners for the touch screen- Returns:
- an Array of
StreamKeyListeners, or an empty arrary or null
-
hasTouchScreenImage
boolean hasTouchScreenImage()Returns if the Item has dedicatedSDImagefor the touch screen on the stream deck- Returns:
- True if there is an image, false if not
-
getTouchScreenImage
-