|
|
|
|
|
|
|
|
|
|
|
|
|
|
private PropertyPanel properties; |
|
|
private PropertyPanel properties; |
|
|
|
|
|
|
|
|
private Component welcome; |
|
|
|
|
|
|
|
|
|
|
|
private boolean initialized = false; |
|
|
private boolean initialized = false; |
|
|
|
|
|
|
|
|
private Select themeSelector = new Select(); |
|
|
private Select themeSelector = new Select(); |
|
|
|
|
|
|
|
|
private static final String WELCOME_TEXT = "<h3>Welcome to the IT Mill Toolkit feature tour!</h3>" |
|
|
|
|
|
+ "In this application you may view and play with some features of IT Mill Toolkit.<br/>" |
|
|
|
|
|
+ "Most of the features can be tested online and include simple example of their " |
|
|
|
|
|
+ "usage associated with it.<br/><br/>" |
|
|
|
|
|
+ "Start your tour by selecting features from the list on the left.<br/><br/>" |
|
|
|
|
|
+ "For more information, point your browser to: <a href=\"http://www.itmill.com\"" |
|
|
|
|
|
+ " target=\"_new\">www.itmill.com</a>"; |
|
|
|
|
|
|
|
|
|
|
|
public void attach() { |
|
|
public void attach() { |
|
|
|
|
|
|
|
|
if (initialized) |
|
|
if (initialized) |
|
|
|
|
|
|
|
|
left.addComponent(close); |
|
|
left.addComponent(close); |
|
|
|
|
|
|
|
|
// Test component |
|
|
// Test component |
|
|
|
|
|
registerFeature("/Welcome", new IntroWelcome()); |
|
|
registerFeature("/UI Components", new IntroComponents()); |
|
|
registerFeature("/UI Components", new IntroComponents()); |
|
|
registerFeature("/UI Components/Basic", new IntroBasic()); |
|
|
registerFeature("/UI Components/Basic", new IntroBasic()); |
|
|
registerFeature("/UI Components/Basic/Text Field", |
|
|
registerFeature("/UI Components/Basic/Text Field", |
|
|
|
|
|
|
|
|
features.expandItem(i.next()); |
|
|
features.expandItem(i.next()); |
|
|
|
|
|
|
|
|
// Add demo component and tabs |
|
|
// Add demo component and tabs |
|
|
currentFeature = new FeatureTable(); |
|
|
|
|
|
|
|
|
currentFeature = new IntroWelcome(); |
|
|
layout.addComponent(currentFeature); |
|
|
layout.addComponent(currentFeature); |
|
|
|
|
|
|
|
|
// Add properties |
|
|
// Add properties |
|
|
|
|
|
|
|
|
propertiesSelect.setSwitchMode(true); |
|
|
propertiesSelect.setSwitchMode(true); |
|
|
right.addComponent(propertiesSelect); |
|
|
right.addComponent(propertiesSelect); |
|
|
properties = currentFeature.getPropertyPanel(); |
|
|
properties = currentFeature.getPropertyPanel(); |
|
|
properties.setVisible(false); |
|
|
|
|
|
right.addComponent(properties); |
|
|
|
|
|
|
|
|
if (properties != null) { |
|
|
|
|
|
properties.setVisible(false); |
|
|
|
|
|
right.addComponent(properties); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void registerFeature(String path, Feature feature) { |
|
|
public void registerFeature(String path, Feature feature) { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void buttonClick(ClickEvent event) { |
|
|
public void buttonClick(ClickEvent event) { |
|
|
properties.setVisible(((Boolean) propertiesSelect.getValue()) |
|
|
|
|
|
.booleanValue()); |
|
|
|
|
|
|
|
|
if (properties != null) |
|
|
|
|
|
properties.setVisible(((Boolean) propertiesSelect.getValue()) |
|
|
|
|
|
.booleanValue()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |