Package org.eclipse.nebula.widgets.nattable.data.convert

Examples of org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter


     *         {@link Gender#MALE} will be interpreted as <code>true</code>
     *         while {@link Gender#FEMALE} will be interpreted as
     *         <code>false</code>
     */
    private IDisplayConverter getGenderBooleanConverter() {
        return new DisplayConverter() {

            @Override
            public Object canonicalToDisplayValue(Object canonicalValue) {
                if (canonicalValue instanceof Gender) {
                    return ((Gender) canonicalValue) == Gender.MALE;
View Full Code Here


    /**
     * Format: Double to a specified number of decimal places
     */
    private static IDisplayConverter getDoubleDisplayConverter(
            final int decimalPlaces) {
        return new DisplayConverter() {
            NumberFormat numberFormatter = NumberFormat.getInstance();

            @Override
            public Object canonicalToDisplayValue(Object canonicalValue) {
                if (canonicalValue == null) {
View Full Code Here

    /**
     * Format: String date value using a SimpleDateFormat
     */
    private static IDisplayConverter getDateFormatter() {
        return new DisplayConverter() {
            private final SimpleDateFormat dateFormatter = new SimpleDateFormat(
                    "MM-dd-yy");

            @Override
            public Object canonicalToDisplayValue(Object canonicalValue) {
View Full Code Here

    /**
     * Format: Number as millions (with commas). Convert to int.
     */
    private static IDisplayConverter getMillionsDisplayConverter() {
        return new DisplayConverter() {
            NumberFormat numberFormatter = new DecimalFormat("###,###,###");

            @Override
            public Object canonicalToDisplayValue(Object canonicalValue) {
                if (canonicalValue == null) {
View Full Code Here

         *         {@link Gender#MALE} will be interpreted as <code>true</code>
         *         while {@link Gender#FEMALE} will be interpreted as
         *         <code>false</code>
         */
        private IDisplayConverter getGenderBooleanConverter() {
            return new DisplayConverter() {

                @Override
                public Object canonicalToDisplayValue(Object canonicalValue) {
                    if (canonicalValue instanceof Gender) {
                        return ((Gender) canonicalValue) == Gender.MALE;
View Full Code Here

    /**
     * Format: Items displayed in the Combo &lt;-&gt; Canonical value
     */
    public static IDisplayConverter getDisplayConverter() {
        return new DisplayConverter() {
            public Object canonicalToDisplayValue(Object canonicalValue) {
                if (canonicalValue == null) {
                    return null;
                } else {
                    return canonicalValue.toString().equals("MN") ? "Manual"
View Full Code Here

         *         {@link Gender#MALE} will be interpreted as <code>true</code>
         *         while {@link Gender#FEMALE} will be interpreted as
         *         <code>false</code>
         */
        private IDisplayConverter getGenderBooleanConverter() {
            return new DisplayConverter() {

                @Override
                public Object canonicalToDisplayValue(Object canonicalValue) {
                    if (canonicalValue instanceof Gender) {
                        return ((Gender) canonicalValue) == Gender.MALE;
View Full Code Here

         *         {@link Gender#MALE} will be interpreted as <code>true</code>
         *         while {@link Gender#FEMALE} will be interpreted as
         *         <code>false</code>
         */
        private IDisplayConverter getGenderBooleanConverter() {
            return new DisplayConverter() {

                @Override
                public Object canonicalToDisplayValue(Object canonicalValue) {
                    if (canonicalValue instanceof Gender) {
                        return ((Gender) canonicalValue) == Gender.MALE;
View Full Code Here

         *         {@link Gender#MALE} will be interpreted as <code>true</code>
         *         while {@link Gender#FEMALE} will be interpreted as
         *         <code>false</code>
         */
        private IDisplayConverter getGenderBooleanConverter() {
            return new DisplayConverter() {

                @Override
                public Object canonicalToDisplayValue(Object canonicalValue) {
                    if (canonicalValue instanceof Gender) {
                        return ((Gender) canonicalValue) == Gender.MALE;
View Full Code Here

    /**
     * Format: Items displayed in the Combo &lt;-&gt; Canonical value
     */
    public static IDisplayConverter getDisplayConverter() {
        return new DisplayConverter() {
            public Object canonicalToDisplayValue(Object canonicalValue) {
                if (canonicalValue == null) {
                    return null;
                } else {
                    return canonicalValue.toString().equals("MN") ? "Manual"
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.