Class GuiElementParser


  • public class GuiElementParser
    extends java.lang.Object
    Creates gui element instances from string representations.
    • Constructor Detail

      • GuiElementParser

        public GuiElementParser​(@NotNull
                                @NotNull JXCSkinCache<AbstractGUIElement> definedGUIElements)
        Creates a new instance.
        Parameters:
        definedGUIElements - the defined gui elements
    • Method Detail

      • lookupTextElement

        @NotNull
        public @NotNull GUIText lookupTextElement​(@NotNull
                                                  @NotNull java.lang.String name)
                                           throws JXCSkinException
        Returns a GUIText by element name.
        Parameters:
        name - the element name
        Returns:
        the GUIText element
        Throws:
        JXCSkinException - if the element name is undefined
      • lookupLabelElement

        @NotNull
        public @NotNull AbstractLabel lookupLabelElement​(@NotNull
                                                         @NotNull java.lang.String name)
                                                  throws JXCSkinException
        Returns a AbstractLabel by element name.
        Parameters:
        name - the element name
        Returns:
        the AbstractLabel element
        Throws:
        JXCSkinException - if the element name is undefined
      • lookupLabelLogElement

        @NotNull
        public @NotNull GUILabelLog lookupLabelLogElement​(@NotNull
                                                          @NotNull java.lang.String name)
                                                   throws JXCSkinException
        Returns a AbstractLabel by element name.
        Parameters:
        name - the element name
        Returns:
        the AbstractLabel element
        Throws:
        JXCSkinException - if the element name is undefined