- Forward


Visual Content in J2ME
An Introduction


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu

Print

GUI Components for Visual Content
Back SMYC Forward
  • The VisualComponent Class:
    • Vector instead of ArrayList
    • Extends GameCanvas instead of JComponent
  • The Visualization Class:
    • Vector instead of ArrayList
    • Enumeration instead of Iterator
  • The VisualizationView Class:
    • Packed int instead of Color
    • Enumeration instead of Iterator
    • Specialized off-screen Graphics object
Static Content
Back SMYC Forward

The AbstractTransformableContent class can no longer be used because:

Described Static Content
Back SMYC Forward

An Example Revisited

j2meexamples/src/visual/statik/described/RandomRectangleCanvas.java
 
Sampled Static Content
Back SMYC Forward

The TransformableContent interface can no longer include setComposite() or setBufferedImageOp()

The factories have to change:

j2meexamples/src/visual/statik/sampled/ImageFactory.java
 
j2meexamples/src/visual/statik/sampled/ContentFactory.java
 
Sampled Static Content (cont.)
Back SMYC Forward

An Example Revisited

j2meexamples/src/visual/statik/sampled/ImageCanvas.java
 
Sampled Dynamic Content
Back SMYC Forward

Nothing (significant) has to change

Described Dynamic Content
Back SMYC Forward
  • The Stage Class:
    • Enumeration instead of Iterator
    • Packed int instead of Color
  • The Sprite Class:
    • Doesn't change
  • The RuleBasedSprite Class:
    • Vector instead of ArrayList
  • Tweening:
    • Only location tweening makes sense
Described Dynamic Content (cont.)
Back SMYC Forward

An Example Revisited

j2meexamples/src/visual/dynamic/described/FallingCharacter.java
 
Described Dynamic Content (cont.)
Back SMYC Forward

Another Example Revisited

j2meexamples/src/visual/dynamic/described/Cupola.java
 
j2meexamples/src/visual/dynamic/described/Balloon.java
 
There's Always More to Learn
Back -