我有以下代码:
@ParticleView(isDefault=true, name="login")
public class LoginView extends FXMLView {
public LoginView() {
super(LoginView.class.getResource("login.fxml"));
}
@Override
public void start() {
((LoginController) getController()).postInit();
}
@Override
public void stop() {
((LoginController) getController()).dispose();
}
}
控制器相关代码为:
public class LoginController {
@Inject
ParticleApplication app;
@Inject
private ViewManager viewManager;
@Inject
private StateManager stateManager;
@Inject
private MenuBar menuBar;
@Inject
private ToolBar toolBar;
@Inject
private StatusBar statusBar;
@FXML
private TextField txfUsuario;
@FXML
private PasswordField txfPassword;
public void initialize() {
ActionMap.register(this);
}
public void postInit() {
app.setShowCloseConfirmation(false);
toolBar.setVisible(false);
menuBar.setVisible(false);
}
}
菜单栏不可见(但空间仍然存在),但工具栏仍然可见。
有什么建议吗?