/*
 *  The MIT License (MIT)
 *
 *  View the full license at:
 *  https://github.com/hendrixjoseph/FamilyTree/blob/master/LICENSE.md
 *
 *  Copyright (c) 2015 Joseph Hendrix
 *
 *  Hosted on GitHub at https://github.com/hendrixjoseph/FamilyTree
 *
 */

package edu.wright.hendrix11.c3.Axis;

/**
 * @author Joe Hendrix
 */
public class Label
{
    public class Label
    {
        private LabelPosition position;
        private String text;

        public Label(String text)
        {
            this.text = text;
        }

        public Label(String text, LabelPosition position)
        {
            this.text = text;
            this.position = position;
        }

        public String toString()
        {
            StringBuilder sb = new StringBuilder("{text:'");
            sb.append(text);
            sb.append("'");

            if ( position != null )
            {
                sb.append(",position:'");
                sb.append(position.toString());
                sb.append("'");
            }

            sb.append("}");

            return sb.toString();
        }
    }

    public enum LabelPosition
    {
        inner_right,
        inner_center,
        inner_left,
        outer_right,
        outer_center,
        outer_left,
        inner_top,
        inner_middle,
        inner_bottom,
        outer_top,
        outer_middle,
        outer_bottom;

        @Override
        public String toString()
        {
            return super.toString().replace('_', '-');
        }
    }
}

@@ -327,32 +327,16 @@
 lic 
-class Label%0A%7B%0A    public
+abstract
  cla
@@ -344,26 +344,18 @@
 s Label%0A
-    %7B%0A    
+%7B%0A
     priv
@@ -358,29 +358,22 @@
 private 
-LabelPosition
+String
  positio
@@ -371,28 +371,24 @@
 g position;%0A
-    
     private 
@@ -401,20 +401,16 @@
  text;%0A%0A
-    
     publ
@@ -431,34 +431,26 @@
 g text)%0A    
-    %7B%0A    
+%7B%0A
         this
@@ -463,35 +463,27 @@
 = text;%0A    
-  
-  
 %7D%0A%0A
-    
     public L
@@ -524,20 +524,16 @@
 sition)%0A
-    
     %7B%0A  
@@ -534,28 +534,24 @@
   %7B%0A        
-    
 this.text = 
@@ -556,20 +556,16 @@
 = text;%0A
-    
         
@@ -590,35 +590,121 @@
 sition;%0A    
+%7D%0A
     
-%7D%0A
 %0A    
+protected setPosition(String position)%0A    %7B%0A        this.position = position;%0A    %7D%0A%0A
     public S
@@ -724,33 +724,26 @@
 g()%0A    
-    %7B%0A   
+%7B%0A
         
  StringB
@@ -734,17 +734,16 @@
         
- 
 StringBu
@@ -783,36 +783,32 @@
 xt:'%22);%0A        
-    
 sb.append(text);
@@ -808,36 +808,32 @@
 (text);%0A        
- 
-   
 sb.append(%22'%22);%0A
@@ -841,20 +841,16 @@
         
- 
-   
 if ( pos
@@ -869,34 +869,26 @@
 l )%0A        
-    %7B%0A    
+%7B%0A
             
@@ -917,36 +917,32 @@
 %22);%0A            
-    
 sb.append(positi
@@ -947,26 +947,11 @@
 tion
-.toString());%0A    
+);%0A
     
@@ -982,27 +982,19 @@
         
-  
-  
 %7D%0A%0A
-    
         
@@ -1006,28 +1006,24 @@
 pend(%22%7D%22);%0A%0A
-    
         retu
@@ -1044,440 +1044,8 @@
 ();%0A
-        %7D%0A    %7D%0A%0A    public enum LabelPosition%0A    %7B%0A        inner_right,%0A        inner_center,%0A        inner_left,%0A        outer_right,%0A        outer_center,%0A        outer_left,%0A        inner_top,%0A        inner_middle,%0A        inner_bottom,%0A        outer_top,%0A        outer_middle,%0A        outer_bottom;%0A%0A        @Override%0A        public String toString()%0A        %7B%0A            return super.toString().replace('_', '-');%0A        %7D%0A
     

Update Label.java