package bluej.stride.generic;

import java.util.List;
import javafx.beans.property.StringProperty;
import javafx.scene.Node;

public abstract class DocumentedMultiCanvasFrame
extends MultiCanvasFrame{    
   protected DocumentationTextArea documentationPane;

   
   protected DocumentedMultiCanvasFrame(InteractionManager editor, String caption, String stylePrefix)
   {
      super(editor, caption, stylePrefix);
       
      documentationPane = new DocumentationTextArea(editor, this, this, stylePrefix);     
      }

   
   public String getDocumentation()
   {
      return documentationPane.getText();     
      }
    
   
   public void setDocumentation(String s)
   {
      documentationPane.setText(s);     
      }

   
   public StringProperty documentationPromptTextProperty()
   {
      return documentationPane.promptTextProperty();     
      }

   
   @Override
   
   public void pullUpContents()
   {        
           
      }

   
   @Override
   
   protected void modifyChildren(List<FrameContentItem> updatedChildren)
   {
      updatedChildren.add(updatedChildren.indexOf(getHeaderRow()), documentationPane);     
      }

   
   @Override
   
   protected double getRightMarginFor(Node n)
   {
      if (n == documentationPane.getNode())
           
      return 6.0;
       
      else{ return super.getRightMarginFor(n);
         }     
      }

   
   @Override
   
   protected double getLeftMarginFor(Node n)
   {
      if (n == documentationPane.getNode())
           
      return 6.0;
       
      else{ return super.getLeftMarginFor(n);
         }     
      }

   
   @Override
   
   protected double getBottomMarginFor(Node n)
   {
      if (n == documentationPane.getNode())
           
      return 4.0;
       
      else{ return super.getBottomMarginFor(n);
         }     
      } 
   }
top, use, map, abstract class DocumentedMultiCanvasFrame

.   DocumentedMultiCanvasFrame
.   getDocumentation
.   setDocumentation
.   documentationPromptTextProperty
.   pullUpContents
.   modifyChildren
.   getRightMarginFor
.   getLeftMarginFor
.   getBottomMarginFor




89 neLoCode + 0 LoComm