java.lang.Objectjavax.swing.text.View
javax.swing.text.CompositeView
javax.swing.text.BoxView
javax.swing.text.FlowView
javax.swing.text.ParagraphView
javax.swing.text.html.ParagraphView
public class ParagraphView
Displays the a paragraph, and uses css attributes for its configuration.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.text.FlowView |
|---|
FlowView.FlowStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.text.ParagraphView |
|---|
firstLineIndent |
| Fields inherited from class javax.swing.text.FlowView |
|---|
layoutPool, layoutSpan, strategy |
| Fields inherited from class javax.swing.text.View |
|---|
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Constructor Summary | |
|---|---|
ParagraphView(Element elem)
Constructs a ParagraphView for the given element. |
|
| Method Summary | |
|---|---|
protected SizeRequirements |
calculateMinorAxisRequirements(int axis,
SizeRequirements r)
Calculate the needs for the paragraph along the minor axis. |
AttributeSet |
getAttributes()
Fetches the attributes to use when rendering. |
float |
getMaximumSpan(int axis)
Determines the maximum span for this view along an axis. |
float |
getMinimumSpan(int axis)
Determines the minimum span for this view along an axis. |
float |
getPreferredSpan(int axis)
Determines the preferred span for this view. |
protected StyleSheet |
getStyleSheet()
|
boolean |
isVisible()
Indicates whether or not this view should be displayed. |
void |
paint(Graphics g,
Shape a)
Renders using the given rendering surface and area on that surface. |
void |
setParent(View parent)
Establishes the parent view for this view. |
protected void |
setPropertiesFromAttributes()
Sets up the paragraph from css attributes instead of the values found in StyleConstants (i.e. |
| Methods inherited from class javax.swing.text.ParagraphView |
|---|
adjustRow, breakView, changedUpdate, createRow, findOffsetToCharactersInString, flipEastAndWestAtEnds, getAlignment, getBreakWeight, getClosestPositionTo, getFlowSpan, getFlowStart, getLayoutView, getLayoutViewCount, getNextNorthSouthVisualPositionFrom, getPartialSize, getTabBase, getTabSet, nextTabStop, setFirstLineIndent, setJustification, setLineSpacing |
| Methods inherited from class javax.swing.text.FlowView |
|---|
getFlowAxis, getViewIndexAtPosition, insertUpdate, layout, loadChildren, removeUpdate |
| Methods inherited from class javax.swing.text.BoxView |
|---|
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, childAllocation, forwardUpdate, getAxis, getChildAllocation, getHeight, getOffset, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModel |
| Methods inherited from class javax.swing.text.CompositeView |
|---|
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView, setInsets, setParagraphInsets |
| Methods inherited from class javax.swing.text.View |
|---|
append, breakView, createFragment, forwardUpdateToView, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, modelToView, remove, removeAll, updateChildren, updateLayout, viewToModel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ParagraphView(Element elem)
elem - the element that this view is responsible for| Method Detail |
|---|
public void setParent(View parent)
This is implemented to forward to the superclass as well as call the setPropertiesFromAttributes method to set the paragraph properties from the css attributes. The call is made at this time to ensure the ability to resolve upward through the parents view attributes.
parent - the new parent, or null if the view is
being removed from a parent it was previously added
topublic AttributeSet getAttributes()
getAttributes in class Viewprotected void setPropertiesFromAttributes()
setPropertiesFromAttributes in class ParagraphViewprotected StyleSheet getStyleSheet()
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r)
calculateMinorAxisRequirements in class FlowViewaxis - the axis being studiedr - the SizeRequirements object;
if null one will be created
SizeRequirements objectSizeRequirementspublic boolean isVisible()
public void paint(Graphics g, Shape a)
paint in class ParagraphViewg - the rendering surface to usea - the allocated region to render intoView.paint(java.awt.Graphics, java.awt.Shape)public float getPreferredSpan(int axis)
getPreferredSpan in class BoxViewaxis - may be either View.X_AXIS or View.Y_AXIS
BoxView.getPreferredSpan(int)public float getMinimumSpan(int axis)
getMinimumSpan in class BoxViewaxis - may be either View.X_AXIS or
View.Y_AXIS
BoxView.getMinimumSpan(int)public float getMaximumSpan(int axis)
getMaximumSpan in class BoxViewaxis - may be either View.X_AXIS or
View.Y_AXIS
BoxView.getMaximumSpan(int)Ces informations proviennent du site de http://java.sun.com
Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :
Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.
Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.
Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.
Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.
Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.
Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.
7 mots clés dont 0 définis manuellement (plus d'information...).
Avertissement
Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.
Recherche (afficher)
Utilisateur (masquer)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
Citation (masquer)