Examples of ElementBase


Examples of com.pahimar.repackage.cofh.lib.gui.element.ElementBase

        mX -= guiLeft;
        mY -= guiTop;

        for (int i = elements.size(); i-- > 0; ) {
            ElementBase c = elements.get(i);
            if (!c.isVisible() || !c.isEnabled() || !c.intersectsWith(mX, mY)) {
                continue;
            }
            if (c.onMousePressed(mX, mY, mouseButton)) {
                return;
            }
        }
        TabBase tab = getTabAtPosition(mX, mY);
        if (tab != null && !tab.onMousePressed(mX, mY, mouseButton)) {
View Full Code Here

Examples of com.pahimar.repackage.cofh.lib.gui.element.ElementBase

        mX -= guiLeft;
        mY -= guiTop;

        if (mouseButton >= 0 && mouseButton <= 2) { // 0:left, 1:right, 2: middle
            for (int i = elements.size(); i-- > 0; ) {
                ElementBase c = elements.get(i);
                if (!c.isVisible() || !c.isEnabled()) { // no bounds checking on mouseUp events
                    continue;
                }
                c.onMouseReleased(mX, mY);
            }
        }
        mX += guiLeft;
        mY += guiTop;
View Full Code Here

Examples of com.pahimar.repackage.cofh.lib.gui.element.ElementBase

     */
    protected void drawElements(float partialTick, boolean foreground) {

        if (foreground) {
            for (int i = 0; i < elements.size(); i++) {
                ElementBase element = elements.get(i);
                if (element.isVisible()) {
                    element.drawForeground(mouseX, mouseY);
                }
            }
        } else {
            for (int i = 0; i < elements.size(); i++) {
                ElementBase element = elements.get(i);
                if (element.isVisible()) {
                    element.drawBackground(mouseX, mouseY, partialTick);
                }
            }
        }
    }
View Full Code Here

Examples of com.pahimar.repackage.cofh.lib.gui.element.ElementBase

        TabBase tab = getTabAtPosition(mouseX, mouseY);

        if (tab != null) {
            tab.addTooltip(tooltip);
        }
        ElementBase element = getElementAtPosition(mouseX, mouseY);

        if (element != null) {
            element.addTooltip(tooltip);
        }
    }
View Full Code Here

Examples of com.pahimar.repackage.cofh.lib.gui.element.ElementBase

    }

    protected ElementBase getElementAtPosition(int mX, int mY) {

        for (int i = elements.size(); i-- > 0; ) {
            ElementBase element = elements.get(i);
            if (element.intersectsWith(mX, mY)) {
                return element;
            }
        }
        return null;
    }
View Full Code Here

Examples of com.pahimar.repackage.cofh.lib.gui.element.ElementBase

    }

    protected final void updateElements() {

        for (int i = elements.size(); i-- > 0; ) {
            ElementBase c = elements.get(i);
            if (c.isVisible() && c.isEnabled()) {
                c.update(mouseX, mouseY);
            }
        }
    }
View Full Code Here

Examples of org.jibx.binding.model.ElementBase

     * @param typemap map from fully-qualified class name to type qualified name
     */
    private static void accumulateBindingDefinitions(BindingElement binding, Map elemmap, Map typemap) {
        ArrayList childs = binding.topChildren();
        for (int i = 0; i < childs.size(); i++) {
            ElementBase element = (ElementBase)childs.get(i);
            if (element.type() == ElementBase.INCLUDE_ELEMENT) {
               
                // use recursive call to add nested definitions in included binding
                accumulateBindingDefinitions(((org.jibx.binding.model.IncludeElement)element).getBinding(), elemmap,
                    typemap);
               
            } else if (element.type() == ElementBase.MAPPING_ELEMENT) {
               
                // handle mapping as type if abstract with type name, or as element if concrete
                MappingElementBase mapping = (MappingElementBase)element;
                String cname = mapping.getClassName();
                if (mapping.isAbstract()) {
View Full Code Here

Examples of org.jibx.binding.model.ElementBase

                    defineCollection(itype, iname, coll, hold);
                   
                    // check for special case of two unwrapped collections with same item-type and no children
                    ArrayList siblings = parent.children();
                    if (siblings.size() > 0 && coll.children().size() == 0 && coll.getName() == null) {
                        ElementBase sibling = (ElementBase)siblings.get(siblings.size()-1);
                        if (sibling.type() == ElementBase.COLLECTION_ELEMENT) {
                            CollectionElement lastcoll = (CollectionElement)sibling;
                            if (lastcoll.children().size() == 0 && lastcoll.getName() == null &&
                                Utility.safeEquals(lastcoll.getItemTypeName(), coll.getItemTypeName())) {
                                throw new IllegalStateException("Need to use wrapper element for collection member '" +
                                    memb.getBaseName() + "' of class " + cust.getName());
View Full Code Here

Examples of org.jibx.binding.model.ElementBase

     * @param typemap map from type qualified name to class data
     */
    private static void accumulateBindingDefinitions(BindingElement binding, Map elemmap, Map typemap) {
        ArrayList childs = binding.topChildren();
        for (int i = 0; i < childs.size(); i++) {
            ElementBase element = (ElementBase)childs.get(i);
            if (element.type() == ElementBase.INCLUDE_ELEMENT) {
               
                // use recursive call to add nested definitions in included binding
                BindingElement inclbinding = ((org.jibx.binding.model.IncludeElement)element).getBinding();
                if (inclbinding != null) {
                    accumulateBindingDefinitions(inclbinding, elemmap,
                        typemap);
                }
               
            } else if (element.type() == ElementBase.MAPPING_ELEMENT) {
               
                // handle mapping as type if abstract with type name, or as element if concrete
                MappingElementBase mapping = (MappingElementBase)element;
                String cname = mapping.getClassName();
                TypeData data = buildClassData(cname, false);
                if (mapping.isAbstract()) {
                    QName qname = mapping.getTypeQName();
                    if (qname != null) {
                        typemap.put(qname, data);
                        if (s_logger.isDebugEnabled()) {
                            s_logger.debug("Added class " + cname + " for type " + qname);
                        }
                    }
                } else {
                    QName qname = new QName(mapping.getNamespace().getUri(), mapping.getName());
                    elemmap.put(qname, data);
                    if (s_logger.isDebugEnabled()) {
                        s_logger.debug("Added class " + cname + " for element " + qname);
                    }
                }
               
            } else if (element.type() == ElementBase.FORMAT_ELEMENT) {
               
                // add named format as simple type definition
                FormatElement format = (FormatElement)element;
                String name = format.getTypeName();
                if (name != null) {
View Full Code Here

Examples of org.jibx.binding.model.ElementBase

     * @param binding
     * @return <code>true</code> if no-namespace namespace used, <code>false</code> if not
     */
    public static boolean checkNoNamespace(BindingElement binding) {
        loop: for (Iterator childiter = binding.topChildIterator(); childiter.hasNext();) {
            ElementBase child = (ElementBase)childiter.next();
            switch (child.type()) {
               
                case ElementBase.NAMESPACE_ELEMENT:
                    if (((NamespaceElement)child).getPrefix() == null) {
                        return true;
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.