Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions core/pv-tango/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.project
/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package org.phoebus.pv.tango;

import java.util.List;

import org.epics.vtype.Display;
import org.epics.vtype.DisplayProvider;
import org.epics.vtype.EnumDisplay;

public class AdvancedEnumDisplay extends EnumDisplay implements DisplayProvider {

private EnumDisplay source ;
private Display display ;

private AdvancedEnumDisplay(Display display,EnumDisplay source) {
this.source = source;
this.display = display;
}

@Override
public List<String> getChoices() {
return source != null ? source.getChoices() : null;
}

@Override
public Display getDisplay() {
return display;
}


/**
* New EnumDisplay with the given choices.
*
* @param choices the enum choices
* @return the new display
*/
public static EnumDisplay of(final Display display, final String... choices) {
EnumDisplay enumDisp = choices != null ? EnumDisplay.of(choices) : null;
return new AdvancedEnumDisplay(display,enumDisp);
}



}
Loading