All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pesegato.mermaid.PAbstractProperty Maven / Gradle / Ivy

The newest version!
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.pesegato.mermaid;

import com.pesegato.mermaid.PPropertyPanel.Access;
import com.pesegato.mermaid.PPropertyPanel.Property;
import com.simsilica.lemur.Container;

/**
 *
 * @author Pesegato
 */
public abstract class PAbstractProperty  implements Property {
        private String name;
        private Access access;
        
        protected PAbstractProperty( String name, Access access ) {            
            this.name = name;
            this.access = access;
        }
 
        protected String getDisplayName() {
            return name;
        }
 
        @Override
        public void setValue( T value ) {
            access.setValue(value);
        }
        
        @Override
        public T getValue() {
            return access.getValue();
        }
 
        public abstract void initialize( Container container );
    
        public abstract void update();
        
        public abstract void refresh(); 
    }    




© 2015 - 2024 Weber Informatics LLC | Privacy Policy