pseudo.Pane class
View Sample :: Return to index  
pseudo.Pane.Pane(pThis:MovieClip)
Pane constructor. You never use the constructor to create this component.

Parameters None
Returns Nothing
Example
    None


pseudo.Pane.create(pOwner:MovieClip, strName:String, nDepth:Number):pseudo.Edit
Use this static function to create new Pane on the specified movie clip. Never use constructor directly to do it.

Parameters pOwner The movie clip on which the new Pane will be drawn.
strName The new Pane instance name.
nDepth The new Pane instance depth.
Returns The reference to new Pane instance
Example
    //create pseudo.Pane instance
    var pane:pseudo.Pane = pseudo.Pane.create(_root, "pane", 1);

    //set Pane movie clip size
    pane.setSize(400, 300);

    //set the movie content for the Pane instance
    //where the image will be displayed. Function setContent() returns the
    //reference to that content
    var pict:pseudo.BaseMovie = pane.setContent();

    // Create image movie clip using the image that was imported to the library
    //in our example image graphic is stored in the library with the id "pict"
    var img:MovieClip = pict.attachMovie("pict", "pict", 2);

    // add the listener to the content that would be handling the "size event"
    pict.addListener("size", _root, function(){ pict.setSize(img._width, img._height); });

    //Apply the skin to the pane
    pane.setLook(pseudo.look.XPLook.getInstance())

    //Create the button that will be zooming the image

    var btnPlus:pseudo.PushButton = pseudo.PushButton.create(_root, "btnPlus", 2);
    btnPlus.setSize(20, 20);
    var lbl:pseudo.Label = pseudo.Label(btnPlus.addItem(pseudo.Label));
    lbl.setText("+");
    lbl.setAlign("center");
    btnPlus.setLook(pseudo.look.XPLook.getInstance());
    btnPlus.update();
    btnPlus.draw();
    btnPlus.addListener("mouseRelease", _root, function()
      {
        img._xscale = img._yscale = img._xscale + 10;
        pane.setUpdated(false);
        pane.update();
        pane.draw();
       }
    );

    //Create the button that will be zooming out the image

    var btnMinus:pseudo.PushButton = pseudo.PushButton.create(_root, "btnMinus", 3);
    btnMinus.setSize(20, 20);
    var lbl:pseudo.Label = pseudo.Label(btnMinus.addItem(pseudo.Label));
    lbl.setText("-");
    lbl.setAlign("center");
    btnMinus.setLook(pseudo.look.XPLook.getInstance());
    btnMinus.update();
    btnMinus.draw();
    btnMinus.addListener("mouseRelease", _root, function()
      {
        img._xscale = img._yscale = Math.max(5, img._xscale - 10);
        pane.setUpdated(false);
        pane.update();
        pane.draw();
      }
    );

    //Position the minus button
    btnMinus._y = btnPlus._y + btnPlus.getH();

    //Calling these functions will finally draw the component
    pane.update();
    pane.draw();

    // This code will draw the Pane using XP look and feel skin.
    // Please notice that you should always use some skin to create the component,
    // this can be done like in this example, and the skin will be complied into the swf file,
    // or you can use another technique and load the skin at a run time.
           


pseudo.Pane.setContent(pClass:Function):pseudo.BaseMovie
Creates the Pane content movie clip and returns the reference to it.

Parameters pClass Function value
Returns pseudo.BaseMovie instance
Example
    None


pseudo.Pane.getMinW():Number
Returns the number values indicating the possible minimal width of the pane

Parameters None
Returns Number values indicating the possible minimal width of the pane
Example
    None


pseudo.Pane.getMinW():Number
Returns the number values indicating the possible minimal width for this pane.

Parameters None
Returns Number values indicating the possible minimal width for this pane.
Example
    None


pseudo.Pane.getMinH():Number
Returns the number values indicating the possible minimal height of the pane.

Parameters None
Returns Number values indicating the possible minimal height of the pane
Example
    None


pseudo.Pane.getMaxW():Number
Returns the number values indicating the possible maximal width of the pane.

Parameters None
Returns Number values indicating the possible maximal width of the pane
Example
    None


pseudo.Pane.getMaxH():Number
Returns the number values indicating the possible maximal height of the pane

Parameters None
Returns Number values indicating the possible maximal height of the pane
Example
    None
Flash UI Components (c)TUFaT.com, All Rights Reserved.