Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2011 Michael Ruflin, Andr´┐Ż Locher, Claudia von Bastian. This file is part of Tatool. Tatool is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Tatool 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Tatool. If not, see <http://www.gnu.org/licenses/>. /
 
 package ch.tatool.core.data;
 
Helper Class with getter and setter methods for properties concerning points.

Author(s):
Michael Ruflin
 
 public class Points {
 
 	// individual points
 	
Property name used to set a minPoints value.
 
 	public static final String PROPERTY_MIN_POINTS = "minPoints";

Property name used to set a points value.
 
 	public static final String PROPERTY_POINTS = "points";

Property name used to set a maxPoints value.
 
 	public static final String PROPERTY_MAX_POINTS = "maxPoints";
 	
 	// total points (accumulated)
 	
Property name used to set a totalMinPoints value.
 
     public static final String PROPERTY_TOTAL_MIN_POINTS = "totalMinPoints";
    
    
Property name used to set a totalPoints value.
 
     public static final String PROPERTY_TOTAL_POINTS = "totalPoints";
    
    
Property name used to set a totalMaxPoints value.
 
     public static final String PROPERTY_TOTAL_MAX_POINTS = "totalMaxPoints";
 	
 	
 	
 	private Points() {
 		// don't allow instantiation
 	}

Gets the minPointsProperty as a IntegerProperty.

Returns:
minPointsProperty
 
 	public static IntegerProperty getMinPointsProperty() {
 	}

Gets the pointsProperty as a IntegerProperty.

Returns:
pointsProperty
 
 	public static IntegerProperty getPointsProperty() {
 		return ;
 	}

Gets the maxPointsProperty as a IntegerProperty.

Returns:
maxPointsProperty
 
 	public static IntegerProperty getMaxPointsProperty() {
 	}

Sets the minPointsProperty as an IntegerProperty.

Parameters:
minPointsProperty the IntegerProperty that will be set
 
 	public static void setMinPointsProperty(IntegerProperty minPointsProperty) {
 		. = minPointsProperty;
 	}

Sets the pointsProperty as an IntegerProperty.

Parameters:
pointsProperty the IntegerProperty that will be set
	public static void setPointsProperty(IntegerProperty pointsProperty) {
		. = pointsProperty;
	}

Sets the maxPointsProperty as an IntegerProperty.

Parameters:
maxPointsProperty the IntegerProperty that will be set
	public static void setMaxPointsProperty(IntegerProperty maxPointsProperty) {
		. = maxPointsProperty;
	}

Gets the totalMinPointsProperty as a IntegerProperty.

Returns:
totalMinPointsProperty
	}

Gets the totalPointsProperty as a IntegerProperty.

Returns:
totalPointsProperty
	}

Gets the totalMaxPointsProperty as a IntegerProperty.

Returns:
totalMaxPointsProperty
	}

Sets the totalMinPointsProperty as an IntegerProperty.

Parameters:
totalMinPointsProperty the IntegerProperty that will be set
	public static void setTotalMinPointsProperty(
			IntegerProperty totalMinPointsProperty) {
		. = totalMinPointsProperty;
	}

Sets the totalPointsProperty as an IntegerProperty.

Parameters:
totalPointsProperty the IntegerProperty that will be set
	public static void setTotalPointsProperty(IntegerProperty totalPointsProperty) {
		. = totalPointsProperty;
	}

Sets the totalMaxPointsProperty as an IntegerProperty.

Parameters:
totalMaxPointsProperty the IntegerProperty that will be set
	public static void setTotalMaxPointsProperty(
			IntegerProperty totalMaxPointsProperty) {
		. = totalMaxPointsProperty;
	}

Helper method to set the min and max points of a element at once.

Parameters:
node
minPoints
maxPoints
	public static void setMinMaxPoints(Node nodeint minPointsint maxPoints) {
		getMinPointsProperty().setValue(nodeminPoints);
		getMaxPointsProperty().setValue(nodemaxPoints);
    }

    
Helper method to set the min and max points of a element at once to (0, 1).

Parameters:
node
    public static void setZeroOneMinMaxPoints(Node node) {
    	setMinMaxPoints(node, 0, 1);
    }
  
    
Helper Method which sets the pointsProperty according to a boolean to 0=false or 1=true.

Parameters:
node
outcome
    public static void setZeroOnePoints(Node nodeboolean outcome) {
    	getPointsProperty().setValue(nodeoutcome ? 1 : 0);
    }
New to GrepCode? Check out our FAQ X