mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-08 18:30:42 +00:00
rough package structure
This commit is contained in:
parent
e0b3a9165b
commit
836a9b1547
@ -1,20 +1,17 @@
|
|||||||
package edu.kit.typicalc.views.typeinferenceview;
|
package edu.kit.typicalc.view.content.type_inference_content;
|
||||||
|
|
||||||
import com.vaadin.flow.component.button.Button;
|
import com.vaadin.flow.component.button.Button;
|
||||||
import com.vaadin.flow.component.dependency.CssImport;
|
import com.vaadin.flow.component.dependency.CssImport;
|
||||||
import com.vaadin.flow.component.notification.Notification;
|
import com.vaadin.flow.component.notification.Notification;
|
||||||
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
|
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
|
||||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
|
||||||
import com.vaadin.flow.component.textfield.TextField;
|
import com.vaadin.flow.component.textfield.TextField;
|
||||||
import com.vaadin.flow.router.PageTitle;
|
import com.vaadin.flow.router.PageTitle;
|
||||||
import com.vaadin.flow.router.Route;
|
import com.vaadin.flow.router.Route;
|
||||||
import edu.kit.typicalc.views.main.MainView;
|
import edu.kit.typicalc.view.main.MainViewImpl;
|
||||||
import com.vaadin.flow.router.RouteAlias;
|
|
||||||
|
|
||||||
@Route(value = "visualize", layout = MainView.class)
|
@Route(value = "visualize", layout = MainViewImpl.class)
|
||||||
@PageTitle("TypeInferenceView")
|
@PageTitle("TypeInferenceView")
|
||||||
@CssImport("./styles/views/typeinferenceview/type-inference-view-view.css")
|
@CssImport("./styles/views/typeinferenceview/type-inference-view-view.css")
|
||||||
@RouteAlias(value = "", layout = MainView.class)
|
|
||||||
public class TypeInferenceViewView extends HorizontalLayout {
|
public class TypeInferenceViewView extends HorizontalLayout {
|
||||||
|
|
||||||
private TextField name;
|
private TextField name;
|
||||||
@ -27,7 +24,7 @@ public class TypeInferenceViewView extends HorizontalLayout {
|
|||||||
add(name, sayHello);
|
add(name, sayHello);
|
||||||
setVerticalComponentAlignment(Alignment.END, name, sayHello);
|
setVerticalComponentAlignment(Alignment.END, name, sayHello);
|
||||||
sayHello.addClickListener(e -> {
|
sayHello.addClickListener(e -> {
|
||||||
Notification.show("Hello " + name.getValue());
|
Notification.show("Hello, test " + name.getValue());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
package edu.kit.typicalc.view.info_content;
|
||||||
|
|
||||||
|
import com.vaadin.flow.component.button.Button;
|
||||||
|
import com.vaadin.flow.component.dependency.CssImport;
|
||||||
|
import com.vaadin.flow.component.notification.Notification;
|
||||||
|
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||||
|
import com.vaadin.flow.component.textfield.TextField;
|
||||||
|
import com.vaadin.flow.router.PageTitle;
|
||||||
|
import com.vaadin.flow.router.Route;
|
||||||
|
import com.vaadin.flow.router.RouteAlias;
|
||||||
|
import edu.kit.typicalc.view.main.MainViewImpl;
|
||||||
|
|
||||||
|
@Route(value = "home", layout = MainViewImpl.class)
|
||||||
|
@PageTitle("Typicalc")
|
||||||
|
@CssImport("./styles/views/typeinferenceview/type-inference-view-view.css")
|
||||||
|
@RouteAlias(value = "", layout = MainViewImpl.class)
|
||||||
|
public class StartPageView extends VerticalLayout {
|
||||||
|
|
||||||
|
private TextField name;
|
||||||
|
private Button sayHello;
|
||||||
|
|
||||||
|
public StartPageView() {
|
||||||
|
setId("start-page");
|
||||||
|
name = new TextField("Your name");
|
||||||
|
sayHello = new Button("Say hello");
|
||||||
|
add(name, sayHello);
|
||||||
|
sayHello.addClickListener(e -> {
|
||||||
|
Notification.show("Hello " + name.getValue());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,6 +1,4 @@
|
|||||||
package edu.kit.typicalc.views.main;
|
package edu.kit.typicalc.view.main;
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
import com.vaadin.flow.component.Component;
|
import com.vaadin.flow.component.Component;
|
||||||
import com.vaadin.flow.component.ComponentUtil;
|
import com.vaadin.flow.component.ComponentUtil;
|
||||||
@ -9,8 +7,8 @@ import com.vaadin.flow.component.applayout.DrawerToggle;
|
|||||||
import com.vaadin.flow.component.avatar.Avatar;
|
import com.vaadin.flow.component.avatar.Avatar;
|
||||||
import com.vaadin.flow.component.dependency.CssImport;
|
import com.vaadin.flow.component.dependency.CssImport;
|
||||||
import com.vaadin.flow.component.dependency.JsModule;
|
import com.vaadin.flow.component.dependency.JsModule;
|
||||||
import com.vaadin.flow.component.html.Image;
|
|
||||||
import com.vaadin.flow.component.html.H1;
|
import com.vaadin.flow.component.html.H1;
|
||||||
|
import com.vaadin.flow.component.html.Image;
|
||||||
import com.vaadin.flow.component.orderedlayout.FlexComponent;
|
import com.vaadin.flow.component.orderedlayout.FlexComponent;
|
||||||
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
|
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
|
||||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||||
@ -19,23 +17,22 @@ import com.vaadin.flow.component.tabs.Tabs;
|
|||||||
import com.vaadin.flow.component.tabs.TabsVariant;
|
import com.vaadin.flow.component.tabs.TabsVariant;
|
||||||
import com.vaadin.flow.router.PageTitle;
|
import com.vaadin.flow.router.PageTitle;
|
||||||
import com.vaadin.flow.router.RouterLink;
|
import com.vaadin.flow.router.RouterLink;
|
||||||
import com.vaadin.flow.server.PWA;
|
import edu.kit.typicalc.view.content.type_inference_content.TypeInferenceViewView;
|
||||||
import com.vaadin.flow.theme.Theme;
|
|
||||||
import edu.kit.typicalc.views.main.MainView;
|
import java.util.Optional;
|
||||||
import edu.kit.typicalc.views.typeinferenceview.TypeInferenceViewView;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main view is a top-level placeholder for other views.
|
* The main view is a top-level placeholder for other views.
|
||||||
*/
|
*/
|
||||||
@CssImport("./styles/views/main/main-view.css")
|
@CssImport("./styles/views/main/main-view.css")
|
||||||
@JsModule("./styles/shared-styles.js")
|
@JsModule("./styles/shared-styles.js")
|
||||||
public class MainView extends AppLayout {
|
public class MainViewImpl extends AppLayout {
|
||||||
|
|
||||||
private final Tabs menu;
|
private final Tabs menu;
|
||||||
private H1 viewTitle;
|
private H1 viewTitle;
|
||||||
|
|
||||||
public MainView() {
|
public MainViewImpl() {
|
||||||
setPrimarySection(Section.DRAWER);
|
setDrawerOpened(false);
|
||||||
addToNavbar(true, createHeaderContent());
|
addToNavbar(true, createHeaderContent());
|
||||||
menu = createMenu();
|
menu = createMenu();
|
||||||
addToDrawer(createDrawerContent(menu));
|
addToDrawer(createDrawerContent(menu));
|
Loading…
Reference in New Issue
Block a user