|
Re: Move the Menu of Desktop into Outline [message #1809894 is a reply to message #1809827] |
Thu, 25 July 2019 11:12 |
|
Hi,
you have several options:
The simplest one would be to use a header menu. Just put this in your outline:
@Order(2000)
public class ProfileHeaderMenu extends AbstractFormMenu {
@Override
protected String getConfiguredIconId() {
return Icons.PersonSolid;
}
@Override
protected Set<? extends IMenuType> getConfiguredMenuTypes() {
return CollectionUtility.hashSet(TreeMenuType.Header);
}
@Override
protected Class getConfiguredForm() {
return UserForm.class;
}
}
You could also create a view button. But unfortunately the view button will change its background-color as soon as it is clicked even though it is not explicitly marked as toggle button. This is probably not what you want. To circumvent it you could override the rule using CSS.
ViewButton in Desktop.java:
@Order(3)
public class ProfileViewButton extends AbstractViewButton {
@Override
protected String getConfiguredIconId() {
return Icons.PersonSolid;
}
@Override
protected DisplayStyle getConfiguredDisplayStyle() {
return DisplayStyle.TAB;
}
@Override
protected void execAction() {
new UserForm().start();
}
}
Another option would be a regular tree node / page. Either open your user form as dialog or use a detail form to embed it.
TreeNode in Outline.java:
pageList.add(new AbstractPageWithNodes() {
@Override
protected String getConfiguredTitle() {
return "Profile";
}
@Override
protected String getConfiguredIconId() {
return Icons.PersonSolid;
}
@Override
protected boolean getConfiguredLeaf() {
return true;
}
@Override
protected void execPageActivated() {
new UserForm().start();
}
});
}
If you wanted to place it on the bottom left corner, then you would need to write some JS code (basically extend DesktopNavigation.js or Outline.js and put the widget there).
Cheers
Claudio
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02502 seconds