예제 #1
0
 /**
  * Indicates if the label of the node is on border.
  *
  * @return true if the label of this node is on border, false otherwise
  */
 public boolean hasLabelOnBorder() {
   NodeMapping actualMapping = node.getActualMapping();
   if (actualMapping != null) {
     NodeStyleDescription style = actualMapping.getStyle();
     if (style != null) {
       LabelPosition labelPosition = style.getLabelPosition();
       return labelPosition.equals(LabelPosition.BORDER_LITERAL);
     }
   }
   return false;
 }
예제 #2
0
 /**
  * Indicates if the node as a non-empty name definition, i.e. that its label expression don't
  * always return an empty string.
  *
  * @return true if the node as a non-null and non-empty name, false otherwise
  */
 public boolean hasNonEmptyNameDefinition() {
   boolean hasEmptyNameDefinition = true;
   NodeMapping actualMapping = node.getActualMapping();
   if (actualMapping != null) {
     NodeStyleDescription style = actualMapping.getStyle();
     if (style != null) {
       String labelExpression = style.getLabelExpression();
       hasEmptyNameDefinition = labelExpression.trim().length() != 0;
     }
   }
   return hasEmptyNameDefinition;
 }