Class SesameResultWindow
java.lang.Object
com.badlogic.gdx.scenes.scene2d.Actor
com.badlogic.gdx.scenes.scene2d.Group
com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
com.badlogic.gdx.scenes.scene2d.ui.Table
gaiasky.util.scene2d.OwnWindow
gaiasky.util.scene2d.CollapsibleWindow
gaiasky.gui.window.GenericDialog
gaiasky.gui.window.SesameResultWindow
- All Implemented Interfaces:
com.badlogic.gdx.scenes.scene2d.utils.Cullable, com.badlogic.gdx.scenes.scene2d.utils.Layout, IScreen
Displays the result of a Sesame name resolver query: the resolved name, the object type, the
sky coordinates, and the list of aliases of the object.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.badlogic.gdx.scenes.scene2d.ui.Table
com.badlogic.gdx.scenes.scene2d.ui.Table.Debug, com.badlogic.gdx.scenes.scene2d.ui.Table.DebugRect -
Field Summary
Fields inherited from class GenericDialog
acceptButton, acceptListener, backupGamepadListeners, backupMouseKbdListeners, bottom, buttonGroup, cancelButton, cancelListener, closeListener, content, defaultGamepadListener, defaultMouseKbdListener, enterExit, escExit, gamepadListener, ignoreTouchDown, keysListener, lastPosX, lastPosY, me, modal, mouseKbdListener, scrolls, selectedTab, skin, stage, tabButtons, tabContents, tabStackModifier and TypeFieldDescriptionprotected com.badlogic.gdx.scenes.scene2d.ui.TextButtonprotected Runnableprotected Set<com.badlogic.gdx.controllers.ControllerListener> protected Set<AbstractMouseKbdListener> protected com.badlogic.gdx.scenes.scene2d.ui.Tableprotected com.badlogic.gdx.scenes.scene2d.ui.HorizontalGroupprotected com.badlogic.gdx.scenes.scene2d.ui.TextButtonprotected Runnableprotected Runnableprotected com.badlogic.gdx.scenes.scene2d.ui.Tableprotected booleanprotected booleanprotected booleanprotected booleanprotected AbstractGamepadListenerprotected com.badlogic.gdx.scenes.scene2d.InputListenerprotected booleanprotected floatprotected floatprotected GenericDialogprotected booleanprotected AbstractMouseKbdListenerprotected com.badlogic.gdx.utils.Array<OwnScrollPane> protected intCurrently selected tabprotected final com.badlogic.gdx.scenes.scene2d.ui.Skinprotected final com.badlogic.gdx.scenes.scene2d.Stageprotected com.badlogic.gdx.utils.Array<com.badlogic.gdx.scenes.scene2d.ui.TextButton> If this dialog has tabs, this list holds them.protected com.badlogic.gdx.utils.Array<com.badlogic.gdx.scenes.scene2d.Group> Actual actor for each tab.protected com.badlogic.gdx.scenes.scene2d.ui.StackTab contents stack.Fields inherited from class CollapsibleWindow
collapseSpeedModifier and TypeFieldDescriptionprotected floatCollapse speed in pixels per second.Fields inherited from class com.badlogic.gdx.scenes.scene2d.ui.Table
backgroundBottom, backgroundLeft, backgroundRight, backgroundTop, debugActorColor, debugCellColor, debugTableColorFields inherited from class com.badlogic.gdx.scenes.scene2d.Actor
POOLS -
Constructor Summary
ConstructorsConstructorDescriptionSesameResultWindow(com.badlogic.gdx.scenes.scene2d.Stage stage, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, String query, SesameResolver.Result result) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaccept()The accept function, if any.protected voidbuild()Build the content here.protected voidcancel()The cancel function, if any.voiddispose()voidSets the keyboard focus, override in case you want to set the focus to a specific item.voidsetResult(SesameResolver.Result result, String error) Sets the result of the query, and updates the contents of the window.voidMarks the window as running, i.e.voidtouch()Override this method to update the contents of this dialog before displaying it.Methods inherited from class GenericDialog
acceptButton, act, addSeparator, addSeparator, addTabContent, buildSuper, cancelButton, closeAccept, closeCancel, enableComponents, focusFirstInputWidget, getBottom, getBottomGroup, getButtonsGroup, getContent, getCurrentContentContainer, getStage, getTabButtons, hasAcceptRunnable, hasCancelRunnable, hasCloseRunnable, hide, hide, recalculateButtonSize, setAcceptButtonColor, setAcceptButtonStyle, setAcceptListener, setAcceptText, setCancelButtonColors, setCancelButtonStyle, setCancelListener, setCancelText, setCloseListener, setModal, setUpTabListeners, show, show, show, showDialogHook, tabLeft, tabRightModifier and TypeMethodDescriptioncom.badlogic.gdx.scenes.scene2d.ui.Buttonvoidact(float delta) voidAdds a horizontal separator to the main content table with the default colspan of 1.voidaddSeparator(int colSpan) Adds a horizontal separator to the main content table with the given colspan.protected voidaddTabContent(com.badlogic.gdx.scenes.scene2d.Group tabContent) Add tab contents to the list of tabs.voidcom.badlogic.gdx.scenes.scene2d.ui.ButtonbooleanCloses the window with the accept action.booleanCloses the window with the cancel action.protected voidenableComponents(boolean enabled, com.badlogic.gdx.scenes.scene2d.utils.Disableable... components) Sets the enabled property on the given components.voidcom.badlogic.gdx.scenes.scene2d.ui.Tablecom.badlogic.gdx.scenes.scene2d.Groupcom.badlogic.gdx.scenes.scene2d.Groupcom.badlogic.gdx.scenes.scene2d.ui.Tablecom.badlogic.gdx.scenes.scene2d.Groupcom.badlogic.gdx.scenes.scene2d.StagegetStage()com.badlogic.gdx.utils.Array<com.badlogic.gdx.scenes.scene2d.ui.TextButton> booleanbooleanbooleanvoidhide()Hides the dialog.voidhide(com.badlogic.gdx.scenes.scene2d.Action action) Hides the dialog with the given action and then removes it from the stage.protected voidvoidsetAcceptButtonColor(com.badlogic.gdx.graphics.Color col) voidsetAcceptButtonStyle(String style) voidSets a listener that runs when accept is clicked.voidsetAcceptText(String acceptText) voidsetCancelButtonColors(com.badlogic.gdx.graphics.Color textColor, com.badlogic.gdx.graphics.Color buttonColor) voidsetCancelButtonStyle(String style) voidSets a listener that runs when cancel is clicked.voidsetCancelText(String cancelText) voidSets a listener that runs when the dialog is closed.voidsetModal(boolean modal) protected voidPrepares the tab button listeners that make tab buttons actually change the content.show(com.badlogic.gdx.scenes.scene2d.Stage stage) Packsthe dialog and adds it to the stage, centered with default fadeIn action.show(com.badlogic.gdx.scenes.scene2d.Stage stage, float x, float y) show(com.badlogic.gdx.scenes.scene2d.Stage stage, com.badlogic.gdx.scenes.scene2d.Action action) Packsthe dialog and adds it to the stage with custom action which can be null for instant show.protected voidshowDialogHook(com.badlogic.gdx.scenes.scene2d.Stage stage) booleantabLeft()booleantabRight()Methods inherited from class CollapsibleWindow
collapse, collapseInstant, drawBackground, expand, expandInstant, getHeight, getMaxHeight, getMaxWidth, getPrefHeight, getPrefWidth, getWidth, isCollapsed, isCollapsible, pack, setCollapsible, setResizable, toggleCollapsedModifier and TypeMethodDescriptionvoidcollapse()voidprotected voiddrawBackground(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha, float x, float y) voidexpand()voidfloatfloatfloatfloatfloatfloatgetWidth()booleanbooleanvoidpack()voidsetCollapsible(boolean collapsible) voidsetResizable(boolean w, boolean h) voidMethods inherited from class OwnWindow
draw, drawStageBackground, getStyle, getTitleLabel, getTitleTable, hg, hit, isModal, isResizable, keepWithinStage, setMovable, setResizable, setStyleModifier and TypeMethodDescriptionvoiddraw(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha) protected voiddrawStageBackground(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha, float x, float y, float width, float height) com.badlogic.gdx.scenes.scene2d.ui.Window.WindowStylegetStyle()Returns the window's style.com.badlogic.gdx.scenes.scene2d.ui.Labelcom.badlogic.gdx.scenes.scene2d.ui.Tableprotected com.badlogic.gdx.scenes.scene2d.ui.HorizontalGrouphg(com.badlogic.gdx.scenes.scene2d.Actor... actors) com.badlogic.gdx.scenes.scene2d.Actorhit(float x, float y, boolean touchable) booleanisModal()booleanvoidvoidsetMovable(boolean isMovable) voidsetResizable(boolean isResizable) voidsetStyle(com.badlogic.gdx.scenes.scene2d.ui.Window.WindowStyle style) Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.Table
add, add, add, add, add, add, add, align, background, background, bottom, center, clearChildren, clip, clip, columnDefaults, debug, debug, debugActor, debugAll, debugCell, debugTable, defaults, drawDebug, drawDebugBounds, getAlign, getBackground, getCell, getCells, getClip, getColumnMinWidth, getColumnPrefWidth, getColumns, getColumnWidth, getMinHeight, getMinWidth, getPadBottom, getPadBottomValue, getPadLeft, getPadLeftValue, getPadRight, getPadRightValue, getPadTop, getPadTopValue, getPadX, getPadY, getRow, getRowHeight, getRowMinHeight, getRowPrefHeight, getRows, getSkin, getTableDebug, invalidate, layout, left, pad, pad, pad, pad, padBottom, padBottom, padLeft, padLeft, padRight, padRight, padTop, padTop, removeActor, removeActor, removeActorAt, reset, right, row, setBackground, setBackground, setClip, setDebug, setRound, setSkin, stack, topMethods inherited from class com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
childrenChanged, invalidateHierarchy, needsLayout, setFillParent, setLayoutEnabled, sizeChanged, validateMethods inherited from class com.badlogic.gdx.scenes.scene2d.Group
addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, applyTransform, clear, clear, clearChildren, computeTransform, drawChildren, drawDebugChildren, findActor, getChild, getChildren, getCullingArea, hasChildren, isTransform, localToDescendantCoordinates, resetTransform, resetTransform, setCullingArea, setDebug, setStage, setTransform, swapActor, swapActor, toStringMethods inherited from class com.badlogic.gdx.scenes.scene2d.Actor
addAction, addCaptureListener, addListener, ancestorsVisible, ascendantsVisible, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, fire, firstAscendant, getActions, getCaptureListeners, getColor, getDebug, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getTop, getTouchable, getUserObject, getX, getX, getY, getY, getZIndex, hasActions, hasKeyboardFocus, hasParent, hasScrollFocus, isAscendantOf, isDescendantOf, isTouchable, isTouchFocusListener, isTouchFocusTarget, isVisible, localToActorCoordinates, localToAscendantCoordinates, localToParentCoordinates, localToScreenCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, rotationChanged, scaleBy, scaleBy, scaleChanged, screenToLocalCoordinates, setBounds, setColor, setColor, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setWidth, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront
-
Constructor Details
-
SesameResultWindow
public SesameResultWindow(com.badlogic.gdx.scenes.scene2d.Stage stage, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, String query, SesameResolver.Result result)
-
-
Method Details
-
setRunning
public void setRunning()Marks the window as running, i.e. the query has been launched and no result is available yet. -
setResult
Sets the result of the query, and updates the contents of the window.- Parameters:
result- The result, which may be null if the object was not found.error- The error message, which may be null if the query succeeded.
-
build
protected void build()Description copied from class:GenericDialogBuild the content here.- Specified by:
buildin classGenericDialog
-
touch
public void touch()Description copied from class:GenericDialogOverride this method to update the contents of this dialog before displaying it.- Overrides:
touchin classGenericDialog
-
setKeyboardFocus
public void setKeyboardFocus()Description copied from class:GenericDialogSets the keyboard focus, override in case you want to set the focus to a specific item.- Overrides:
setKeyboardFocusin classGenericDialog
-
accept
protected boolean accept()Description copied from class:GenericDialogThe accept function, if any.- Specified by:
acceptin classGenericDialog- Returns:
- True if the dialog must close after the call, false otherwise.
-
cancel
protected void cancel()Description copied from class:GenericDialogThe cancel function, if any.- Specified by:
cancelin classGenericDialog
-
dispose
public void dispose()- Specified by:
disposein classGenericDialog
-