NodeView.java

Index Score
freemind.view.mindmapview
FreeMind

View: Reasons, Metrics, Source Code

These are the metrics that contribute to the Enerjy Score for this file, ranked by impact. So the metrics listed at the top influence the score to a greater extent that the metrics listed at the bottom.

MetricDescription
EXEC_COMMENTSComments in executable code
LINE_COMMENTNumber of line comments
EXITSProcedure exits
CYCLOMATICCyclomatic complexity
COMPARISONSNumber of comparison operators
BLOCKSNumber of blocks
FUNCTIONSNumber of function declarations
OPERATORSNumber of operators
DECL_COMMENTSComments in declarations
JAVA0117JAVA0117 Missing javadoc: method 'method'
PROGRAM_LENGTHHalstead program length
LOOPSNumber of loops
SIZESize of the file in bytes
UNIQUE_OPERANDSNumber of unique operands
LOGICAL_LINESNumber of statements
OPERANDSNumber of operands
RETURNSNumber of return points from functions
PROGRAM_VOCABHalstead program vocabulary
JAVA0110JAVA0110 Incorrect javadoc: no @return tag
ELOCEffective lines of code
LOCLines of code
INTERFACE_COMPLEXITYInterface complexity
LINESNumber of lines in the source file
JAVA0254JAVA0254 Use enhanced for loop construct instead of Iterator
JAVA0108JAVA0108 Incorrect javadoc: no @param tag for 'parameter'
JAVA0177JAVA0177 Variable declaration missing initializer
JAVA0068JAVA0068 Modifiers not declared in recommended order
JAVA0144JAVA0144 Line exceeds maximum M characters
PARAMSNumber of formal parameter declarations
COMMENTSComment lines
JAVA0173JAVA0173 Unused method parameter
JAVA0267JAVA0267 Use of System.err
JAVA0076JAVA0076 Use of magic number
UNIQUE_OPERATORSNumber of unique operators
JAVA0073JAVA0073 Integer division in floating-point context
JAVA0034JAVA0034 Missing braces in if statement
JAVA0270JAVA0270 Use Java 5.0 enhanced for loop construct to iterate over all elements in an array
WHITESPACENumber of whitespace lines
JAVA0244JAVA0244 Field or method name in subclass differs only by case from inherited field or method
PROGRAM_VOLUMEHalstead program volume
JAVA0136JAVA0136 N methods defined in class (maximum: M)
JAVA0116JAVA0116 Missing javadoc: field 'field'
JAVA0126JAVA0126 Method declares unchecked exception in throws
JAVA0030JAVA0030 Private field not used
JAVA0100JAVA0100 Class contains N non-final fields (maximum: M)
/*FreeMind - A Program for creating and viewing Mindmaps *Copyright (C) 2000-2001 Joerg Mueller <joergmueller@bigfoot.com> *See COPYING for Details * *This program is free software; you can redistribute it and/or *modify it under the terms of the GNU General Public License *as published by the Free Software Foundation; either version 2 *of the License, or (at your option) any later version. * *This program is distributed in the hope that it will be useful, *but WITHOUT ANY WARRANTY; without even the implied warranty of *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *GNU General Public License for more details. * *You should have received a copy of the GNU General Public License *along with this program; if not, write to the Free Software *Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /*$Id: NodeView.java,v 1.28 2007/08/07 17:37:52 dpolivaev Exp $*/ package freemind.view.mindmapview; import java.awt.Color; import java.awt.Cursor; import java.awt.Dimension; import java.awt.Font; import java.awt.GradientPaint; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import java.awt.RenderingHints; import java.awt.dnd.DnDConstants; import java.awt.dnd.DragGestureListener; import java.awt.dnd.DragSource; import java.awt.dnd.DropTarget; import java.awt.dnd.DropTargetListener; import java.net.MalformedURLException; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.ListIterator; import java.util.Map; import java.util.Set; import java.util.TreeSet; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.SwingConstants; import freemind.controller.Controller; import freemind.main.FreeMind; import freemind.main.FreeMindMain; import freemind.main.Tools; import freemind.modes.MindIcon; import freemind.modes.MindMapCloud; import freemind.modes.MindMapNode; import freemind.modes.NodeAdapter; import freemind.preferences.FreemindPropertyListener; /** * This class represents a single Node of a MindMap * (in analogy to TreeCellRenderer). */ public abstract class NodeView extends JLabel { protected MindMapNode model; protected MapView map; protected EdgeView edge; /** the Color of the Rectangle of a selected Node */ protected final static Color selectedColor = new Color(210,210,210); //Color.lightGray; //the Color of the Rectangle of a selected Node protected final static Color dragColor = Color.lightGray; //the Color of appearing GradientBox on drag over protected int treeWidth = 0; protected int treeHeight = 0; protected int upperChildShift = 0; private boolean left = true; //is the node left of root? int relYPos = 0;//the relative Y Position to it's parent private boolean isLong = false; public final static int DRAGGED_OVER_NO = 0; public final static int DRAGGED_OVER_SON = 1; public final static int DRAGGED_OVER_SIBLING = 2; /** For RootNodeView.*/ public final static int DRAGGED_OVER_SON_LEFT = 3; protected int isDraggedOver = DRAGGED_OVER_NO; public void setDraggedOver(int draggedOver) { isDraggedOver = draggedOver; } public void setDraggedOver(Point p) { setDraggedOver( (dropAsSibling(p.getX())) ? NodeView.DRAGGED_OVER_SIBLING : NodeView.DRAGGED_OVER_SON) ; } public int getDraggedOver() { return isDraggedOver; } final static int ALIGN_BOTTOM = -1; final static int ALIGN_CENTER = 0; final static int ALIGN_TOP = 1; // // Constructors // private static Color standardSelectColor; private static Color standardNodeColor; protected NodeView(MindMapNode model, MapView map) { setHorizontalAlignment(CENTER); this.model = model; setMap(map); // initialize the standard node color. if (standardNodeColor == null) { standardNodeColor = Tools.xmlToColor( map.getController().getProperty(FreeMind.RESOURCES_NODE_COLOR)); // add listener: Controller .addPropertyChangeListener(new FreemindPropertyListener() { public void propertyChanged(String propertyName, String newValue, String oldValue) { if (propertyName .equals(FreeMind.RESOURCES_NODE_COLOR)) { standardNodeColor = Tools.xmlToColor(newValue); } if (propertyName .equals(FreeMind.RESOURCES_SELECTED_NODE_COLOR)) { standardSelectColor = Tools.xmlToColor(newValue); } } }); } // initialize the selectedColor: if(standardSelectColor== null) { String stdcolor = map.getController().getFrame().getProperty(FreeMind.RESOURCES_SELECTED_NODE_COLOR); if (stdcolor.length() == 7) { standardSelectColor = Tools.xmlToColor(stdcolor); } else { standardSelectColor = new Color(210,210,210); } } //Root has no edge if (!isRoot()) { if (getModel().getEdge().getStyle().equals("linear")) { edge = new LinearEdgeView(getParentView(),this); } else if (getModel().getEdge().getStyle().equals("bezier")) { edge = new BezierEdgeView(getParentView(),this); } else if (getModel().getEdge().getStyle().equals("sharp_linear")) { edge = new SharpLinearEdgeView(getParentView(),this); } else if (getModel().getEdge().getStyle().equals("sharp_bezier")) { edge = new SharpBezierEdgeView(getParentView(),this); } else { System.err.println("Unknown Edge Type."); } } addMouseListener( map.getNodeMouseMotionListener() ); addMouseMotionListener( map.getNodeMouseMotionListener() ); addKeyListener( map.getNodeKeyListener() ); addDragListener( map.getNodeDragListener() ); addDropListener( map.getNodeDropListener() ); } protected void addToMap(){ map.add(this); } protected void removeFromMap(){ map.remove(this); } void addDragListener(DragGestureListener dgl) { DragSource dragSource = DragSource.getDefaultDragSource(); dragSource.createDefaultDragGestureRecognizer (this, DnDConstants.ACTION_COPY | DnDConstants.ACTION_MOVE | DnDConstants.ACTION_LINK ,dgl); } void addDropListener(DropTargetListener dtl) { DropTarget dropTarget = new DropTarget(this,dtl); dropTarget.setActive(true); } /** * Factory method which creates the right NodeView for the model. */ protected static NodeView newNodeView(MindMapNode model, MapView map) { NodeView newView; if (model.isRoot()) { newView = new RootNodeView( model, map ); } else if (model.getStyle().equals(MindMapNode.STYLE_FORK) ) { newView = new ForkNodeView( model, map ); // newView = new BubbleNodeView( model, map ); } else if (model.getStyle().equals(MindMapNode.STYLE_BUBBLE) ) { // newView = new ForkNodeView( model, map ); newView = new BubbleNodeView( model, map ); } else { System.err.println("Tried to create a NodeView of unknown Style."); newView = new ForkNodeView(model, map); } model.setViewer(newView); newView.addToMap(); newView.update(); return newView; } // // public methods // public boolean dropAsSibling(double xCoord) { return isInVerticalRegion(xCoord, 1./3); } /** Determines whether or not the xCoord is in the part p of the node: * if node is on the left: part [1-p,1] * if node is on the right: part[ 0,p] of the total width. */ public boolean isInVerticalRegion(double xCoord, double p) { return isLeft() ? xCoord > getSize().width*(1.0-p) : xCoord < getSize().width*p; } /** @return true if should be on the left, false otherwise.*/ public boolean dropPosition (double xCoord) { /* here it is the same as me. */ return isLeft(); } public boolean isInFollowLinkRegion(double xCoord) { return getModel().getLink() != null && (getModel().isRoot() || !getModel().hasChildren() || isInVerticalRegion(xCoord, 1./2)); } /** * @param xCoord * @return true if a link is to be displayed and the curser is the hand now. */ public boolean updateCursor(double xCoord) { boolean followLink = isInFollowLinkRegion(xCoord); int requiredCursor = followLink ? Cursor.HAND_CURSOR : Cursor.DEFAULT_CURSOR; if (getCursor().getType() != requiredCursor) { setCursor(new Cursor(requiredCursor)); } return followLink; } public boolean isRoot() { return model.isRoot(); } public boolean getIsLong() { return isLong; } /* fc, 25.1.2004: Refactoring necessary: should call the model. */ public boolean isSiblingOf(NodeView myNodeView) { return getParentView() == myNodeView.getParentView(); } /* fc, 25.1.2004: Refactoring necessary: should call the model. */ public boolean isChildOf(NodeView myNodeView) { return getParentView() == myNodeView; } /* fc, 25.1.2004: Refactoring necessary: should call the model. */ public boolean isParentOf(NodeView myNodeView) { return (this == myNodeView.getParentView()); } public MindMapNode getModel() { return model; } /** Returns the coordinates occupied by the node and its children as a vector of four point per node.*/ public void getCoordinates(LinkedList inList) { getCoordinates(inList, 0, false); } private void getCoordinates(LinkedList inList, int additionalDistanceForConvexHull, boolean byChildren) { MindMapCloud cloud = getModel().getCloud(); // consider existing clouds of children if (byChildren && cloud != null){ additionalDistanceForConvexHull += CloudView.getAdditionalHeigth(cloud, this) / 2; } inList.addLast(new Point( -additionalDistanceForConvexHull + getExtendedX() , -additionalDistanceForConvexHull + getExtendedY() )); inList.addLast(new Point( -additionalDistanceForConvexHull + getExtendedX() , additionalDistanceForConvexHull + getExtendedY() + getExtendedHeight())); inList.addLast(new Point( additionalDistanceForConvexHull + getExtendedX() + getExtendedWidth(), additionalDistanceForConvexHull + getExtendedY() + getExtendedHeight())); inList.addLast(new Point( additionalDistanceForConvexHull + getExtendedX() + getExtendedWidth(), -additionalDistanceForConvexHull + getExtendedY() )); LinkedList childrenViews = getChildrenViews(); ListIterator children_it = childrenViews.listIterator(); while(children_it.hasNext()) { NodeView child = (NodeView)children_it.next(); child.getCoordinates(inList, additionalDistanceForConvexHull, true); } } private static boolean NEED_PREF_SIZE_BUG_FIX = Controller.JAVA_VERSION.compareTo("1.5.0") < 0; private static final int MIN_HOR_NODE_SIZE = 10; public Dimension getPreferredSize() { boolean isEmpty = getText().length() == 0; if(isEmpty){ setText("!"); } Dimension prefSize = super.getPreferredSize(); if(map.isCurrentlyPrinting() && NEED_PREF_SIZE_BUG_FIX) { prefSize.width += (int)(10f*map.getZoom()); } prefSize.width = Math.max(map.getZoomed(MIN_HOR_NODE_SIZE), prefSize.width); if (isEmpty){ setText(""); } prefSize.width += 4; prefSize.height += 4; return prefSize; } /** get width including folding symbol*/ public int getExtendedWidth() { return getExtendedWidth(getWidth()); } /** get height including folding symbol*/ public int getExtendedHeight() { return getExtendedHeight(getHeight()); } protected int getExtendedWidth(int w) { return w; } /** get height including folding symbol*/ protected int getExtendedHeight(int h) { return h; } /** get x coordinate including folding symbol*/ public int getExtendedX() { return getX(); } /** get y coordinate including folding symbol*/ public int getExtendedY() { return getY(); } public void setBounds(int x, int y){ setLocation(x, y); setSize(getPreferredSize()); } public void requestFocus(){ map.getController().getMode().getModeController().anotherNodeSelected(getModel()); super. requestFocus(); } /** draw folding symbol*/ public void paintFoldingMark(Graphics2D g){ } public void paint(Graphics graphics) { // background color starts here, fc. 9.11.2003: todo // graphics.setColor(Color.yellow); // graphics.fillRect(0,0,getWidth(), getHeight()); // background color ends here, fc. 9.11.2003: todo super.paint(graphics); } public void paintSelected(Graphics2D graphics, Dimension size) { if (this.isSelected()) { paintBackground(graphics, size, getSelectedColor()); //g.drawRect(0,0,size.width-1, size.height-2); } else if (getModel().getBackgroundColor() != null) { paintBackground(graphics, size, getModel().getBackgroundColor()); } // if (this.isSelected()) { // paintBackground(graphics, size, getSelectedColor()); // //g.drawRect(0,0,size.width-1, size.height-2); // } /*else*/ // if (true){ // Dimension newSize = size; // newSize.height -= 5; // newSize.width -= 5; // paintBackground(graphics, newSize, (getModel().getBackgroundColor() != null)?getModel().getBackgroundColor():Color.WHITE); // } } protected void paintBackground(Graphics2D graphics, Dimension size, Color color) { graphics.setColor(color); graphics.fillRect(0,0,size.width, size.height); } public void paintDragOver(Graphics2D graphics, Dimension size) { if (isDraggedOver == DRAGGED_OVER_SON) { if (isLeft()) { graphics.setPaint( new GradientPaint(size.width*3/4,0,map.getBackground(), size.width/4, 0, dragColor)); graphics.fillRect(0, 0, size.width*3/4, size.height-1); } else { graphics.setPaint( new GradientPaint(size.width/4,0,map.getBackground(), size.width*3/4, 0, dragColor)); graphics.fillRect(size.width/4, 0, size.width-1, size.height-1); } } if (isDraggedOver == DRAGGED_OVER_SIBLING) { graphics.setPaint( new GradientPaint(0,size.height*3/5,map.getBackground(), 0, size.height/5, dragColor)); graphics.fillRect(0, 0, size.width-1, size.height-1); } } // // get/set methods // /** * Calculates the tree height increment because of the clouds. */ public int getAdditionalCloudHeigth() { MindMapCloud cloud = getModel().getCloud(); if( cloud!= null) { return CloudView.getAdditionalHeigth(cloud, this); } else { return 0; } } protected boolean isSelected() { return (getMap().isSelected(this)); } /**Is the node left of root?*/ public boolean isLeft() { if(getModel().isLeft() == null) return true; return getModel().isLeft().getValue(); } protected void setLeft(boolean left) { //this.left = left; getModel().setLeft(left); } // public boolean isLeftDefault() { // return getModel().isLeft() == null; // } protected void setModel( MindMapNode model ) { this.model = model; } MapView getMap() { return map; } protected void setMap( MapView map ) { this.map = map; } EdgeView getEdge() { return edge; } void setEdge(EdgeView edge) { this.edge = edge; } protected NodeView getParentView() { return getModel().getParentNode().getViewer(); } /** * This method returns the NodeViews that are children of this node. */ public LinkedList getChildrenViews() { LinkedList childrenViews = new LinkedList(); ListIterator it = getModel().childrenUnfolded(); if (it != null) { while(it.hasNext()) { NodeView view = ((MindMapNode)it.next()).getViewer(); if (view != null) { // Visible view childrenViews.add(view); // child.getViewer() ); } } } return childrenViews; } protected LinkedList getSiblingViews() { return getParentView().getChildrenViews(); } /** * Returns the Point where the OutEdge * should leave the Node. * THIS SHOULD BE DECLARED ABSTRACT AND BE DONE IN BUBBLENODEVIEW ETC. */ Point getOutPoint() { Dimension size = getSize(); if( isRoot() ) { return new Point(getLocation().x + size.width, getLocation().y + size.height / 2); } else if( isLeft() ) { return new Point(getLocation().x, getLocation().y + size.height - 2); } else { return new Point(getLocation().x + size.width, getLocation().y + size.height - 2); } } /* fc, 26.06.2005 */ /** Returns the point the edge should start given the point of the child node * that should be connected. * @param destinationPoint the outpoint should point in the direction of destinationPoint * @param isLeft TODO * @return */ Point getOutPoint(Point destinationPoint, boolean isLeft) { return getOutPoint(); } /* end fc, 26.06.2005 */ /** * Returns the Point where the InEdge * should arrive the Node. * THIS SHOULD BE DECLARED ABSTRACT AND BE DONE IN BUBBLENODEVIEW ETC. */ Point getInPoint() { Dimension size = getSize(); if( isRoot() ) { return new Point(getLocation().x, getLocation().y + size.height / 2); } else if( isLeft() ) { return new Point(getLocation().x + size.width, getLocation().y + size.height - 2); } else { return new Point(getLocation().x, getLocation().y + size.height - 2); } } /** * Returns the Point where the Links * should arrive the Node. * THIS SHOULD BE DECLARED ABSTRACT AND BE DONE IN BUBBLENODEVIEW ETC. */ public Point getLinkPoint(Point declination) { Dimension size = getSize(); int x, y; if(declination != null){ x = getMap().getZoomed(declination.x); y = getMap().getZoomed(declination.y); } else{ x = 1; y = 0; } if( isRoot() || isLeft()) { x = -x; } if(y != 0){ double ctgRect = Math.abs((double)size.width / size.height); double ctgLine = Math.abs((double)x / y); int absLinkX, absLinkY; if(ctgRect > ctgLine){ absLinkX = Math.abs(x*size.height / (2 * y)); absLinkY = size.height / 2; } else{ absLinkX = size.width / 2; absLinkY = Math.abs(y*size.width / (2 * x)); } return new Point(getLocation().x + size.width / 2 + (x>0 ? absLinkX : -absLinkX), getLocation().y + size.height / 2 + (y>0 ? absLinkY : -absLinkY)); } else{ return new Point(getLocation().x + (x>0 ? size.width:0), getLocation().y + (size.height / 2)); } } /** * Returns the relative position of the Edge. * This is used by bold edge to know how to shift the line. */ int getAlignment() { if( isRoot() ) return ALIGN_CENTER; return ALIGN_BOTTOM; } // // Navigation // protected NodeView getNextPage() { if (isRoot()) { return this; // I'm root } NodeView sibling = getNextSibling(); if (sibling == this) { return this; // at the end } // if (sibling.getParentView() != this.getParentView()) { // return sibling; // sibling on another page (has different parent) // } NodeView nextSibling = sibling.getNextSibling(); while (nextSibling != sibling && sibling.getParentView() == nextSibling.getParentView()) { sibling = nextSibling; nextSibling = nextSibling.getNextSibling(); } return sibling; // last on the page } protected NodeView getPreviousPage() { if (isRoot()) { return this; // I'm root } NodeView sibling = getPreviousSibling(); if (sibling == this) { return this; // at the end } // if (sibling.getParentView() != this.getParentView()) { // return sibling; // sibling on another page (has different parent) // } NodeView previousSibling = sibling.getPreviousSibling(); while (previousSibling != sibling && sibling.getParentView() == previousSibling.getParentView()) { sibling = previousSibling; previousSibling = previousSibling.getPreviousSibling(); } return sibling; // last on the page } protected NodeView getNextSibling() { NodeView sibling; NodeView nextSibling = this; // get next sibling even in higher levels for (sibling = this; !sibling.isRoot(); sibling = sibling.getParentView()) { nextSibling = sibling.getNextSiblingSingle(); if (sibling != nextSibling) { break; // found sibling } } if (sibling.isRoot()) { return this; // didn't find (we are at the end) } // we have the nextSibling, search in childs // untill: leaf, closed node, max level sibling = nextSibling; while (sibling.getModel().getNodeLevel() < getMap().getSiblingMaxLevel()) { // can we drill down? if (sibling.getChildrenViews().size() <= 0) { break; // no } sibling = (NodeView)(sibling.getChildrenViews().getFirst()); } return sibling; } protected NodeView getPreviousSibling() { NodeView sibling; NodeView previousSibling = this; // get Previous sibling even in higher levels for (sibling = this; !sibling.isRoot(); sibling = sibling.getParentView()) { previousSibling = sibling.getPreviousSiblingSingle(); if (sibling != previousSibling) { break; // found sibling } } if (sibling.isRoot()) { return this; // didn't find (we are at the end) } // we have the PreviousSibling, search in childs // untill: leaf, closed node, max level sibling = previousSibling; while (sibling.getModel().getNodeLevel() < getMap().getSiblingMaxLevel()) { // can we drill down? if (sibling.getChildrenViews().size() <= 0) { break; // no } sibling = (NodeView)(sibling.getChildrenViews().getLast()); } return sibling; } protected NodeView getNextSiblingSingle() { LinkedList v = null; if (getParentView().isRoot()) { if (this.isLeft()) { v = ((RootNodeView)getParentView()).getLeft(); } else { v = ((RootNodeView)getParentView()).getRight(); } } else { v = getParentView().getChildrenViews(); } NodeView sibling; if (v.size()-1 == v.indexOf(this)) { //this is last, return first // sibling = (NodeView)v.getFirst(); // loop sibling = this; } else { sibling = (NodeView)v.get(v.indexOf(this)+1); } return sibling; } protected NodeView getPreviousSiblingSingle() { LinkedList v = null; if (getParentView().isRoot()) { if (this.isLeft()) { v = ((RootNodeView)getParentView()).getLeft(); } else { v = ((RootNodeView)getParentView()).getRight(); } } else { v = getParentView().getChildrenViews(); } NodeView sibling; if (v.indexOf(this) <= 0) {//this is first, return last // sibling = (NodeView)v.getLast(); // loop sibling = this; } else { sibling = (NodeView)v.get(v.indexOf(this)-1); } return sibling; } // // Update from Model // void insert() { ListIterator it = getModel().childrenFolded(); while(it.hasNext()) { insert((MindMapNode)it.next()); } } /** * Create views for the newNode and all his descendants, set their * isLeft attribute according to this view. Observe that views know * about their parents only through their models. */ void insert(MindMapNode newNode) { NodeView newView = NodeView.newNodeView(newNode,getMap()); newView.setLeft(this.isLeft()); ListIterator it = newNode.childrenFolded(); while (it.hasNext()) { MindMapNode child = (MindMapNode)it.next(); newView.insert(child); } } /** * This is a bit problematic, because getChildrenViews() only works if * model is not yet removed. (So do not _really_ delete the model before the view * removed (it needs to stay in memory) */ void remove() { removeFromMap(); if (getEdge()!=null) { getEdge().remove(); } getModel().setViewer(null); // Let the model know he is invisible for(ListIterator e = getChildrenViews().listIterator();e.hasNext();) { ((NodeView)e.next()).remove(); }} void update() { //System.err.println("update"); // 1) Set color Color color = getModel().getColor(); if (color==null) { color = standardNodeColor; } setForeground(color); // 2) icons left or right? setHorizontalTextPosition((getModel().isOneLeftSideOfRoot())?SwingConstants.LEADING:SwingConstants.TRAILING); // 3) Create the icons: MultipleImage iconImages = new MultipleImage(map.getZoom()); boolean iconPresent = false; /* fc, 06.10.2003: images?*/ FreeMindMain frame = map.getController().getFrame(); Map stateIcons = (getModel()).getStateIcons(); for (Iterator i = stateIcons.keySet().iterator(); i.hasNext();) { String key = (String) i.next(); iconPresent = true; ImageIcon myIcon = (ImageIcon) stateIcons.get(key); iconImages.addImage(myIcon); } List icons = (getModel()).getIcons(); for (Iterator i = icons.iterator(); i.hasNext();) { MindIcon myIcon = (MindIcon) i.next(); iconPresent = true; //System.out.println("print the icon " + myicon.toString()); iconImages.addImage(myIcon.getIcon(frame)); } String link = ((NodeAdapter)getModel()).getLink(); if ( link != null ) { iconPresent = true; ImageIcon icon = new ImageIcon(frame.getResource (link.startsWith("mailto:") ? "images/Mail.png" : (Tools.executableByExtension(link) ? "images/Executable.png" : "images/Link.png"))); iconImages.addImage(icon); } // /* Folded icon by Matthias Schade (mascha2), fc, 20.12.2003*/ // if (((NodeAdapter)getModel()).isFolded()) { // iconPresent = true; // ImageIcon icon = new ImageIcon(((NodeAdapter)getModel()).getFrame().getResource("images/Folded.png")); // iconImages.addImage(icon); // } // DanielPolansky: set icon only if icon is present, because // we don't want to insert any additional white space. setIcon(iconPresent?iconImages:null); // 4) Determine font Font font = getModel().getFont(); font = font == null ? map.getController().getDefaultFont() : font; if (font != null) { if (map.getZoom() != 1F) { font = font.deriveFont(font.getSize()*map.getZoom()); } setFont(font); } else { // We can survive this trouble. System.err.println("NodeView.update(): default font is null."); } // 5) Set the text // Right now, this implementation is quite logical, although it allows // for nonconvex feature of nodes starting with <html>. // String nodeText = getModel().toString(); String nodeText = getModel().toString(); // Tell if node is long and its width has to be restricted // boolean isMultiline = nodeText.indexOf("\n") >= 0; String[] lines = nodeText.split("\n"); boolean widthMustBeRestricted = false; lines = nodeText.split("\n"); for (int line = 0; line < lines.length; line++) { // Compute the width the node would spontaneously take, // by preliminarily setting the text. setText(lines[line]); widthMustBeRestricted = getPreferredSize().width > map .getZoomed(map.getMaxNodeWidth()); if (widthMustBeRestricted) { break; } } isLong = widthMustBeRestricted || lines.length > 1; if (nodeText.startsWith("<html>")) { // Make it possible to use relative img references in HTML using tag <base>. if (nodeText.indexOf("<img")>=0 && nodeText.indexOf("<base ") < 0 ) { try { nodeText = "<html><base href=\""+ map.getModel().getURL()+"\">"+nodeText.substring(6); } catch (MalformedURLException e) {} } setText(nodeText); } else if (nodeText.startsWith("<table>")) { lines[0] = lines[0].substring(7); // remove <table> tag int startingLine = lines[0].matches("\\s*") ? 1 : 0; // ^ If the remaining first line is empty, do not draw it String text = "<html><table border=1 style=\"border-color: white\">"; //String[] lines = nodeText.split("\n"); for (int line = startingLine; line < lines.length; line++) { text += "<tr><td style=\"border-color: white;\">"+ Tools.toXMLEscapedText(lines[line]).replaceAll("\t","<td style=\"border-color: white\">"); } setText(text); } else if (isLong) { String text = "<tr><td>"; int maximumLineLength = 0; for (int line = 0; line < lines.length; line++) { text += Tools.toXMLEscapedTextWithNBSPizedSpaces(lines[line]) + "<p>"; if (lines[line].length() > maximumLineLength) { maximumLineLength = lines[line].length(); }} text += "</td></tr>"; setText("<html><table"+ (!widthMustBeRestricted?">":" width=\""+map.getZoomed(map.getMaxNodeWidth())+"\">")+ text+"</table></html>"); } // 6) ToolTips: updateToolTip(); // 7) Complete repaint(); // Because of zoom? } /** * Updates the tool tip of the node. */ public void updateToolTip() { Map tooltips = getModel().getToolTip(); if(tooltips.size() == 1) { setToolTipText((String) tooltips.values().iterator().next()); } else if (tooltips.size()==0) { setToolTipText(null); } else { // html table StringBuffer text = new StringBuffer("<html><table>"); Set keySet = tooltips.keySet(); TreeSet sortedKeySet = new TreeSet(); sortedKeySet.addAll(keySet); for (Iterator i = sortedKeySet.iterator(); i.hasNext();) { String key = (String) i.next(); String value = (String) tooltips.get(key); text.append("<tr><td>"); text.append(value); text.append("</td></tr>"); } text.append("</table></html>"); setToolTipText(text.toString()); } } void updateAll() { update(); for(ListIterator e = getChildrenViews().listIterator();e.hasNext();) { NodeView child = (NodeView)e.next(); child.updateAll(); } } protected void setRendering(Graphics2D g) { if (map.getController().getAntialiasAll()) { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } // else // g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); } abstract String getStyle() ; /** * @return the shift of the tree root node * relative to the middle of the tree * because of the light shift of the children nodes */ public int getTreeHeight() { return treeHeight; } /** * sets the shift of the tree root node * relative to the middle of the tree * because of the light shift of the children nodes. */ public void setTreeHeight(int i) { treeHeight = i; } public int getTreeWidth() { return treeWidth; } public void setTreeWidth(int i) { treeWidth = i; } public int getZoomedFoldingSymbolHalfWidth() { int preferredFoldingSymbolHalfWidth = map.getZoomedFoldingSymbolHalfWidth(); return Math.min(preferredFoldingSymbolHalfWidth, super.getPreferredSize().height / 2); } /** * @return returns the color that should used to select the node. */ protected Color getSelectedColor() { // Color backgroundColor = getModel().getBackgroundColor(); //// if(backgroundColor != null) { //// Color backBrighter = backgroundColor.brighter(); //// // white? //// if(backBrighter.getRGB() == Color.WHITE.getRGB()) { //// return standardSelectColor; //// } //// // == standard?? //// if (backBrighter.equals (standardSelectColor) ) { //// return backgroundColor.darker(); //// } //// return backBrighter; //// } // // == standard?? // if (backgroundColor != null /*&& backgroundColor.equals(standardSelectColor)*/ ) { // // bad hack: // return getAntiColor1(backgroundColor); //// return new Color(0xFFFFFF - backgroundColor.getRGB()); // } return standardSelectColor; } /* http://groups.google.de/groups?hl=de&lr=&ie=UTF-8&threadm=9i5bbo%24h1kmi%243%40ID-77081.news.dfncis.de&rnum=1&prev=/groups%3Fq%3Djava%2520komplement%25C3%25A4rfarbe%2520helligkeit%26hl%3Dde%26lr%3D%26ie%3DUTF-8%26sa%3DN%26as_qdr%3Dall%26tab%3Dwg */ /** * Ermittelt zu einer Farbe eine andere Farbe, die sich mˆglichst gut von * dieser abhebt. * Diese Farbe unterscheidet sich auch von {@link #getAntiColor2}. * @since PPS 1.1.1 */ protected static Color getAntiColor1(Color c) { float[] hsb = Color.RGBtoHSB(c.getRed(), c.getGreen(), c.getBlue(), null); hsb[0] += 0.40; if (hsb[0] > 1) hsb[0]--; hsb[1] = 1; hsb[2] = 0.7f; return Color.getHSBColor(hsb[0], hsb[1], hsb[2]); } /** * Ermittelt zu einer Farbe eine andere Farbe, die sich mˆglichst gut von * dieser abhebt. * Diese Farbe unterscheidet sich von {@link #getAntiColor1}. * @since PPS 1.1.1 */ protected static Color getAntiColor2(Color c) { float[] hsb = Color.RGBtoHSB(c.getRed(), c.getGreen(), c.getBlue(), null); hsb[0] -= 0.40; if (hsb[0] < 0) hsb[0]++; hsb[1] = 1; hsb[2] = (float)0.8; return Color.getHSBColor(hsb[0], hsb[1], hsb[2]); } /** * @return Returns the sHIFT. */ public int getShift() { return map.getZoomed(model.calcShiftY()); } /** * @return Returns the VGAP. */ public int getVGap() { return map.getZoomed(model.calcVGap()); // TODO } public int getHGap() { return map.getZoomed(model.getHGap()); } public int getUpperChildShift() { return upperChildShift; } public void setUpperChildShift(int treeShift) { this.upperChildShift = treeShift; } public NodeMotionListenerView getMotionListenerView() { return null; } }

The table below shows all metrics for NodeView.java.

MetricValueDescription
BLOCKS183.00Number of blocks
BLOCK_COMMENT27.00Number of block comment lines
COMMENTS236.00Comment lines
COMMENT_DENSITY 0.42Comment density
COMPARISONS134.00Number of comparison operators
CYCLOMATIC190.00Cyclomatic complexity
DECL_COMMENTS48.00Comments in declarations
DOC_COMMENT101.00Number of javadoc comment lines
ELOC561.00Effective lines of code
EXEC_COMMENTS82.00Comments in executable code
EXITS179.00Procedure exits
FUNCTIONS82.00Number of function declarations
HALSTEAD_DIFFICULTY96.11Halstead difficulty
HALSTEAD_EFFORT 0.00Halstead effort
INTERFACE_COMPLEXITY146.00Interface complexity
JAVA0001 0.00JAVA0001 Package name does not contain only lower case letters
JAVA0002 1.00JAVA0002 Package name does not begin with a top level domain name or country code
JAVA0003 0.00JAVA0003 Minimize use of on-demand (.*) imports
JAVA0004 0.00JAVA0004 Unnecessary import from java.lang
JAVA0005 0.00JAVA0005 Imports not in specified order
JAVA0006 0.00JAVA0006 Empty finally block
JAVA0007 0.00JAVA0007 Should not declare public field
JAVA0008 1.00JAVA0008 Empty catch block
JAVA0009 0.00JAVA0009 Protected member in final class
JAVA0010 0.00JAVA0010 Non-instantiable class does not contain a non-private static member
JAVA0011 0.00JAVA0011 Abstract class does not contain an abstract method
JAVA0012 0.00JAVA0012 Non-constructor method with same name as declaring class
JAVA0013 0.00JAVA0013 Non-blank final field is not static
JAVA0014 0.00JAVA0014 Class with only static members has non-private constructor
JAVA0015 0.00JAVA0015 Package class contains public nested type
JAVA0016 0.00JAVA0016 Abstract class contains public constructor
JAVA0017 0.00JAVA0017 Class name does not have required form
JAVA0018 0.00JAVA0018 Method name does not have required form
JAVA0019 0.00JAVA0019 Interface name does not have required form
JAVA0020 0.00JAVA0020 Field name does not have required form
JAVA0021 0.00JAVA0021 Interface method name does not have required form
JAVA0022 0.00JAVA0022 Static final field name does not have required form
JAVA0023 0.00JAVA0023 Empty finalize method
JAVA0024 0.00JAVA0024 Empty class
JAVA0025 0.00JAVA0025 Method override is empty
JAVA0026 0.00JAVA0026 Finalize method with parameters
JAVA0029 0.00JAVA0029 Private method not used
JAVA0030 1.00JAVA0030 Private field not used
JAVA0031 0.00JAVA0031 Case statement not properly closed
JAVA0032 0.00JAVA0032 Switch statement missing default
JAVA0033 0.00JAVA0033 default: not last case in switch statement
JAVA0034 4.00JAVA0034 Missing braces in if statement
JAVA0035 0.00JAVA0035 Missing braces in for statement
JAVA0036 0.00JAVA0036 Missing braces in while statement
JAVA0038 0.00JAVA0038 Non-case label in switch statement
JAVA0039 0.00JAVA0039 Break statement with label
JAVA0040 0.00JAVA0040 Switch statement contains N cases (maximum: M)
JAVA0041 0.00JAVA0041 Nested synchronized block
JAVA0042 0.00JAVA0042 Empty synchronized statement
JAVA0043 0.00JAVA0043 Inner class does not use outer class
JAVA0044 0.00JAVA0044 Serializable class with no instance variables
JAVA0045 0.00JAVA0045 Serializable class with only transient fields
JAVA0046 0.00JAVA0046 Name of class not derived from Exception ends with 'Exception'
JAVA0047 0.00JAVA0047 Serializable class derives from invalid base class
JAVA0048 0.00JAVA0048 Name of class derived from Exception does not end with 'Exception'
JAVA0049 0.00JAVA0049 Nested block at depth N (maximum: M)
JAVA0050 0.00JAVA0050 Class derives from java.lang.Error
JAVA0051 0.00JAVA0051 Class derives from java.lang.RuntimeException
JAVA0052 0.00JAVA0052 Class derives from java.lang.Throwable
JAVA0053 0.00JAVA0053 Unused label
JAVA0054 0.00JAVA0054 Inheritance depth N exceeds maximum M
JAVA0055 0.00JAVA0055 Class should be interface
JAVA0056 0.00JAVA0056 Unnecessary abstract modifier for interface or annotation
JAVA0057 0.00JAVA0057 Unnecessary default constructor
JAVA0058 0.00JAVA0058 Constructor calls super()
JAVA0059 1.00JAVA0059 Method override only calls super()
JAVA0061 0.00JAVA0061 Inaccessible member in anonymous class
JAVA0062 0.00JAVA0062 Public class missing public member or protected constructor
JAVA0063 0.00JAVA0063 Identifier name should not contain '$'
JAVA0064 0.00JAVA0064 N variations of identifier name (maximum: M)
JAVA0065 0.00JAVA0065 Unnecessary final modifier for method in final class
JAVA0066 0.00JAVA0066 Unnecessary modifier for interface nested type
JAVA0067 0.00JAVA0067 Array descriptor on identifier name
JAVA0068 9.00JAVA0068 Modifiers not declared in recommended order
JAVA0071 0.00JAVA0071 Strings compared with ==
JAVA0073 6.00JAVA0073 Integer division in floating-point context
JAVA0074 0.00JAVA0074 Use of Object.notify()
JAVA0075 0.00JAVA0075 Method parameter hides field
JAVA0076 7.00JAVA0076 Use of magic number
JAVA0077 0.00JAVA0077 Private field not used in declaring class
JAVA0078 1.00JAVA0078 Floating point values compared with ==
JAVA0079 0.00JAVA0079 Use of instance to reference static member
JAVA0080 0.00JAVA0080 Import declaration not used
JAVA0081 0.00JAVA0081 Boolean literal in comparison
JAVA0082 0.00JAVA0082 Unnecessary widening cast
JAVA0083 0.00JAVA0083 Unnecessary instanceof test
JAVA0084 0.00JAVA0084 Should use compound assignment operator
JAVA0085 0.00JAVA0085 Use of sun.* class
JAVA0087 0.00JAVA0087 Use of Thread.sleep()
JAVA0089 0.00JAVA0089 Use of restricted package
JAVA0092 0.00JAVA0092 Use of restricted type
JAVA0093 0.00JAVA0093 Redundant assignment
JAVA0094 0.00JAVA0094 Field hides a superclass field
JAVA0095 0.00JAVA0095 Uninitialized private field
JAVA0096 0.00JAVA0096 Field in nested class hides outer field
JAVA0098 0.00JAVA0098 Minimize use of implicit field initializers
JAVA0100 1.00JAVA0100 Class contains N non-final fields (maximum: M)
JAVA0101 0.00JAVA0101 Unnecessary modifier for field in interface
JAVA0102 0.00JAVA0102 Last statement in finalize() not super.finalize()
JAVA0103 0.00JAVA0103 Explicit call to finalize()
JAVA0104 0.00JAVA0104 finalize() only calls super.finalize()
JAVA0105 0.00JAVA0105 Duplicate import declaration
JAVA0106 0.00JAVA0106 Unnecessary import from current package
JAVA010813.00JAVA0108 Incorrect javadoc: no @param tag for 'parameter'
JAVA0109 0.00JAVA0109 Incorrect javadoc: no parameter 'parameter'
JAVA011016.00JAVA0110 Incorrect javadoc: no @return tag
JAVA0111 0.00JAVA0111 Incorrect javadoc: @return tag for void method
JAVA0112 0.00JAVA0112 Incorrect javadoc: no exception 'exception' in throws
JAVA0113 1.00JAVA0113 Incorrect javadoc: no @author tag
JAVA0114 1.00JAVA0114 Incorrect javadoc: no @version tag
JAVA0115 0.00JAVA0115 Incorrect javadoc: no @throws or @exception tag for 'exception'
JAVA0116 3.00JAVA0116 Missing javadoc: field 'field'
JAVA011739.00JAVA0117 Missing javadoc: method 'method'
JAVA0118 0.00JAVA0118 Missing javadoc: type 'type'
JAVA0119 0.00JAVA0119 Control variable changed within body of for loop
JAVA0123 0.00JAVA0123 Use all three components of for loop
JAVA0125 0.00JAVA0125 Continue statement with label
JAVA0126 0.00JAVA0126 Method declares unchecked exception in throws
JAVA0128 0.00JAVA0128 Public constructor in non-public class
JAVA0130 0.00JAVA0130 Non-static method does not use instance fields
JAVA0131 0.00JAVA0131 Compatible method does not override base
JAVA0132 0.00JAVA0132 Method overload with compatible signature
JAVA0133 0.00JAVA0133 Non-synchronized method overrides synchronized method
JAVA0135 0.00JAVA0135 Only one of Object.equals and Object.hashCode defined: missing 'method'
JAVA0136 1.00JAVA0136 N methods defined in class (maximum: M)
JAVA0137 0.00JAVA0137 Non-abstract class missing constructor
JAVA0138 0.00JAVA0138 N parameters defined for method (maximum: M)
JAVA0139 0.00JAVA0139 Definition of main other than public static void main(java.lang.String[])
JAVA0141 0.00JAVA0141 Unnecessary modifier for method in interface
JAVA0143 0.00JAVA0143 Synchronized method
JAVA0144 7.00JAVA0144 Line exceeds maximum M characters
JAVA0145524.00JAVA0145 Tab character used in source file
JAVA0150 0.00JAVA0150 java.lang.Error (or subclass) thrown
JAVA0153 0.00JAVA0153 Inefficient conversion of integer to string
JAVA0159 0.00JAVA0159 Inefficient conversion of string to integer
JAVA0160 0.00JAVA0160 Method does not throw specified exception
JAVA0161 0.00JAVA0161 Conditional wait() not in loop
JAVA0163 0.00JAVA0163 Empty statement
JAVA0165 0.00JAVA0165 Conflicting return statement in finally block
JAVA0166 0.00JAVA0166 Generic exception caught
JAVA0167 0.00JAVA0167 ThreadDeath not rethrown
JAVA0169 0.00JAVA0169 Unnecessary catch block: exception 'exception'
JAVA0170 0.00JAVA0170 Caught exception not derived from java.lang.Exception
JAVA0171 0.00JAVA0171 Unused local variable
JAVA0173 4.00JAVA0173 Unused method parameter
JAVA0174 0.00JAVA0174 Assigned local variable never used
JAVA0175 0.00JAVA0175 Successive assignment to variable
JAVA0176 0.00JAVA0176 Local variable name does not have required form
JAVA0177 9.00JAVA0177 Variable declaration missing initializer
JAVA0179 0.00JAVA0179 Local variable hides visible field
JAVA0233 0.00JAVA0233 Definition of serialVersionUID other than 'private static final long serialVersionUID'
JAVA0234 0.00JAVA0234 Class is Serializable but does not define serialVersionUID
JAVA0235 0.00JAVA0235 Class defines serialVersionUID but does not implement Serializable
JAVA0236 0.00JAVA0236 Attempt to clone an object which does not implement Cloneable
JAVA0237 0.00JAVA0237 Class implements Cloneable but does not have public clone method
JAVA0238 0.00JAVA0238 Clone method does not call super.clone()
JAVA0239 0.00JAVA0239 Class declares 'readObject' or 'writeObject' but does not implement Serializable
JAVA0240 0.00JAVA0240 Serializable class which declares readObject or writeObject but not both
JAVA0241 0.00JAVA0241 'readObject' or 'writeObject' should be declared private in Serializable class
JAVA0242 0.00JAVA0242 Transient field in non-Serializable class
JAVA0243 0.00JAVA0243 'readResolve' or 'writeReplace' should be declared private or protected
JAVA0244 1.00JAVA0244 Field or method name in subclass differs only by case from inherited field or method
JAVA0245 0.00JAVA0245 JUnit TestCase with non-trivial constructor
JAVA0246 0.00JAVA0246 JUnit assertXXX statement missing message parameter
JAVA0247 0.00JAVA0247 JUnit 'setUp()' and 'tearDown()' should call super method
JAVA0248 0.00JAVA0248 JUnit method 'setUp' or 'tearDown' with incorrect signature
JAVA0249 0.00JAVA0249 JUnit TestCase 'suite()' should be declared static
JAVA0250 0.00JAVA0250 JUnit TestCase declares testXXX method with incorrect signature
JAVA0251 0.00JAVA0251 Use '%n' for line breaks in printf/format for platform independence
JAVA0252 0.00JAVA0252 'enum' is a Java 1.5 reserved word
JAVA0253 0.00JAVA0253 Not all enum constants consumed in switch statement
JAVA0254 8.00JAVA0254 Use enhanced for loop construct instead of Iterator
JAVA0255 0.00JAVA0255 Result of method invocation not used
JAVA0256 0.00JAVA0256 Assignment of external collection/array to field
JAVA0257 0.00JAVA0257 Use of 'Constant Interface' anti-pattern
JAVA0258 0.00JAVA0258 Implement Iterable for foreach compatibility
JAVA0259 0.00JAVA0259 Return of collection/array field
JAVA0260 0.00JAVA0260 Use 'enum' instead of Enumerated Type pattern
JAVA0261 0.00JAVA0261 Use specialized Enum collection types
JAVA0262 0.00JAVA0262 Use of char in integer context
JAVA0263 0.00JAVA0263 Long literal ends with 'l' instead of 'L'
JAVA0264 0.00JAVA0264 Integer math in long context - check for overflow
JAVA0265 0.00JAVA0265 Use of Throwable.printStackTrace()
JAVA0266 0.00JAVA0266 Use of System.out
JAVA0267 3.00JAVA0267 Use of System.err
JAVA0269 0.00JAVA0269 Contents of StringBuffer never used
JAVA0270 2.00JAVA0270 Use Java 5.0 enhanced for loop construct to iterate over all elements in an array
JAVA0271 0.00JAVA0271 Minimize use of on-demand (.*) static imports
JAVA0272 0.00JAVA0272 Thread.run() called
JAVA0273 0.00JAVA0273 Non-final derivative of Thread calls start() in constructor
JAVA0274 0.00JAVA0274 Serializable class has a synchronized readObject()
JAVA0275 0.00JAVA0275 Serializable class has a synchronized writeObject() and no other synchronized methods
JAVA0276 0.00JAVA0276 Unnecessary use of String constructor
JAVA0277 0.00JAVA0277 Iterator.next() implementation does not throw NoSuchElementException
JAVA0278 0.00JAVA0278 Unnecessary use of Boolean constructor
JAVA0279 0.00JAVA0279 Serialization method readObject or readObjectNoData calls an overridable method
JAVA0280 0.00JAVA0280 IllegalMonitorStateException caught
JAVA0281 0.00JAVA0281 Iterator.next() not called in loop
JAVA0282 0.00JAVA0282 Call to Iterator.next() in loop which does not test Iterator.hasNext()
JAVA0283 0.00JAVA0283 Control variable not updated in loop body
JAVA0284 0.00JAVA0284 Explicit garbage collection
JAVA0285 0.00JAVA0285 Dereference of potentially null variable
JAVA0286 0.00JAVA0286 Dereference of null variable
JAVA0287 0.00JAVA0287 Unnecessary null check
JAVA0288 0.00JAVA0288 Inconsistent null check
LINES1072.00Number of lines in the source file
LINE_COMMENT108.00Number of line comments
LOC709.00Lines of code
LOGICAL_LINES370.00Number of statements
LOOPS18.00Number of loops
NEST_DEPTH 4.00Maximum nesting depth
OPERANDS1704.00Number of operands
OPERATORS3596.00Number of operators
PARAMS51.00Number of formal parameter declarations
PROGRAM_LENGTH5300.00Halstead program length
PROGRAM_VOCAB582.00Halstead program vocabulary
PROGRAM_VOLUME 0.00Halstead program volume
RETURNS95.00Number of return points from functions
SIZE35608.00Size of the file in bytes
UNIQUE_OPERANDS523.00Number of unique operands
UNIQUE_OPERATORS59.00Number of unique operators
WHITESPACE127.00Number of whitespace lines