站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

InteriorSection (Editor Guarded Sections) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.editor.guards/0 0.1

org.netbeans.api.editor.guards
Class InteriorSection

java.lang.Object
  extended by org.netbeans.api.editor.guards.GuardedSection
      extended by org.netbeans.api.editor.guards.InteriorSection

public final class InteriorSection
extends GuardedSection

Represents an advanced guarded section. It consists of three pieces: a header, body, and footer. The header and footer are guarded but the body is not.


Method Summary
 String getBody()
          Returns the contents of the body part of the section.
 Position getBodyEndPosition()
          Returns a position where the body ends
 Position getBodyStartPosition()
          Returns a position where the body starts
 String getFooter()
          Returns the contents of the footer part of the guarded section.
 String getHeader()
          Returns the contents of the header part of the section.
 void setBody(String text)
          Sets the text of the body.
 void setFooter(String text)
          Sets the text of the footer.
 void setHeader(String text)
          Sets the text of the header.
 
Methods inherited from class org.netbeans.api.editor.guards.GuardedSection
contains, deleteSection, getCaretPosition, getEndPosition, getName, getStartPosition, getText, isValid, removeSection, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setBody

public void setBody(String text)
Sets the text of the body.

Parameters:
text - the new text

getBody

public String getBody()
Returns the contents of the body part of the section. If the section is invalid the method returns null.

Returns:
contents of the body or null, if the section is not valid.

setHeader

public void setHeader(String text)
Sets the text of the header.

Parameters:
text - the new text

getHeader

public String getHeader()
Returns the contents of the header part of the section. If the section is invalid the method returns null.

Returns:
contents of the header or null, if the section is not valid.

setFooter

public void setFooter(String text)
Sets the text of the footer. Note that the footer of the section must have exactly one line. So, all interior newline characters will be replaced by spaces.

Parameters:
text - the new text

getFooter

public String getFooter()
Returns the contents of the footer part of the guarded section. The method will return null, if the section is not valid.

Returns:
contents of the footer part, or null if the section is not valid.

getBodyStartPosition

public Position getBodyStartPosition()
Returns a position where the body starts

Returns:
the start position of the body part

getBodyEndPosition

public Position getBodyEndPosition()
Returns a position where the body ends

Returns:
the end position of the body part

org.netbeans.modules.editor.guards/0 0.1

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.