Class Param<T extends Param<T>>

java.lang.Object
com.oorian.html.Element<T>
com.oorian.html.elements.Param<T>

public class Param<T extends Param<T>> extends Element<T>
Represents an HTML <param> element that defines parameters for embedded objects.

The <param> element is used to define parameters for plugins or other embedded content within an <object> element. It provides a way to pass configuration values and settings to the embedded resource. This is a self-closing tag that contains no content.

Features:

  • Defines parameters for embedded objects
  • Name-value pair configuration
  • Self-closing tag (no closing tag required)
  • Must be nested within an <object> element
  • Supports passing configuration to plugins and embedded content
  • Multiple param elements can be used for different parameters

Usage:


 // Flash movie with parameters
 Object flash = new Object();
 flash.setData("/media/animation.swf");
 flash.setType("application/x-shockwave-flash");
 flash.setIntrinsicWidth(400);
 flash.setIntrinsicHeight(300);

 Param quality = new Param();
 quality.setName("quality");
 quality.setValue("high");
 flash.addElement(quality);

 Param autoplay = new Param();
 autoplay.setName("autoplay");
 autoplay.setValue("true");
 flash.addElement(autoplay);

 Param loop = new Param();
 loop.setName("loop");
 loop.setValue("false");
 flash.addElement(loop);

 // Video player parameters
 Object videoPlayer = new Object();
 videoPlayer.setData("/player/video.swf");

 Param videoUrl = new Param();
 videoUrl.setName("videoUrl");
 videoUrl.setValue("/videos/sample.mp4");
 videoPlayer.addElement(videoUrl);
 
Since:
2007
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • Param

      public Param()
      Constructs a new Param element.

      Creates a self-closing HTML <param> element. The name and value should be set to define the parameter.

  • Method Details

    • setName

      public T setName(String name)
      Sets the name of this parameter.
      Parameters:
      name - The parameter name.
      Returns:
      This element for method chaining.
    • setValue

      public T setValue(String value)
      Sets the value of this parameter.
      Parameters:
      value - The parameter value.
      Returns:
      This element for method chaining.