001package jmri.jmrit.logixng.tools.debugger; 002 003import java.util.Set; 004 005import jmri.JmriException; 006import jmri.NamedBean; 007import jmri.jmrit.logixng.BaseManager; 008import jmri.jmrit.logixng.MaleAnalogActionSocket; 009 010/** 011 * 012 * @author daniel 013 */ 014public class DebuggerMaleAnalogActionSocket extends AbstractDebuggerMaleSocket implements MaleAnalogActionSocket { 015 016 double _nextValue; 017 018 public DebuggerMaleAnalogActionSocket(BaseManager<MaleAnalogActionSocket> manager, MaleAnalogActionSocket maleSocket) { 019 super(manager, maleSocket); 020 } 021 022 /** {@inheritDoc} */ 023 @Override 024 public String getBeforeInfo() { 025 return Bundle.getMessage("AnalogAction_InfoBefore", _nextValue); 026 } 027 028 /** {@inheritDoc} */ 029 @Override 030 public String getAfterInfo() { 031 return Bundle.getMessage("AnalogAction_InfoAfter"); 032 } 033 034 @Override 035 public void setValue(double value) throws JmriException { 036 _nextValue = value; 037 before(); 038 ((MaleAnalogActionSocket)getObject()).setValue(_nextValue); 039 after(); 040 } 041 042 @Override 043 public void setState(int s) throws JmriException { 044 ((MaleAnalogActionSocket)getObject()).setState(s); 045 } 046 047 @Override 048 public int getState() { 049 return ((MaleAnalogActionSocket)getObject()).getState(); 050 } 051 052 @Override 053 public String describeState(int state) { 054 return ((MaleAnalogActionSocket)getObject()).describeState(state); 055 } 056 057 @Override 058 public void setProperty(String key, Object value) { 059 ((MaleAnalogActionSocket)getObject()).setProperty(key, value); 060 } 061 062 @Override 063 public Object getProperty(String key) { 064 return ((MaleAnalogActionSocket)getObject()).getProperty(key); 065 } 066 067 @Override 068 public void removeProperty(String key) { 069 ((MaleAnalogActionSocket)getObject()).removeProperty(key); 070 } 071 072 @Override 073 public Set<String> getPropertyKeys() { 074 return ((MaleAnalogActionSocket)getObject()).getPropertyKeys(); 075 } 076 077 @Override 078 public String getBeanType() { 079 return ((MaleAnalogActionSocket)getObject()).getBeanType(); 080 } 081 082 @Override 083 public int compareSystemNameSuffix(String suffix1, String suffix2, NamedBean n2) { 084 return ((MaleAnalogActionSocket)getObject()).compareSystemNameSuffix(suffix1, suffix2, n2); 085 } 086 087}