idx int64 0 41.2k | question stringlengths 83 4.15k | target stringlengths 5 715 |
|---|---|---|
900 | protected void registerDraggableAttributes ( ) { addAttributeProcessor ( new BlockInputLmlAttribute ( ) , "blockInput" ) ; addAttributeProcessor ( new DeadzoneRadiusLmlAttribute ( ) , "deadzone" , "deadzoneRadius" ) ; addAttributeProcessor ( new DraggedAlphaLmlAttribute ( ) , "alpha" ) ; addAttributeProcessor ( new Dra... | Draggable listener attributes . |
901 | protected void registerGridGroupAttributes ( ) { addAttributeProcessor ( new GridSpacingLmlAttribute ( ) , "spacing" ) ; addAttributeProcessor ( new ItemHeightLmlAttribute ( ) , "itemHeight" ) ; addAttributeProcessor ( new ItemSizeLmlAttribute ( ) , "itemSize" ) ; addAttributeProcessor ( new ItemWidthLmlAttribute ( ) ,... | GridGroup attributes . |
902 | protected void registerSpinnerAttributes ( ) { addAttributeProcessor ( new SpinnerArrayLmlAttribute ( ) , "items" ) ; addAttributeProcessor ( new SpinnerDisabledLmlAttribute ( ) , "disabled" , "inputDisabled" ) ; addAttributeProcessor ( new SpinnerNameLmlAttribute ( ) , "selectorName" , "text" ) ; addAttributeProcessor... | Spinner attributes . |
903 | protected void registerValidatorAttributes ( ) { addAttributeProcessor ( new CustomValidatorLmlAttribute ( ) , "validator" , "validate" , "method" , "action" , "check" ) ; addAttributeProcessor ( new ErrorMessageLmlAttribute ( ) , "error" , "errorMsg" , "errorMessage" , "formError" ) ; addAttributeProcessor ( new HideO... | InputValidator implementations attributes . |
904 | @ Initiate ( priority = AutumnActionPriority . TOP_PRIORITY ) public void initiateSkin ( final SkinService skinService ) { VisUI . load ( VisUI . SkinScale . X2 ) ; skinService . addSkin ( "default" , VisUI . getSkin ( ) ) ; InterfaceService . DEFAULT_VIEW_RESIZER = new StandardViewResizer ( ) ; } | This action will be invoked when the application is being initialized . Actions are sorted by their priority and invoked in descending order ; by manipulating the priority values you can fully control the flow of your application s initiation . |
905 | public static String [ ] split ( final CharSequence charSequence , final char separator ) { if ( isEmpty ( charSequence ) ) { return EMPTY_ARRAY ; } final int originalSeparatorsCount = countSeparatedCharAppearances ( charSequence , separator ) ; int separatorsCount = originalSeparatorsCount ; if ( startsWith ( charSequ... | As opposed to string s split this method allows to split a char sequence without a regex provided that the separator is a single character . Since it does not require pattern compiling and is a simple iteration this method should be always preferred when it can be used . |
906 | public static < Key , Value > Value putIfAbsent ( final ObjectMap < Key , Value > map , final Key key , final Value value ) { if ( ! map . containsKey ( key ) ) { map . put ( key , value ) ; return value ; } return map . get ( key ) ; } | Puts a value with the given key in the passed map provided that the passed key isn t already present in the map . |
907 | protected String extractPackageName ( final Class < ? > root ) { return root . getName ( ) . substring ( 0 , root . getName ( ) . length ( ) - root . getSimpleName ( ) . length ( ) - 1 ) ; } | GWT - friendly method that extracts name of the package from class . |
908 | protected String getPackageName ( final Class < ? > root ) { return root . getName ( ) . substring ( 0 , root . getName ( ) . length ( ) - root . getSimpleName ( ) . length ( ) - 1 ) ; } | GWT - friendly way of extracting package name . |
909 | void ensureCapacity ( final int bytesAmount ) { if ( currentByteArrayIndex + bytesAmount >= serializedData . length ) { int newSerializedDataArrayLength = ( serializedData . length + 1 ) * 2 ; while ( currentByteArrayIndex + bytesAmount >= newSerializedDataArrayLength ) { newSerializedDataArrayLength = newSerializedDat... | Resizes original byte array if the object turns out to be bigger than expected . |
910 | public byte [ ] serialize ( ) { if ( currentByteArrayIndex == 0 ) { return new byte [ 0 ] ; } final byte [ ] extractedSerializedData = new byte [ currentByteArrayIndex ] ; System . arraycopy ( serializedData , 0 , extractedSerializedData , 0 , currentByteArrayIndex ) ; return extractedSerializedData ; } | Finishes serialization returning the object as a byte array . |
911 | public static < Type > void processAttributes ( final Type widget , final LmlTag tag , final LmlParser parser , final ObjectSet < String > processedAttributes , final boolean throwExceptionIfAttributeUnknown ) { if ( GdxMaps . isEmpty ( tag . getNamedAttributes ( ) ) ) { return ; } final LmlSyntax syntax = parser . get... | Utility method that processes all named attributes of the selected type . |
912 | public void validateRange ( final LmlParser parser ) { if ( min >= max || stepSize > max - min || value < min || value > max || stepSize <= 0f ) { parser . throwError ( "Range widget not properly constructed. Min value has to be lower than max and step size cannot be higher than the difference between min and max value... | MUST be called before using range s numeric values . |
913 | public void addViewActionContainer ( final String actionContainerId , final ActionContainer actionContainer ) { parser . getData ( ) . addActionContainer ( actionContainerId , actionContainer ) ; } | Registers an action container globally for all views . |
914 | public void addViewAction ( final String actionId , final ActorConsumer < ? , ? > action ) { parser . getData ( ) . addActorConsumer ( actionId , action ) ; } | Registers an action globally for all views . |
915 | public void registerController ( final Class < ? > mappedControllerClass , final ViewController controller ) { controllers . put ( mappedControllerClass , controller ) ; if ( Strings . isNotEmpty ( controller . getViewId ( ) ) ) { parser . getData ( ) . addActorConsumer ( SCREEN_TRANSITION_ACTION_PREFIX + controller . ... | Allows to manually register a managed controller . For internal use mostly . |
916 | public void showDialog ( final Class < ? > dialogControllerClass ) { if ( currentController != null ) { dialogControllers . get ( dialogControllerClass ) . show ( currentController . getStage ( ) ) ; } } | Allows to show a globally registered dialog . |
917 | public void initiateAllControllers ( ) { for ( final ViewController controller : controllers . values ( ) ) { initiateView ( controller ) ; } for ( final ViewDialogController controller : dialogControllers . values ( ) ) { if ( controller instanceof AnnotatedViewDialogController ) { final AnnotatedViewDialogController ... | Forces eager initiation of all views managed by registered controllers . Initiates dialogs that cache and reuse their dialog actor instance . |
918 | public void reload ( ) { currentController . hide ( Actions . sequence ( hidingActionProvider . provideAction ( currentController , currentController ) , Actions . run ( CommonActionRunnables . getActionPosterRunnable ( getViewReloadingRunnable ( ) ) ) ) ) ; } | Hides current view destroys all screens and shows the recreated current view . Note that it won t recreate all views that were previously initiated as views are constructed on demand . |
919 | public void resize ( final int width , final int height ) { if ( currentController != null ) { currentController . resize ( width , height ) ; } messageDispatcher . postMessage ( AutumnMessage . GAME_RESIZED ) ; } | Resizes the current view if present . |
920 | public Value get ( final Key key , final Value defaultValue ) { return super . get ( key , defaultValue ) ; } | LazyObjectMap initiates values on access . No need for default values as nulls are impossible as long as the provided is correctly implemented and nulls are not put into the map . |
921 | public void setMusicVolumeFromPreferences ( final String preferences , final String preferenceName , final float defaultValue ) { musicPreferences = preferences ; musicVolumePreferenceName = preferenceName ; setMusicVolume ( readFromPreferences ( preferences , preferenceName , defaultValue ) ) ; } | Sets the current music volume according to the values stored in preferences . Mostly for internal use . |
922 | public void setMusicEnabledFromPreferences ( final String preferences , final String preferenceName , final boolean defaultValue ) { musicPreferences = preferences ; musicEnabledPreferenceName = preferenceName ; setMusicEnabled ( readFromPreferences ( preferences , preferenceName , defaultValue ) ) ; } | Sets the current music state according to the value stored in preferences . Mostly for internal use . |
923 | public void setSoundEnabledFromPreferences ( final String preferences , final String preferenceName , final boolean defaultValue ) { musicPreferences = preferences ; soundEnabledPreferenceName = preferenceName ; setSoundEnabled ( readFromPreferences ( preferences , preferenceName , defaultValue ) ) ; } | Sets the current sound state according to the value stored in preferences . Mostly for internal use . |
924 | public void setSoundVolumeFromPreferences ( final String preferences , final String preferenceName , final float defaultValue ) { musicPreferences = preferences ; soundVolumePreferenceName = preferenceName ; setSoundVolume ( readFromPreferences ( preferences , preferenceName , defaultValue ) ) ; } | Sets the current sound volume according to the values stored in preferences . Mostly for internal use . |
925 | public void saveMusicPreferences ( final boolean flush ) { if ( Strings . isNotEmpty ( musicPreferences ) ) { if ( Strings . isNotEmpty ( musicVolumePreferenceName ) ) { saveInPreferences ( musicPreferences , musicVolumePreferenceName , musicVolume ) ; } if ( Strings . isNotEmpty ( musicEnabledPreferenceName ) ) { save... | Saves music volume and state in preferences . |
926 | public void saveSoundPreferences ( final boolean flush ) { if ( Strings . isNotEmpty ( musicPreferences ) ) { if ( Strings . isNotEmpty ( soundVolumePreferenceName ) ) { saveInPreferences ( musicPreferences , soundVolumePreferenceName , soundVolume ) ; } if ( Strings . isNotEmpty ( soundEnabledPreferenceName ) ) { save... | Saves sound volume and state in preferences . |
927 | private Set < JType > findReflectedClasses ( final GeneratorContext context , final TypeOracle typeOracle , final TreeLogger logger ) throws UnableToCompleteException { final Set < JType > types = new HashSet < JType > ( ) ; final JPackage [ ] packages = typeOracle . getPackages ( ) ; for ( final JPackage jPackage : pa... | LibGDX code goes here . Slightly modified refactored and without unnecessary operations . |
928 | protected Array < Actor > parse ( ) { actors = GdxArrays . newArray ( Actor . class ) ; invokePreListeners ( actors ) ; final StringBuilder builder = new StringBuilder ( ) ; while ( templateReader . hasNextCharacter ( ) ) { final char character = templateReader . nextCharacter ( ) ; if ( character == syntax . getArgume... | Does the actual parsing |
929 | private void processArgument ( ) { final StringBuilder argumentBuilder = new StringBuilder ( ) ; while ( templateReader . hasNextCharacter ( ) ) { final char argumentCharacter = templateReader . nextCharacter ( ) ; if ( argumentCharacter == syntax . getArgumentClosing ( ) ) { final String argument = argumentBuilder . t... | Found an argument opening sign . Have to find argument s name and replace it in the template . |
930 | private void processComment ( ) { templateReader . nextCharacter ( ) ; if ( templateReader . startsWith ( syntax . getDocumentTypeOpening ( ) ) ) { processSchemaComment ( ) ; return ; } else if ( nestedComments ) { processNestedComment ( ) ; return ; } while ( templateReader . hasNextCharacter ( ) ) { final char commen... | Found an open tag starting with comment sign . Burning through characters up to the comment s end . |
931 | private void processSchemaComment ( ) { burnCharacters ( syntax . getDocumentTypeOpening ( ) . length ( ) ) ; int tagsOpened = 1 ; while ( templateReader . hasNextCharacter ( ) ) { final char character = templateReader . nextCharacter ( ) ; if ( character == syntax . getTagOpening ( ) ) { tagsOpened ++ ; } else if ( ch... | Found a comment starting with DOCTYPE . Burning through the characters . |
932 | private void processNestedComment ( ) { int nestedCommentsAmount = 1 ; while ( templateReader . hasNextCharacter ( ) ) { final char commentCharacter = templateReader . nextCharacter ( ) ; if ( isCommentClosingMarker ( commentCharacter ) && templateReader . hasNextCharacter ( ) && templateReader . peekCharacter ( ) == s... | Found an open tag starting with comment sign and nested comments are on . Burning through characters up to the comment s end honoring nested commented - out comments . |
933 | private void processTag ( final StringBuilder builder ) { boolean started = false ; while ( templateReader . hasNextCharacter ( ) ) { final char tagCharacter = templateReader . nextCharacter ( ) ; if ( ! started && Strings . isWhitespace ( tagCharacter ) ) { continue ; } started = true ; if ( tagCharacter == syntax . g... | Found an open tag that is not a comment . Collecting whole tag data . |
934 | protected void processForActor ( final LmlParser parser , final LmlTag tag , final Actor actor , final String rawAttributeData ) { parser . throwErrorIfStrict ( "\"" + tag . getTagName ( ) + "\" tag has a table cell attribute, but is not directly in a table. Cannot set table cell attribute value with raw data: " + rawA... | This method is called if the actor is not in a cell . It should set the property in the actor itself provided that its correct and can be applied . By default throws an exception if the parser is strict . |
935 | public boolean onEvent ( final LmlParser parser , final Array < Actor > parsingResult ) { final ObjectMap < String , Actor > actorsByIds = parser . getActorsMappedByIds ( ) ; for ( final String id : ids ) { final Actor actor = actorsByIds . get ( id ) ; if ( actor != null ) { attachListener ( actor ) ; } else if ( ! ke... | Invoked after template parsing . Hooks up the listener to actors registered by attachTo attribute . |
936 | protected void postCloseEvent ( final WebSocketCloseCode closeCode , final String reason ) { for ( final WebSocketListener listener : listeners ) { if ( listener . onClose ( this , closeCode , reason ) ) { break ; } } } | Listeners will be notified about socket closing . |
937 | public void resize ( final int width , final int height , final boolean centerCamera ) { stage . getViewport ( ) . update ( width , height , centerCamera ) ; } | Updates stage s viewport . |
938 | public void fill ( final LmlParser parser ) { this . parser = parser ; for ( final Entry < String , I18NBundle > bundle : bundles ) { parser . getData ( ) . addI18nBundle ( bundle . key , bundle . value ) ; if ( defaultBundle . equals ( bundle . key ) ) { parser . getData ( ) . setDefaultI18nBundle ( bundle . value ) ;... | Should be called after bundles are loaded . |
939 | protected void parseNames ( ) { while ( reader . hasNextCharacter ( ) ) { final char character = next ( ) ; if ( Strings . isWhitespace ( character ) ) { addName ( ) ; continue ; } else if ( character == blockOpening ) { addName ( ) ; break ; } else { builder . append ( character ) ; } } if ( GdxArrays . isEmpty ( tags... | Parses names proceeding styles block . |
940 | protected void addName ( ) { if ( Strings . isNotEmpty ( builder ) ) { int endOffset = 0 ; if ( Strings . endsWith ( builder , tagSeparator ) ) { endOffset = 1 ; } if ( Strings . startsWith ( builder , inheritanceMarker ) ) { inherits . add ( builder . substring ( 1 , builder . length ( ) - endOffset ) ) ; } else { tag... | Appends tag or inheritance name from the current builder data . |
941 | protected void parseAttributes ( ) { burnWhitespaces ( ) ; attribute = null ; while ( reader . hasNextCharacter ( ) ) { char character = reader . peekCharacter ( ) ; if ( Strings . isNewLine ( character ) && ( attribute != null || Strings . isNotEmpty ( builder ) ) ) { throwException ( "Expecting line end marker: '" + ... | Parses attributes block . |
942 | protected void addAttributeName ( ) { if ( Strings . isNotEmpty ( builder ) ) { attribute = builder . toString ( ) ; Strings . clearBuilder ( builder ) ; } } | Caches currently parsed attribute name . |
943 | protected void addAttribute ( ) { attributes . put ( attribute , builder . toString ( ) . trim ( ) ) ; attribute = null ; Strings . clearBuilder ( builder ) ; } | Clears attribute cache adds default attribute value . |
944 | protected void processAttributes ( ) { for ( final String tag : tags ) { for ( final String inherit : inherits ) { styleSheet . addStyles ( tag , styleSheet . getStyles ( inherit ) ) ; } styleSheet . addStyles ( tag , attributes ) ; } } | Adds the stored attribute values to the style sheet . Resolves inherited styles . |
945 | protected void burnWhitespaces ( ) { while ( reader . hasNextCharacter ( ) ) { final char character = reader . peekCharacter ( ) ; if ( Strings . isWhitespace ( character ) || character == commentMarker && reader . hasNextCharacter ( 1 ) && reader . peekCharacter ( 1 ) == commentSecondary ) { next ( ) ; } else { return... | Analyzes characters raising the index . Stops after encountering first non - whitespace character . |
946 | public void reset ( ) { attribute = null ; tags . clear ( ) ; inherits . clear ( ) ; attributes . clear ( ) ; Strings . clearBuilder ( builder ) ; } | Clears control variables . |
947 | public static void addActors ( final Stage stage , final Iterable < Actor > actors ) { if ( actors != null ) { for ( final Actor actor : actors ) { stage . addActor ( actor ) ; } } } | Null - safe utility for adding multiple actors to the stage . |
948 | public static void centerActor ( final Actor actor , final Stage stage ) { if ( actor != null && stage != null ) { actor . setPosition ( ( int ) ( stage . getWidth ( ) / 2f - actor . getWidth ( ) / 2f ) , ( int ) ( stage . getHeight ( ) / 2f - actor . getHeight ( ) / 2f ) ) ; } } | Null - safe position update . |
949 | public static void setKeyboardFocus ( final Actor actor ) { if ( actor != null && actor . getStage ( ) != null ) { actor . getStage ( ) . setKeyboardFocus ( actor ) ; } } | Null - safe method for setting keyboard focus . |
950 | protected void appendSequence ( final CharSequence sequence , final String name ) { if ( Strings . isNotEmpty ( sequence ) ) { queueCurrentSequence ( ) ; setCurrentSequence ( new CharSequenceEntry ( sequence , name ) ) ; } } | Actual appending method referenced by all others . |
951 | @ Initiate ( priority = AutumnActionPriority . HIGH_PRIORITY ) private void parseMacros ( ) { if ( GdxArrays . isEmpty ( macros ) ) { return ; } final LmlParser parser = interfaceService . get ( ) . getParser ( ) ; for ( final FileHandle macro : macros ) { parser . parseTemplate ( macro ) ; } } | Parses all collected macros one by one . |
952 | protected void fadeOutCurrentTheme ( ) { if ( currentTheme != null && currentTheme . isPlaying ( ) ) { currentTheme . setOnCompletionListener ( null ) ; stage . addAction ( Actions . sequence ( VolumeAction . setVolume ( currentTheme , currentTheme . getVolume ( ) , 0f , duration , Interpolation . fade ) , MusicStopAct... | Smoothly fades out current theme . |
953 | protected void fadeInCurrentTheme ( ) { if ( currentTheme != null ) { currentTheme . setLooping ( false ) ; currentTheme . setVolume ( 0f ) ; currentTheme . setOnCompletionListener ( listener ) ; stage . addAction ( VolumeAction . setVolume ( currentTheme , 0f , musicVolume . getPercent ( ) , duration , Interpolation .... | Smoothly fades in current theme . |
954 | protected void changeTheme ( ) { currentTheme = getNextTheme ( currentTheme ) ; if ( currentTheme != null ) { currentTheme . setLooping ( false ) ; currentTheme . setOnCompletionListener ( listener ) ; currentTheme . setVolume ( musicVolume . getPercent ( ) ) ; currentTheme . play ( ) ; } } | Forces a change of current theme . Assumes a theme was already played - there are no smooth fade ins of any kind . |
955 | public static void clearScreen ( final float r , final float g , final float b ) { Gdx . gl . glClearColor ( r , g , b , 1f ) ; Gdx . gl . glClear ( GL20 . GL_COLOR_BUFFER_BIT ) ; } | Clears the screen with the selected color . |
956 | public Object invoke ( ) { try { return Reflection . invokeMethod ( method , methodOwner , parameters ) ; } catch ( final Exception exception ) { throw new GdxRuntimeException ( "Unable to invoke method: " + method . getName ( ) + " of type: " + methodOwner + " with parameters: " + GdxArrays . newArray ( parameters ) ,... | Invokes the stored method with the chosen arguments . |
957 | public void updateScale ( ) { scaleX = targetPpiX / Gdx . graphics . getPpiX ( ) ; scaleY = targetPpiY / Gdx . graphics . getPpiY ( ) ; } | Forces update of current pixel per unit ratio according to screen density . |
958 | private void updateWorldSize ( final int screenWidth , final int screenHeight ) { final float width = screenWidth * scaleX ; final float height = screenHeight * scaleY ; final float fitHeight = width / aspectRatio ; if ( fitHeight > height ) { setWorldSize ( height * aspectRatio , height ) ; } else { setWorldSize ( wid... | Forces update of current world size according to window size . Will try to keep the set aspect ratio . |
959 | public void setLocale ( final Locale locale ) { if ( ! localePreference . isCurrent ( locale ) ) { setView ( getCurrentView ( ) , new Action ( ) { private boolean reloaded = false ; public boolean act ( final float delta ) { if ( ! reloaded ) { reloaded = true ; localePreference . setLocale ( locale ) ; localePreferenc... | Also available as setLocale action in LML views . Will extract locale from actor s ID . |
960 | protected void addDefaultComponents ( ) { final boolean mapSuper = context . isMapSuperTypes ( ) ; context . setMapSuperTypes ( false ) ; final AssetManagerProvider assetManagerProvider = new AssetManagerProvider ( ) ; context . addProvider ( assetManagerProvider ) ; context . addDestructible ( assetManagerProvider ) ;... | Registers multiple providers and singletons that produce LibGDX - related object instances . |
961 | public void clear ( ) { Node < T > node = head . next , next ; size = 0 ; head . reset ( ) ; tail = head ; iterator . currentNode = head ; while ( node != null ) { next = node . next ; node . free ( pool ) ; node = next ; } } | Removes all elements of the list . Frees all nodes to the pool . |
962 | private void destroyInitializer ( ) { GdxMaps . clearAll ( fieldProcessors , methodProcessors , typeProcessors ) ; GdxArrays . clearAll ( scannedMetaAnnotations , scannedAnnotations , processors , delayedConstructions , manuallyAddedComponents , manuallyAddedProcessors ) ; } | Clears meta - data collections . |
963 | @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) private void processType ( final Object component , final Context context , final ContextDestroyer contextDestroyer ) { final com . badlogic . gdx . utils . reflect . Annotation [ ] annotations = getAnnotations ( component . getClass ( ) ) ; if ( annotations == null |... | Processes components class annotations . |
964 | private void processMethods ( final Object component , final Context context , final ContextDestroyer contextDestroyer ) { Class < ? > componentClass = component . getClass ( ) ; while ( componentClass != null && ! componentClass . equals ( Object . class ) ) { final Method [ ] methods = ClassReflection . getDeclaredMe... | Scans class tree of component to process all its methods . |
965 | @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) private void processMethods ( final Object component , final Method [ ] methods , final Context context , final ContextDestroyer contextDestroyer ) { for ( final Method method : methods ) { final com . badlogic . gdx . utils . reflect . Annotation [ ] annotations = ge... | Does the actual processing of found methods . |
966 | private void processFields ( final Object component , final Context context , final ContextDestroyer contextDestroyer ) { Class < ? > componentClass = component . getClass ( ) ; while ( componentClass != null && ! componentClass . equals ( Object . class ) ) { final Field [ ] fields = ClassReflection . getDeclaredField... | Scans class tree of component to process all its fields . |
967 | @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) private void processFields ( final Object component , final Field [ ] fields , final Context context , final ContextDestroyer contextDestroyer ) { for ( final Field field : fields ) { final com . badlogic . gdx . utils . reflect . Annotation [ ] annotations = getAnnot... | Does the actual processing of found fields . |
968 | protected void dispose ( ) { final WebSocket currentWebSocket = webSocket ; if ( currentWebSocket != null && currentWebSocket . isOpen ( ) ) { try { currentWebSocket . disconnect ( WebSocketCloseCode . AWAY . getCode ( ) ) ; } catch ( final Exception exception ) { postErrorEvent ( exception ) ; } } } | Removes current web socket instance . |
969 | protected void registerActorTags ( ) { addTagProvider ( new ActorLmlTagProvider ( ) , "actor" , "group" ) ; addTagProvider ( new ActorStorageLmlTagProvider ( ) , "actorStorage" , "isolate" ) ; addTagProvider ( new AnimatedImageLmlTagProvider ( ) , "animatedImage" ) ; addTagProvider ( new ButtonGroupLmlTagProvider ( ) ,... | Registers actor - based tags that create widgets . |
970 | protected void registerMacroTags ( ) { addMacroTagProvider ( new ActorLmlMacroTagProvider ( ) , "actor" ) ; addMacroTagProvider ( new AnyNotNullLmlMacroTagProvider ( ) , "anyNotNull" , "any" ) ; addMacroTagProvider ( new ArgumentLmlMacroTagProvider ( ) , "nls" , "argument" , "preference" ) ; addMacroTagProvider ( new A... | Registers macro tags that manipulate templates structures . |
971 | protected void registerBuildingAttributes ( ) { addBuildingAttributeProcessor ( new SkinLmlAttribute ( ) , "skin" ) ; addBuildingAttributeProcessor ( new StyleLmlAttribute ( ) , "style" , "class" ) ; addBuildingAttributeProcessor ( new OnResultInitialLmlAttribute ( ) , "result" , "onResult" ) ; addBuildingAttributeProc... | Attributes used during widget creation . |
972 | protected void registerCommonAttributes ( ) { addAttributeProcessor ( new ActionLmlAttribute ( ) , "action" , "onShow" ) ; addAttributeProcessor ( new ColorAlphaLmlAttribute ( ) , "alpha" , "a" ) ; addAttributeProcessor ( new ColorBlueLmlAttribute ( ) , "blue" , "b" ) ; addAttributeProcessor ( new ColorGreenLmlAttribut... | Attributes applied to all actors . |
973 | protected void registerListenerAttributes ( ) { addAttributeProcessor ( new ConditionLmlAttribute ( ) , "if" ) ; addAttributeProcessor ( new KeepListenerLmlAttribute ( ) , "keep" ) ; addAttributeProcessor ( new ListenerIdsLmlAttribute ( ) , "ids" ) ; addAttributeProcessor ( new CombinedKeysLmlAttribute ( ) , "combined"... | Listener tags attributes . |
974 | protected void registerAnimatedImageAttributes ( ) { addAttributeProcessor ( new AnimationDelayLmlAttribute ( ) , "delay" ) ; addAttributeProcessor ( new AnimationMaxDelayLmlAttribute ( ) , "maxDelay" ) ; addAttributeProcessor ( new BackwardsLmlAttribute ( ) , "backwards" ) ; addAttributeProcessor ( new BouncingLmlAttr... | AnimatedImage widget attributes . |
975 | protected void registerContainerAttributes ( ) { addAttributeProcessor ( new ContainerAdjustPaddingLmlAttribute ( ) , "adjustPadding" ) ; addAttributeProcessor ( new ContainerAlignLmlAttribute ( ) , "align" ) ; addAttributeProcessor ( new ContainerBackgroundLmlAttribute ( ) , "bg" , "background" ) ; addAttributeProcess... | Container widget attributes . |
976 | protected void registerHorizontalGroupAttributes ( ) { addAttributeProcessor ( new HorizontalGroupAlignmentLmlAttribute ( ) , "groupAlign" ) ; addAttributeProcessor ( new HorizontalGroupFillLmlAttribute ( ) , "groupFill" ) ; addAttributeProcessor ( new HorizontalGroupPaddingBottomLmlAttribute ( ) , "groupPadBottom" ) ;... | HorizontalGroup widget attributes . |
977 | protected void registerLabelAttributes ( ) { addAttributeProcessor ( new EllipsisLmlAttribute ( ) , "ellipsis" ) ; addAttributeProcessor ( new LabelAlignmentLmlAttribute ( ) , "labelAlign" , "labelAlignment" ) ; addAttributeProcessor ( new LineAlignmentLmlAttribute ( ) , "lineAlign" , "lineAlignment" ) ; addAttributePr... | Label widget attributes . |
978 | protected void registerListAttributes ( ) { addAttributeProcessor ( new MultipleLmlAttribute ( ) , "multiple" ) ; addAttributeProcessor ( new RangeSelectLmlAttribute ( ) , "rangeSelect" ) ; addAttributeProcessor ( new RequiredLmlAttribute ( ) , "required" ) ; addAttributeProcessor ( new SelectedLmlAttribute ( ) , "sele... | List widget attributes . |
979 | protected void registerScrollBarAttributes ( ) { addAttributeProcessor ( new ScrollBarsOnTopLmlAttribute ( ) , "barsOnTop" , "scrollbarsOnTop" ) ; addAttributeProcessor ( new ScrollBarsPositionsLmlAttribute ( ) , "barsPositions" , "scrollBarsPositions" ) ; addAttributeProcessor ( new ScrollCancelTouchFocusLmlAttribute ... | ScrollBar widget attributes . |
980 | protected void registerTableAttributes ( ) { addAttributeProcessor ( new OneColumnLmlAttribute ( ) , "oneColumn" ) ; addAttributeProcessor ( new TableAlignLmlAttribute ( ) , "tableAlign" ) ; addAttributeProcessor ( new TableBackgroundLmlAttribute ( ) , "bg" , "background" ) ; addAttributeProcessor ( new TablePadBottomL... | Table widget attributes . |
981 | protected void registerCellAttributes ( ) { addCellAttributeProcessor ( new CellAlignLmlAttribute ( ) , "align" ) ; addCellAttributeProcessor ( new CellColspanLmlAttribute ( ) , "colspan" ) ; addCellAttributeProcessor ( new CellExpandLmlAttribute ( ) , "expand" ) ; addCellAttributeProcessor ( new CellExpandXLmlAttribut... | Attributes available to children tags of a Table parent . |
982 | protected void registerTextFieldAttributes ( ) { addAttributeProcessor ( new BlinkTimeLmlAttribute ( ) , "blink" , "blinkTime" ) ; addAttributeProcessor ( new CursorLmlAttribute ( ) , "cursor" , "cursorPosition" ) ; addAttributeProcessor ( new DigitsOnlyLmlAttribute ( ) , "digitsOnly" , "numeric" ) ; addAttributeProces... | TextField widget attributes . |
983 | protected void registerVerticalGroupAttributes ( ) { addAttributeProcessor ( new VerticalGroupAlignmentLmlAttribute ( ) , "groupAlign" ) ; addAttributeProcessor ( new VerticalGroupFillLmlAttribute ( ) , "groupFill" ) ; addAttributeProcessor ( new VerticalGroupPaddingBottomLmlAttribute ( ) , "groupPadBottom" ) ; addAttr... | VerticalGroup widget attributes . |
984 | protected void registerWindowAttributes ( ) { addAttributeProcessor ( new KeepWithinStageLmlAttribute ( ) , "keepWithinStage" , "keepWithin" ) ; addAttributeProcessor ( new ModalLmlAttribute ( ) , "modal" ) ; addAttributeProcessor ( new MovableLmlAttribute ( ) , "movable" ) ; addAttributeProcessor ( new ResizeableLmlAt... | Window widget attributes . |
985 | public static < Type extends Annotation > Type getAnnotation ( final Field field , final Class < Type > annotationType ) { if ( isAnnotationPresent ( field , annotationType ) ) { return field . getDeclaredAnnotation ( annotationType ) . getAnnotation ( annotationType ) ; } return null ; } | Utility method that allows to extract actual annotation from field bypassing LibGDX annotation wrapper . Returns null if annotation is not present . |
986 | public static < Type extends Annotation > Type getAnnotation ( final Class < ? > fromClass , final Class < Type > annotationType ) { if ( ClassReflection . isAnnotationPresent ( fromClass , annotationType ) ) { return ClassReflection . getDeclaredAnnotation ( fromClass , annotationType ) . getAnnotation ( annotationTyp... | Utility method that allows to extract actual annotation from class bypassing LibGDX annotation wrapper . Returns null if annotation is not present . |
987 | public static < Type extends Annotation > Type getAnnotation ( final Method method , final Class < Type > annotationType ) { if ( isAnnotationPresent ( method , annotationType ) ) { return method . getDeclaredAnnotation ( annotationType ) . getAnnotation ( annotationType ) ; } return null ; } | Utility method that allows to extract actual annotation from method bypassing LibGDX annotation wrapper . Returns null if annotation is not present . |
988 | public void show ( ) { final Stage stage = getStage ( ) ; stage . getRoot ( ) . clearChildren ( ) ; LmlUtilities . appendActorsToStage ( stage , actors ) ; } | Invoked after previous view is hidden and this view is about to show . Might be called when the view is being reloaded . Clears previous stage actors and adds managed actor to stage . If overridden call super . |
989 | public void invalidate ( ) { if ( transitionLength <= 0f ) { currentColor . set ( targetColor ) ; redNeedsUpdate = greenNeedsUpdate = blueNeedsUpdate = alphaNeedsUpdate = false ; transitionInProgress = false ; } else { redNeedsUpdate = initialColor . r != targetColor . r ; greenNeedsUpdate = initialColor . g != targetC... | Reschedules color updates . Should be called upon manual color modifications . |
990 | protected void processCell ( ) { final ObjectMap < String , String > attributes = getNamedAttributes ( ) ; if ( GdxMaps . isEmpty ( attributes ) ) { processCellWithNoAttributes ( getTable ( ) ) ; return ; } final LmlActorBuilder builder = new LmlActorBuilder ( ) ; final ObjectSet < String > processedAttributes = GdxSet... | This method is invoked when the tag is closed . Extracts a cell from the table . |
991 | protected void processBuildingAttributeToDetermineTable ( final ObjectMap < String , String > attributes , final ObjectSet < String > processedAttributes , final LmlActorBuilder builder ) { final LmlSyntax syntax = getParser ( ) . getSyntax ( ) ; for ( final Entry < String , String > attribute : attributes ) { final Lm... | This is meant to handle toButtonTable toTitleTable toDialogTable to choose which table should have a row appended . |
992 | protected void processCellAttributes ( final ObjectMap < String , String > attributes , final ObjectSet < String > processedAttributes , final Table table , final Cell < ? > cell ) { final LmlSyntax syntax = getParser ( ) . getSyntax ( ) ; for ( final Entry < String , String > attribute : attributes ) { if ( processedA... | This is meant to handle cell attributes that will modify the extracted cell . |
993 | public TabShowingAction show ( final Tab tabToShow , final LmlTabbedPaneListener listener ) { this . tabToShow = tabToShow ; this . listener = listener ; shown = false ; return this ; } | Chaining action for pooling utility . |
994 | @ SuppressWarnings ( "unchecked" ) @ OnMessage ( AutumnMessage . SKINS_LOADED ) public boolean injectFields ( final InterfaceService interfaceService ) { for ( final Entry < Pair < String , String > , Array < Pair < Field , Object > > > entry : fieldsToInject ) { final Skin skin = interfaceService . getParser ( ) . get... | Invoked when all skins are loaded . Injects skin assets . |
995 | public void onConnect ( ) { input . setDisabled ( false ) ; sendingButton . setDisabled ( false ) ; connectingButton . setDisabled ( true ) ; disconnectingButton . setDisabled ( false ) ; } | Enables sending widgets . Disables connecting widgets . |
996 | public void onDisconnect ( ) { input . setDisabled ( true ) ; sendingButton . setDisabled ( true ) ; connectingButton . setDisabled ( false ) ; disconnectingButton . setDisabled ( true ) ; } | Disables sending widgets . Enables connecting widgets . |
997 | public boolean satisfies ( String requirement ) { Requirement req ; switch ( this . type ) { case STRICT : req = Requirement . buildStrict ( requirement ) ; break ; case LOOSE : req = Requirement . buildLoose ( requirement ) ; break ; case NPM : req = Requirement . buildNPM ( requirement ) ; break ; case COCOAPODS : re... | Check if the version satisfies a requirement |
998 | public boolean isGreaterThan ( Semver version ) { if ( this . getMajor ( ) > version . getMajor ( ) ) return true ; else if ( this . getMajor ( ) < version . getMajor ( ) ) return false ; int otherMinor = version . getMinor ( ) != null ? version . getMinor ( ) : 0 ; if ( this . getMinor ( ) != null && this . getMinor (... | Checks if the version is greater than another version |
999 | public boolean isEquivalentTo ( Semver version ) { Semver sem1 = this . getBuild ( ) == null ? this : new Semver ( this . getValue ( ) . replace ( "+" + this . getBuild ( ) , "" ) ) ; Semver sem2 = version . getBuild ( ) == null ? version : new Semver ( version . getValue ( ) . replace ( "+" + version . getBuild ( ) , ... | Checks if the version equals another version without taking the build into account . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.