Overview | Package | Class | Deprecated | Index | Help
| Griffon 0.9.5-rc2
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.griffon.runtime.core
[Java] Class AbstractGriffonView

    java.lang.Object
      groovy.lang.GroovyObjectSupport
          org.codehaus.griffon.runtime.core.AbstractGriffonArtifact
              org.codehaus.griffon.runtime.core.AbstractGriffonMvcArtifact
                  org.codehaus.griffon.runtime.core.AbstractGriffonView

All Implemented Interfaces:
  GriffonView

    public abstract class AbstractGriffonView
    extends AbstractGriffonMvcArtifact

Base implementation of the GriffonView interface.

Authors:
  Andres Almiray

Since:
  0.9.1

Field Summary
`private FactoryBuilderSupport` | `builder`

Fields inherited from class AbstractGriffonArtifact
app, log, resourceLocator

Constructor Summary
`AbstractGriffonView()`

Method Summary
`void` | `buildViewFromXml(Map args)` Transforms an XML file into a Groovy script and evaluates it using a builder.
`void` | `buildViewFromXml(Map args, String fileName)` Transforms an XML file into a Groovy script and evaluates it using a builder.
`protected String` | `getArtifactType()`
`FactoryBuilderSupport` | `getBuilder()`
`void` | `setBuilder(FactoryBuilderSupport builder)`

Methods inherited from class AbstractGriffonMvcArtifact
mvcGroupDestroy, mvcGroupInit

Methods inherited from class AbstractGriffonArtifact
buildMVCGroup, buildMVCGroup, buildMVCGroup, buildMVCGroup, buildMVCGroup, buildMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, destroyMVCGroup, execAsync, execFuture, execFuture, execFuture, execFuture, execInsideUIAsync, execInsideUISync, execOutside, execOutsideUI, execSync, getApp, getArtifactType, getGriffonClass, getLog, getMetaClass, getResourceAsStream, getResourceAsURL, getResources, isUIThread, metaClassOf, newInstance, setApp, setMetaClass, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup

Methods inherited from class GroovyObjectSupport
setProperty, getProperty, getMetaClass, setMetaClass, invokeMethod, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Field Detail

### builder

    private FactoryBuilderSupport builder

Constructor Detail

### AbstractGriffonView

    AbstractGriffonView()

Method Detail

### buildViewFromXml

    public void buildViewFromXml(Map args)

  Transforms an XML file into a Groovy script and evaluates it using a builder.

  The file name matches the name of this class plus '.xml'. It must be found somewhere in the classpath.

  Every XML attribute that represents a string literal must be single quoted explicitly otherwise the build will not be able to parse it. The following XML contents

       <application title="app.config.application.title"
                    pack="true">
           <actions>
               <action id="'clickAction'"
                       name="'Click'"
                       closure="{controller.click(it)}"/>
           </actions>
           <gridLayout cols="1" rows="3"/>
           <textField id="'input'" columns="20"
               text="bind('value', target: model)"/>
           <textField id="'output'" columns="20"
               text="bind{model.value}" editable="false"/>
           <button action="clickAction"/>
       </application>

  are translated to

       application(title: app.config.application.title, pack: true) {
         actions {
           action(id: 'clickAction', name: 'Click', closure: {controller.click(it)})
         }
         gridLayout(cols: 1, rows: 3)
         textField(id: 'input', text: bind('value', target: model), columns: 20)
         textField(id: 'output', text: bind{target.model}, columns: 20, editable: false)
         button(action: clickAction)
       }

  Parameters:
    `args` - a Map containing all relevant values that the build might need to build the View; this typically includes 'app', 'controller' and 'model'.
  Since:
    0.9.2

### buildViewFromXml

    public void buildViewFromXml(Map args, String fileName)

  Transforms an XML file into a Groovy script and evaluates it using a builder.

  Every XML attribute that represents a string literal must be single quoted explicitly otherwise the build will not be able to parse it. The following XML contents

       <application title="app.config.application.title"
                    pack="true">
           <actions>
               <action id="'clickAction'"
                       name="'Click'"
                       closure="{controller.click(it)}"/>
           </actions>
           <gridLayout cols="1" rows="3"/>
           <textField id="'input'" columns="20"
               text="bind('value', target: model)"/>
           <textField id="'output'" columns="20"
               text="bind{model.value}" editable="false"/>
           <button action="clickAction"/>
       </application>

  are translated to

       application(title: app.config.application.title, pack: true) {
         actions {
           action(id: 'clickAction', name: 'Click', closure: {controller.click(it)})
         }
         gridLayout(cols: 1, rows: 3)
         textField(id: 'input', text: bind('value', target: model), columns: 20)
         textField(id: 'output', text: bind{target.model}, columns: 20, editable: false)
         button(action: clickAction)
       }

  Parameters:
    `args` - a Map containing all relevant values that the build might need to build the View; this typically includes 'app', 'controller' and 'model'.
    `fileName` - the name of an XML file
  Since:
    0.9.2

### getArtifactType

    protected String getArtifactType()

### getBuilder

    public FactoryBuilderSupport getBuilder()

### setBuilder

    public void setBuilder(FactoryBuilderSupport builder)

Groovy Documentation