package bluej.stride.generic;
import javafx.scene.Node;
import bluej.utility.javafx.SharedTransition;
import threadchecker.OnThread;
import threadchecker.Tag;
public abstract class DocumentedSingleLineFrame
extends SingleLineFrame{
protected DocumentationTextArea documentationPane;
protected DocumentedSingleLineFrame(InteractionManager editor, String caption, String stylePrefix)
{
super(editor, caption, stylePrefix);
documentationPane = new DocumentationTextArea(editor, this, this, stylePrefix);
contents.setAll(documentationPane, header);
}
public String getDocumentation()
{
return documentationPane.getText();
}
public void setDocumentation(String s)
{
documentationPane.setText(s);
}
public void setDocumentationPromptText(String s)
{
documentationPane.setPromptText(s);
}
@Override
@OnThread(Tag.FXPlatform)
public void setView(View oldView, View newView, SharedTransition animate)
{
super.setView(oldView, newView, animate);
documentationPane.setView(oldView, newView, animate);
}
@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 DocumentedSingleLineFrame
. DocumentedSingleLineFrame
. getDocumentation
. setDocumentation
. setDocumentationPromptText
. setView
. getRightMarginFor
. getLeftMarginFor
. getBottomMarginFor
86 neLoCode
+ 0 LoComm