APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javax.swing.text.html

pack-priv Class CommentView

extends HiddenTagView
Class Inheritance
Imports
java.awt.*, java.awt.event.*, java.io.*, java.net.MalformedURLException, .URL, javax.swing.text.*, javax.swing.*, javax.swing.border.*, javax.swing.event.*, java.util.*

CommentView subclasses HiddenTagView to contain a JTextArea showing a comment. When the textarea is edited the comment is reset. As this inherits from EditableView if the JTextComponent is not editable, the textarea will not be visible.
Author
Scott Violet

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv static final Border
pack-priv static final int
pack-priv static final int
Inherited from javax.swing.text.html.HiddenTagView:
circleDcircleREndBorderisSettingAttributespaddingStartBordertagSizeUnknownTagBorderColoryAlign

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
_updateModelFromText()

Overrides javax.swing.text.html.HiddenTagView._updateModelFromText.

This is subclassed to put the text on the Comment attribute of the Element's AttributeSet.

protected Component
createComponent()

Overrides javax.swing.text.html.HiddenTagView.createComponent.

Create the component that is associated with this view.

pack-priv String
pack-priv JTextComponent
pack-priv void
Inherited from javax.swing.text.html.HiddenTagView:
_setTextFromModelchangedUpdatechangedUpdategetAlignmentgetMaximumSpangetMinimumSpangetPreferredSpaninsertUpdateisEndTagremoveUpdatesetTextFromModelupdateModelFromTextupdateYAlign

Field Detail

CBorderback to summary
pack-priv static final Border CBorder
commentPaddingback to summary
pack-priv static final int commentPadding
commentPaddingDback to summary
pack-priv static final int commentPaddingD

Constructor Detail

CommentViewback to summary
pack-priv CommentView(Element e)

Method Detail

_updateModelFromTextback to summary
pack-priv void _updateModelFromText()

Overrides javax.swing.text.html.HiddenTagView._updateModelFromText.

This is subclassed to put the text on the Comment attribute of the Element's AttributeSet.

createComponentback to summary
protected Component createComponent()

Overrides javax.swing.text.html.HiddenTagView.createComponent.

Doc from javax.swing.text.ComponentView.createComponent.

Create the component that is associated with this view. This will be called when it has been determined that a new component is needed. This would result from a call to setParent or as a result of being notified that attributes have changed.

getRepresentedTextback to summary
pack-priv String getRepresentedText()

Overrides javax.swing.text.html.HiddenTagView.getRepresentedText.

getTextComponentback to summary
pack-priv JTextComponent getTextComponent()

Overrides javax.swing.text.html.HiddenTagView.getTextComponent.

resetBorderback to summary
pack-priv void resetBorder()

Overrides javax.swing.text.html.HiddenTagView.resetBorder.

javax.swing.text.html back to summary

pack-priv Class CommentView.CommentBorder

extends LineBorder
Class Inheritance
Annotations
@SuppressWarnings:serial

Field Summary

Inherited from javax.swing.border.LineBorder:
lineColorroundedCornersthickness

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Insets
getBorderInsets(Component c, Insets insets)

Overrides javax.swing.border.LineBorder.getBorderInsets.

Reinitialize the insets parameter with this Border's current Insets.

public boolean
isBorderOpaque()

Overrides javax.swing.border.LineBorder.isBorderOpaque.

Implements javax.swing.border.Border.isBorderOpaque.

Returns whether or not the border is opaque.

public void
paintBorder(Component c, Graphics g, int x, int y, int width, int height)

Overrides javax.swing.border.LineBorder.paintBorder.

Implements javax.swing.border.Border.paintBorder.

Paints the border for the specified component with the specified position and size.

Inherited from javax.swing.border.LineBorder:
createBlackLineBordercreateGrayLineBordergetLineColorgetRoundedCornersgetThickness

Constructor Detail

CommentBorderback to summary
pack-priv CommentBorder()

Method Detail

getBorderInsetsback to summary
public Insets getBorderInsets(Component c, Insets insets)

Overrides javax.swing.border.LineBorder.getBorderInsets.

Doc from javax.swing.border.LineBorder.getBorderInsets.

Reinitialize the insets parameter with this Border's current Insets.

isBorderOpaqueback to summary
public boolean isBorderOpaque()

Overrides javax.swing.border.LineBorder.isBorderOpaque.

Implements javax.swing.border.Border.isBorderOpaque.

Doc from javax.swing.border.LineBorder.isBorderOpaque.

Returns whether or not the border is opaque.

paintBorderback to summary
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)

Overrides javax.swing.border.LineBorder.paintBorder.

Implements javax.swing.border.Border.paintBorder.

Doc from javax.swing.border.LineBorder.paintBorder.

Paints the border for the specified component with the specified position and size.