SlideShare a Scribd company logo
1 of 15
Download to read offline
Initial UI Mockup - Part II
public class BaseNavigationForm extends Form {
public BaseNavigationForm(AppSettings app, Layout l) {
super(app.name.get(), l);
init(app);
}
private void init(AppSettings app) {
Toolbar tb = getToolbar();
tb.addMaterialCommandToSideMenu("Dishes", FontImage.MATERIAL_RESTAURANT_MENU,
e -> new DishListForm(app).show());
tb.addMaterialCommandToSideMenu("Details", FontImage.MATERIAL_DESCRIPTION,
e -> new DetailsForm(app).show());
tb.addMaterialCommandToSideMenu("Billing", FontImage.MATERIAL_CREDIT_CARD, e -> {});
tb.addMaterialCommandToSideMenu("App", FontImage.MATERIAL_PHONE_IPHONE,
e -> new AppForm(app).show());
TextField title = new TextField(app.name.get());
title.setUIID("NavigationTitle");
TextField tagline = new TextField(app.tagline.get());
tagline.setUIID("Tagline");
BaseNavigationForm
Commands
Side menu navigation
commands common to the
top level form
public class BaseNavigationForm extends Form {
public BaseNavigationForm(AppSettings app, Layout l) {
super(app.name.get(), l);
init(app);
}
private void init(AppSettings app) {
Toolbar tb = getToolbar();
tb.addMaterialCommandToSideMenu("Dishes", FontImage.MATERIAL_RESTAURANT_MENU,
e -> new DishListForm(app).show());
tb.addMaterialCommandToSideMenu("Details", FontImage.MATERIAL_DESCRIPTION,
e -> new DetailsForm(app).show());
tb.addMaterialCommandToSideMenu("Billing", FontImage.MATERIAL_CREDIT_CARD, e -> {});
tb.addMaterialCommandToSideMenu("App", FontImage.MATERIAL_PHONE_IPHONE,
e -> new AppForm(app).show());
TextField title = new TextField(app.name.get());
title.setUIID("NavigationTitle");
TextField tagline = new TextField(app.tagline.get());
tagline.setUIID("Tagline");
BaseNavigationForm
UIID
0 Margin
1mm Padding
White 5mm thin font
Left alignment
public class BaseNavigationForm extends Form {
public BaseNavigationForm(AppSettings app, Layout l) {
super(app.name.get(), l);
init(app);
}
private void init(AppSettings app) {
Toolbar tb = getToolbar();
tb.addMaterialCommandToSideMenu("Dishes", FontImage.MATERIAL_RESTAURANT_MENU,
e -> new DishListForm(app).show());
tb.addMaterialCommandToSideMenu("Details", FontImage.MATERIAL_DESCRIPTION,
e -> new DetailsForm(app).show());
tb.addMaterialCommandToSideMenu("Billing", FontImage.MATERIAL_CREDIT_CARD, e -> {});
tb.addMaterialCommandToSideMenu("App", FontImage.MATERIAL_PHONE_IPHONE,
e -> new AppForm(app).show());
TextField title = new TextField(app.name.get());
title.setUIID("NavigationTitle");
TextField tagline = new TextField(app.tagline.get());
tagline.setUIID("Tagline");
BaseNavigationForm
UIID
Derive NavigationTitle
3mm font
public class BaseNavigationForm extends Form {
public BaseNavigationForm(AppSettings app, Layout l) {
super(app.name.get(), l);
init(app);
}
private void init(AppSettings app) {
Toolbar tb = getToolbar();
tb.addMaterialCommandToSideMenu("Dishes", FontImage.MATERIAL_RESTAURANT_MENU,
e -> new DishListForm(app).show());
tb.addMaterialCommandToSideMenu("Details", FontImage.MATERIAL_DESCRIPTION,
e -> new DetailsForm(app).show());
tb.addMaterialCommandToSideMenu("Billing", FontImage.MATERIAL_CREDIT_CARD, e -> {});
tb.addMaterialCommandToSideMenu("App", FontImage.MATERIAL_PHONE_IPHONE,
e -> new AppForm(app).show());
TextField title = new TextField(app.name.get());
title.setUIID("NavigationTitle");
TextField tagline = new TextField(app.tagline.get());
tagline.setUIID("Tagline");
BaseNavigationForm
Button editBackground = new Button("Edit Background", "EditBackground");
int size = Display.getInstance().convertToPixels(10);
Button logoImage = new Button("", app.getRoundedScaledLogo(), "Container");
Container titleContainer = BoxLayout.encloseY(
title,
tagline,
FlowLayout.encloseCenterMiddle(logoImage));
Button menu = new Button("", "NavigationTitle");
Button preview = new Button("", "NavigationTitle");
FontImage.setMaterialIcon(menu, FontImage.MATERIAL_MENU);
FontImage.setMaterialIcon(preview, FontImage.MATERIAL_PLAY_ARROW);
Container titleWithCommands = BorderLayout.centerEastWest(
titleContainer,
FlowLayout.encloseCenter(preview),
FlowLayout.encloseCenter(menu));
menu.addActionListener(e -> tb.openSideMenu());
ScaleImageLabel sl = new ScaleImageLabel(app.titleBackground.get());
sl.setUIID("TitleBottomSpace");
sl.setBackgroundType(Style.BACKGROUND_IMAGE_SCALED_FILL);
if(super.shouldPaintStatusBar()) {
titleWithCommands.getUnselectedStyle().setPaddingUnit(Style.UNIT_TYPE_DIPS);
titleWithCommands.getUnselectedStyle().setPaddingTop(3);
}
tb.setTitleComponent(LayeredLayout.encloseIn(sl,
BorderLayout.south(editBackground), titleWithCommands));
}
BaseNavigationForm
UIID
0 Margin top/right/left
4mm bottom margin
0 Padding
Derive NavigationTitle
Right alignment
thin 2.5mm font
Button editBackground = new Button("Edit Background", "EditBackground");
int size = Display.getInstance().convertToPixels(10);
Button logoImage = new Button("", app.getRoundedScaledLogo(), "Container");
Container titleContainer = BoxLayout.encloseY(
title,
tagline,
FlowLayout.encloseCenterMiddle(logoImage));
Button menu = new Button("", "NavigationTitle");
Button preview = new Button("", "NavigationTitle");
FontImage.setMaterialIcon(menu, FontImage.MATERIAL_MENU);
FontImage.setMaterialIcon(preview, FontImage.MATERIAL_PLAY_ARROW);
Container titleWithCommands = BorderLayout.centerEastWest(
titleContainer,
FlowLayout.encloseCenter(preview),
FlowLayout.encloseCenter(menu));
menu.addActionListener(e -> tb.openSideMenu());
ScaleImageLabel sl = new ScaleImageLabel(app.titleBackground.get());
sl.setUIID("TitleBottomSpace");
sl.setBackgroundType(Style.BACKGROUND_IMAGE_SCALED_FILL);
if(super.shouldPaintStatusBar()) {
titleWithCommands.getUnselectedStyle().setPaddingUnit(Style.UNIT_TYPE_DIPS);
titleWithCommands.getUnselectedStyle().setPaddingTop(3);
}
tb.setTitleComponent(LayeredLayout.encloseIn(sl,
BorderLayout.south(editBackground), titleWithCommands));
}
BaseNavigationForm
UIID
0 padding sides
1mm padding top/bottom
4mm bottom
Button editBackground = new Button("Edit Background", "EditBackground");
int size = Display.getInstance().convertToPixels(10);
Button logoImage = new Button("", app.getRoundedScaledLogo(), "Container");
Container titleContainer = BoxLayout.encloseY(
title,
tagline,
FlowLayout.encloseCenterMiddle(logoImage));
Button menu = new Button("", "NavigationTitle");
Button preview = new Button("", "NavigationTitle");
FontImage.setMaterialIcon(menu, FontImage.MATERIAL_MENU);
FontImage.setMaterialIcon(preview, FontImage.MATERIAL_PLAY_ARROW);
Container titleWithCommands = BorderLayout.centerEastWest(
titleContainer,
FlowLayout.encloseCenter(preview),
FlowLayout.encloseCenter(menu));
menu.addActionListener(e -> tb.openSideMenu());
ScaleImageLabel sl = new ScaleImageLabel(app.titleBackground.get());
sl.setUIID("TitleBottomSpace");
sl.setBackgroundType(Style.BACKGROUND_IMAGE_SCALED_FILL);
if(super.shouldPaintStatusBar()) {
titleWithCommands.getUnselectedStyle().setPaddingUnit(Style.UNIT_TYPE_DIPS);
titleWithCommands.getUnselectedStyle().setPaddingTop(3);
}
tb.setTitleComponent(LayeredLayout.encloseIn(sl,
BorderLayout.south(editBackground), titleWithCommands));
}
BaseNavigationForm
public class AppSettings implements PropertyBusinessObject {
public final Property<String, AppSettings> name = new Property<>("name", "My Restaurant");
public final Property<String, AppSettings> tagline = new Property<>("tagline", "The place to eat");
public final Property<Image, AppSettings> titleBackground = new Property<>("titleBackground", null);
private Image roundedScaledLogo;
private final PropertyIndex idx = new PropertyIndex(this, "AppSettings", name, tagline, logo,
titleBackground);
@Override
public PropertyIndex getPropertyIndex() {
return idx;
}
public Image getRoundedScaledLogo() {
return roundedScaledLogo;
}
AppSettings
public final Property<Image, AppSettings> logo = new Property<Image, AppSettings>("logo", null) {
public AppSettings set(Image value) {
if(value != null) {
int mm = Display.getInstance().convertToPixels(2f);
int size = Display.getInstance().convertToPixels(11);
GeneralPath gp = new GeneralPath();
float widthF = size; float heightF = size;
gp.moveTo(x + mm, 0);
gp.lineTo(x + widthF - mm, 0);
gp.quadTo(x + widthF, 0, widthF, mm);
gp.lineTo(x + widthF, heightF - mm);
gp.quadTo(x + widthF, heightF, x + widthF - mm, heightF);
gp.lineTo(x + mm, heightF);
gp.quadTo(x, heightF, 0, heightF - radius);
gp.lineTo(x, mm);
gp.quadTo(x, 0, mm, 0);
gp.closePath();
Image mask = Image.createImage(size, size, 0xff000000);
Graphics g = mask.getGraphics();
g.setColor(0xffffff);
g.setAntiAliased(true);
g.fillShape(gp);
Object m = mask.createMask();
roundedScaledLogo = value.fill(size, size).applyMask(m);
}
return super.set(value);
}
};
AppSettings
public final Property<Image, AppSettings> logo = new Property<Image, AppSettings>("logo", null) {
public AppSettings set(Image value) {
if(value != null) {
int mm = Display.getInstance().convertToPixels(2f);
int size = Display.getInstance().convertToPixels(11);
GeneralPath gp = new GeneralPath();
float widthF = size; float heightF = size;
gp.moveTo(x + mm, 0);
gp.lineTo(x + widthF - mm, 0);
gp.quadTo(x + widthF, 0, widthF, mm);
gp.lineTo(x + widthF, heightF - mm);
gp.quadTo(x + widthF, heightF, x + widthF - mm, heightF);
gp.lineTo(x + mm, heightF);
gp.quadTo(x, heightF, 0, heightF - radius);
gp.lineTo(x, mm);
gp.quadTo(x, 0, mm, 0);
gp.closePath();
Image mask = Image.createImage(size, size, 0xff000000);
Graphics g = mask.getGraphics();
g.setColor(0xffffff);
g.setAntiAliased(true);
g.fillShape(gp);
Object m = mask.createMask();
roundedScaledLogo = value.fill(size, size).applyMask(m);
}
return super.set(value);
}
};
AppSettings
public final Property<Image, AppSettings> logo = new Property<Image, AppSettings>("logo", null) {
public AppSettings set(Image value) {
if(value != null) {
int mm = Display.getInstance().convertToPixels(2f);
int size = Display.getInstance().convertToPixels(11);
GeneralPath gp = new GeneralPath();
float widthF = size; float heightF = size;
gp.moveTo(x + mm, 0);
gp.lineTo(x + widthF - mm, 0);
gp.quadTo(x + widthF, 0, widthF, mm);
gp.lineTo(x + widthF, heightF - mm);
gp.quadTo(x + widthF, heightF, x + widthF - mm, heightF);
gp.lineTo(x + mm, heightF);
gp.quadTo(x, heightF, 0, heightF - radius);
gp.lineTo(x, mm);
gp.quadTo(x, 0, mm, 0);
gp.closePath();
Image mask = Image.createImage(size, size, 0xff000000);
Graphics g = mask.getGraphics();
g.setColor(0xffffff);
g.setAntiAliased(true);
g.fillShape(gp);
Object m = mask.createMask();
roundedScaledLogo = value.fill(size, size).applyMask(m);
}
return super.set(value);
}
};
AppSettings
public final Property<Image, AppSettings> logo = new Property<Image, AppSettings>("logo", null) {
public AppSettings set(Image value) {
if(value != null) {
int mm = Display.getInstance().convertToPixels(2f);
int size = Display.getInstance().convertToPixels(11);
GeneralPath gp = new GeneralPath();
float widthF = size; float heightF = size;
gp.moveTo(x + mm, 0);
gp.lineTo(x + widthF - mm, 0);
gp.quadTo(x + widthF, 0, widthF, mm);
gp.lineTo(x + widthF, heightF - mm);
gp.quadTo(x + widthF, heightF, x + widthF - mm, heightF);
gp.lineTo(x + mm, heightF);
gp.quadTo(x, heightF, 0, heightF - radius);
gp.lineTo(x, mm);
gp.quadTo(x, 0, mm, 0);
gp.closePath();
Image mask = Image.createImage(size, size, 0xff000000);
Graphics g = mask.getGraphics();
g.setColor(0xffffff);
g.setAntiAliased(true);
g.fillShape(gp);
Object m = mask.createMask();
roundedScaledLogo = value.fill(size, size).applyMask(m);
}
return super.set(value);
}
};
AppSettings
public final Property<Image, AppSettings> logo = new Property<Image, AppSettings>("logo", null) {
public AppSettings set(Image value) {
if(value != null) {
int mm = Display.getInstance().convertToPixels(2f);
int size = Display.getInstance().convertToPixels(11);
GeneralPath gp = new GeneralPath();
float widthF = size; float heightF = size;
gp.moveTo(x + mm, 0);
gp.lineTo(x + widthF - mm, 0);
gp.quadTo(x + widthF, 0, widthF, mm);
gp.lineTo(x + widthF, heightF - mm);
gp.quadTo(x + widthF, heightF, x + widthF - mm, heightF);
gp.lineTo(x + mm, heightF);
gp.quadTo(x, heightF, 0, heightF - radius);
gp.lineTo(x, mm);
gp.quadTo(x, 0, mm, 0);
gp.closePath();
Image mask = Image.createImage(size, size, 0xff000000);
Graphics g = mask.getGraphics();
g.setColor(0xffffff);
g.setAntiAliased(true);
g.fillShape(gp);
Object m = mask.createMask();
roundedScaledLogo = value.fill(size, size).applyMask(m);
}
return super.set(value);
}
};
AppSettings
public final Property<Image, AppSettings> logo = new Property<Image, AppSettings>("logo", null) {
public AppSettings set(Image value) {
if(value != null) {
int mm = Display.getInstance().convertToPixels(2f);
int size = Display.getInstance().convertToPixels(11);
GeneralPath gp = new GeneralPath();
float widthF = size; float heightF = size;
gp.moveTo(x + mm, 0);
gp.lineTo(x + widthF - mm, 0);
gp.quadTo(x + widthF, 0, widthF, mm);
gp.lineTo(x + widthF, heightF - mm);
gp.quadTo(x + widthF, heightF, x + widthF - mm, heightF);
gp.lineTo(x + mm, heightF);
gp.quadTo(x, heightF, 0, heightF - radius);
gp.lineTo(x, mm);
gp.quadTo(x, 0, mm, 0);
gp.closePath();
Image mask = Image.createImage(size, size, 0xff000000);
Graphics g = mask.getGraphics();
g.setColor(0xffffff);
g.setAntiAliased(true);
g.fillShape(gp);
Object m = mask.createMask();
roundedScaledLogo = value.fill(size, size).applyMask(m);
}
return super.set(value);
}
};
AppSettings

More Related Content

Similar to Initial UI Mockup - Part 2.pdf

Advancing the UI — Part 1: Look, Motion, and Gestures
Advancing the UI — Part 1: Look, Motion, and GesturesAdvancing the UI — Part 1: Look, Motion, and Gestures
Advancing the UI — Part 1: Look, Motion, and GesturesSamsung Developers
 
Creating an Uber Clone - Part V.pdf
Creating an Uber Clone - Part V.pdfCreating an Uber Clone - Part V.pdf
Creating an Uber Clone - Part V.pdfShaiAlmog1
 
Initial UI Mockup - Part 3 - Transcript.pdf
Initial UI Mockup - Part 3 - Transcript.pdfInitial UI Mockup - Part 3 - Transcript.pdf
Initial UI Mockup - Part 3 - Transcript.pdfShaiAlmog1
 
Creating a Facebook Clone - Part XLI.pdf
Creating a Facebook Clone - Part XLI.pdfCreating a Facebook Clone - Part XLI.pdf
Creating a Facebook Clone - Part XLI.pdfShaiAlmog1
 
Creating an Uber Clone - Part X.pdf
Creating an Uber Clone - Part X.pdfCreating an Uber Clone - Part X.pdf
Creating an Uber Clone - Part X.pdfShaiAlmog1
 
Miscellaneous Features - Part 1.pdf
Miscellaneous Features - Part 1.pdfMiscellaneous Features - Part 1.pdf
Miscellaneous Features - Part 1.pdfShaiAlmog1
 
Extracting ui Design - part 6 - transcript.pdf
Extracting ui Design - part 6 - transcript.pdfExtracting ui Design - part 6 - transcript.pdf
Extracting ui Design - part 6 - transcript.pdfShaiAlmog1
 
Extracting ui Design - part 5 - transcript.pdf
Extracting ui Design - part 5 - transcript.pdfExtracting ui Design - part 5 - transcript.pdf
Extracting ui Design - part 5 - transcript.pdfShaiAlmog1
 
Creating a Facebook Clone - Part XVI.pdf
Creating a Facebook Clone - Part XVI.pdfCreating a Facebook Clone - Part XVI.pdf
Creating a Facebook Clone - Part XVI.pdfShaiAlmog1
 
Creating an Uber Clone - Part XXXX.pdf
Creating an Uber Clone - Part XXXX.pdfCreating an Uber Clone - Part XXXX.pdf
Creating an Uber Clone - Part XXXX.pdfShaiAlmog1
 
Creating an Uber Clone - Part IX.pdf
Creating an Uber Clone - Part IX.pdfCreating an Uber Clone - Part IX.pdf
Creating an Uber Clone - Part IX.pdfShaiAlmog1
 
google play service 7.8 & new tech in M
google play service 7.8 & new tech in M google play service 7.8 & new tech in M
google play service 7.8 & new tech in M Ted Liang
 
Miscellaneous Features - Part 2 - Transcript.pdf
Miscellaneous Features - Part 2 - Transcript.pdfMiscellaneous Features - Part 2 - Transcript.pdf
Miscellaneous Features - Part 2 - Transcript.pdfShaiAlmog1
 
mobl: Een DSL voor mobiele applicatieontwikkeling
mobl: Een DSL voor mobiele applicatieontwikkelingmobl: Een DSL voor mobiele applicatieontwikkeling
mobl: Een DSL voor mobiele applicatieontwikkelingDevnology
 
Creating a Facebook Clone - Part XVI - Transcript.pdf
Creating a Facebook Clone - Part XVI - Transcript.pdfCreating a Facebook Clone - Part XVI - Transcript.pdf
Creating a Facebook Clone - Part XVI - Transcript.pdfShaiAlmog1
 
Creating a Facebook Clone - Part XLI - Transcript.pdf
Creating a Facebook Clone - Part XLI - Transcript.pdfCreating a Facebook Clone - Part XLI - Transcript.pdf
Creating a Facebook Clone - Part XLI - Transcript.pdfShaiAlmog1
 
Creating an Uber Clone - Part VII.pdf
Creating an Uber Clone - Part VII.pdfCreating an Uber Clone - Part VII.pdf
Creating an Uber Clone - Part VII.pdfShaiAlmog1
 
Creating a Facebook Clone - Part VII.pdf
Creating a Facebook Clone - Part VII.pdfCreating a Facebook Clone - Part VII.pdf
Creating a Facebook Clone - Part VII.pdfShaiAlmog1
 
UI Design From Scratch - Part 5 - transcript.pdf
UI Design From Scratch - Part 5 - transcript.pdfUI Design From Scratch - Part 5 - transcript.pdf
UI Design From Scratch - Part 5 - transcript.pdfShaiAlmog1
 

Similar to Initial UI Mockup - Part 2.pdf (20)

Advancing the UI — Part 1: Look, Motion, and Gestures
Advancing the UI — Part 1: Look, Motion, and GesturesAdvancing the UI — Part 1: Look, Motion, and Gestures
Advancing the UI — Part 1: Look, Motion, and Gestures
 
Creating an Uber Clone - Part V.pdf
Creating an Uber Clone - Part V.pdfCreating an Uber Clone - Part V.pdf
Creating an Uber Clone - Part V.pdf
 
Initial UI Mockup - Part 3 - Transcript.pdf
Initial UI Mockup - Part 3 - Transcript.pdfInitial UI Mockup - Part 3 - Transcript.pdf
Initial UI Mockup - Part 3 - Transcript.pdf
 
Creating a Facebook Clone - Part XLI.pdf
Creating a Facebook Clone - Part XLI.pdfCreating a Facebook Clone - Part XLI.pdf
Creating a Facebook Clone - Part XLI.pdf
 
Creating an Uber Clone - Part X.pdf
Creating an Uber Clone - Part X.pdfCreating an Uber Clone - Part X.pdf
Creating an Uber Clone - Part X.pdf
 
Miscellaneous Features - Part 1.pdf
Miscellaneous Features - Part 1.pdfMiscellaneous Features - Part 1.pdf
Miscellaneous Features - Part 1.pdf
 
Extracting ui Design - part 6 - transcript.pdf
Extracting ui Design - part 6 - transcript.pdfExtracting ui Design - part 6 - transcript.pdf
Extracting ui Design - part 6 - transcript.pdf
 
Extracting ui Design - part 5 - transcript.pdf
Extracting ui Design - part 5 - transcript.pdfExtracting ui Design - part 5 - transcript.pdf
Extracting ui Design - part 5 - transcript.pdf
 
Creating a Facebook Clone - Part XVI.pdf
Creating a Facebook Clone - Part XVI.pdfCreating a Facebook Clone - Part XVI.pdf
Creating a Facebook Clone - Part XVI.pdf
 
Creating an Uber Clone - Part XXXX.pdf
Creating an Uber Clone - Part XXXX.pdfCreating an Uber Clone - Part XXXX.pdf
Creating an Uber Clone - Part XXXX.pdf
 
Creating an Uber Clone - Part IX.pdf
Creating an Uber Clone - Part IX.pdfCreating an Uber Clone - Part IX.pdf
Creating an Uber Clone - Part IX.pdf
 
google play service 7.8 & new tech in M
google play service 7.8 & new tech in M google play service 7.8 & new tech in M
google play service 7.8 & new tech in M
 
Miscellaneous Features - Part 2 - Transcript.pdf
Miscellaneous Features - Part 2 - Transcript.pdfMiscellaneous Features - Part 2 - Transcript.pdf
Miscellaneous Features - Part 2 - Transcript.pdf
 
Applications
ApplicationsApplications
Applications
 
mobl: Een DSL voor mobiele applicatieontwikkeling
mobl: Een DSL voor mobiele applicatieontwikkelingmobl: Een DSL voor mobiele applicatieontwikkeling
mobl: Een DSL voor mobiele applicatieontwikkeling
 
Creating a Facebook Clone - Part XVI - Transcript.pdf
Creating a Facebook Clone - Part XVI - Transcript.pdfCreating a Facebook Clone - Part XVI - Transcript.pdf
Creating a Facebook Clone - Part XVI - Transcript.pdf
 
Creating a Facebook Clone - Part XLI - Transcript.pdf
Creating a Facebook Clone - Part XLI - Transcript.pdfCreating a Facebook Clone - Part XLI - Transcript.pdf
Creating a Facebook Clone - Part XLI - Transcript.pdf
 
Creating an Uber Clone - Part VII.pdf
Creating an Uber Clone - Part VII.pdfCreating an Uber Clone - Part VII.pdf
Creating an Uber Clone - Part VII.pdf
 
Creating a Facebook Clone - Part VII.pdf
Creating a Facebook Clone - Part VII.pdfCreating a Facebook Clone - Part VII.pdf
Creating a Facebook Clone - Part VII.pdf
 
UI Design From Scratch - Part 5 - transcript.pdf
UI Design From Scratch - Part 5 - transcript.pdfUI Design From Scratch - Part 5 - transcript.pdf
UI Design From Scratch - Part 5 - transcript.pdf
 

More from ShaiAlmog1

The Duck Teaches Learn to debug from the masters. Local to production- kill ...
The Duck Teaches  Learn to debug from the masters. Local to production- kill ...The Duck Teaches  Learn to debug from the masters. Local to production- kill ...
The Duck Teaches Learn to debug from the masters. Local to production- kill ...ShaiAlmog1
 
create-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdfcreate-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdfShaiAlmog1
 
create-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdfcreate-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdfShaiAlmog1
 
create-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdfcreate-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdfShaiAlmog1
 
create-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdfcreate-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdfShaiAlmog1
 
create-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfcreate-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfShaiAlmog1
 
create-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdfcreate-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdfShaiAlmog1
 
create-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfcreate-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfShaiAlmog1
 
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfcreate-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfShaiAlmog1
 
create-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdfcreate-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdfShaiAlmog1
 
create-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdfcreate-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdfShaiAlmog1
 
create-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfcreate-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfShaiAlmog1
 
create-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfcreate-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfCreating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdfCreating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdfCreating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdfCreating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdfCreating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdfCreating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdfCreating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdfShaiAlmog1
 

More from ShaiAlmog1 (20)

The Duck Teaches Learn to debug from the masters. Local to production- kill ...
The Duck Teaches  Learn to debug from the masters. Local to production- kill ...The Duck Teaches  Learn to debug from the masters. Local to production- kill ...
The Duck Teaches Learn to debug from the masters. Local to production- kill ...
 
create-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdfcreate-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdf
 
create-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdfcreate-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdf
 
create-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdfcreate-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdf
 
create-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdfcreate-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdf
 
create-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfcreate-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdf
 
create-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdfcreate-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdf
 
create-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfcreate-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdf
 
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfcreate-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdf
 
create-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdfcreate-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdf
 
create-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdfcreate-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdf
 
create-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfcreate-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdf
 
create-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfcreate-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdf
 
Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfCreating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdf
 
Creating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdfCreating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdf
 
Creating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdfCreating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdf
 
Creating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdfCreating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdf
 
Creating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdfCreating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdf
 
Creating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdfCreating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdf
 
Creating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdfCreating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdf
 

Recently uploaded

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Recently uploaded (20)

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

Initial UI Mockup - Part 2.pdf

  • 1. Initial UI Mockup - Part II
  • 2. public class BaseNavigationForm extends Form { public BaseNavigationForm(AppSettings app, Layout l) { super(app.name.get(), l); init(app); } private void init(AppSettings app) { Toolbar tb = getToolbar(); tb.addMaterialCommandToSideMenu("Dishes", FontImage.MATERIAL_RESTAURANT_MENU, e -> new DishListForm(app).show()); tb.addMaterialCommandToSideMenu("Details", FontImage.MATERIAL_DESCRIPTION, e -> new DetailsForm(app).show()); tb.addMaterialCommandToSideMenu("Billing", FontImage.MATERIAL_CREDIT_CARD, e -> {}); tb.addMaterialCommandToSideMenu("App", FontImage.MATERIAL_PHONE_IPHONE, e -> new AppForm(app).show()); TextField title = new TextField(app.name.get()); title.setUIID("NavigationTitle"); TextField tagline = new TextField(app.tagline.get()); tagline.setUIID("Tagline"); BaseNavigationForm Commands Side menu navigation commands common to the top level form
  • 3. public class BaseNavigationForm extends Form { public BaseNavigationForm(AppSettings app, Layout l) { super(app.name.get(), l); init(app); } private void init(AppSettings app) { Toolbar tb = getToolbar(); tb.addMaterialCommandToSideMenu("Dishes", FontImage.MATERIAL_RESTAURANT_MENU, e -> new DishListForm(app).show()); tb.addMaterialCommandToSideMenu("Details", FontImage.MATERIAL_DESCRIPTION, e -> new DetailsForm(app).show()); tb.addMaterialCommandToSideMenu("Billing", FontImage.MATERIAL_CREDIT_CARD, e -> {}); tb.addMaterialCommandToSideMenu("App", FontImage.MATERIAL_PHONE_IPHONE, e -> new AppForm(app).show()); TextField title = new TextField(app.name.get()); title.setUIID("NavigationTitle"); TextField tagline = new TextField(app.tagline.get()); tagline.setUIID("Tagline"); BaseNavigationForm UIID 0 Margin 1mm Padding White 5mm thin font Left alignment
  • 4. public class BaseNavigationForm extends Form { public BaseNavigationForm(AppSettings app, Layout l) { super(app.name.get(), l); init(app); } private void init(AppSettings app) { Toolbar tb = getToolbar(); tb.addMaterialCommandToSideMenu("Dishes", FontImage.MATERIAL_RESTAURANT_MENU, e -> new DishListForm(app).show()); tb.addMaterialCommandToSideMenu("Details", FontImage.MATERIAL_DESCRIPTION, e -> new DetailsForm(app).show()); tb.addMaterialCommandToSideMenu("Billing", FontImage.MATERIAL_CREDIT_CARD, e -> {}); tb.addMaterialCommandToSideMenu("App", FontImage.MATERIAL_PHONE_IPHONE, e -> new AppForm(app).show()); TextField title = new TextField(app.name.get()); title.setUIID("NavigationTitle"); TextField tagline = new TextField(app.tagline.get()); tagline.setUIID("Tagline"); BaseNavigationForm UIID Derive NavigationTitle 3mm font
  • 5. public class BaseNavigationForm extends Form { public BaseNavigationForm(AppSettings app, Layout l) { super(app.name.get(), l); init(app); } private void init(AppSettings app) { Toolbar tb = getToolbar(); tb.addMaterialCommandToSideMenu("Dishes", FontImage.MATERIAL_RESTAURANT_MENU, e -> new DishListForm(app).show()); tb.addMaterialCommandToSideMenu("Details", FontImage.MATERIAL_DESCRIPTION, e -> new DetailsForm(app).show()); tb.addMaterialCommandToSideMenu("Billing", FontImage.MATERIAL_CREDIT_CARD, e -> {}); tb.addMaterialCommandToSideMenu("App", FontImage.MATERIAL_PHONE_IPHONE, e -> new AppForm(app).show()); TextField title = new TextField(app.name.get()); title.setUIID("NavigationTitle"); TextField tagline = new TextField(app.tagline.get()); tagline.setUIID("Tagline"); BaseNavigationForm
  • 6. Button editBackground = new Button("Edit Background", "EditBackground"); int size = Display.getInstance().convertToPixels(10); Button logoImage = new Button("", app.getRoundedScaledLogo(), "Container"); Container titleContainer = BoxLayout.encloseY( title, tagline, FlowLayout.encloseCenterMiddle(logoImage)); Button menu = new Button("", "NavigationTitle"); Button preview = new Button("", "NavigationTitle"); FontImage.setMaterialIcon(menu, FontImage.MATERIAL_MENU); FontImage.setMaterialIcon(preview, FontImage.MATERIAL_PLAY_ARROW); Container titleWithCommands = BorderLayout.centerEastWest( titleContainer, FlowLayout.encloseCenter(preview), FlowLayout.encloseCenter(menu)); menu.addActionListener(e -> tb.openSideMenu()); ScaleImageLabel sl = new ScaleImageLabel(app.titleBackground.get()); sl.setUIID("TitleBottomSpace"); sl.setBackgroundType(Style.BACKGROUND_IMAGE_SCALED_FILL); if(super.shouldPaintStatusBar()) { titleWithCommands.getUnselectedStyle().setPaddingUnit(Style.UNIT_TYPE_DIPS); titleWithCommands.getUnselectedStyle().setPaddingTop(3); } tb.setTitleComponent(LayeredLayout.encloseIn(sl, BorderLayout.south(editBackground), titleWithCommands)); } BaseNavigationForm UIID 0 Margin top/right/left 4mm bottom margin 0 Padding Derive NavigationTitle Right alignment thin 2.5mm font
  • 7. Button editBackground = new Button("Edit Background", "EditBackground"); int size = Display.getInstance().convertToPixels(10); Button logoImage = new Button("", app.getRoundedScaledLogo(), "Container"); Container titleContainer = BoxLayout.encloseY( title, tagline, FlowLayout.encloseCenterMiddle(logoImage)); Button menu = new Button("", "NavigationTitle"); Button preview = new Button("", "NavigationTitle"); FontImage.setMaterialIcon(menu, FontImage.MATERIAL_MENU); FontImage.setMaterialIcon(preview, FontImage.MATERIAL_PLAY_ARROW); Container titleWithCommands = BorderLayout.centerEastWest( titleContainer, FlowLayout.encloseCenter(preview), FlowLayout.encloseCenter(menu)); menu.addActionListener(e -> tb.openSideMenu()); ScaleImageLabel sl = new ScaleImageLabel(app.titleBackground.get()); sl.setUIID("TitleBottomSpace"); sl.setBackgroundType(Style.BACKGROUND_IMAGE_SCALED_FILL); if(super.shouldPaintStatusBar()) { titleWithCommands.getUnselectedStyle().setPaddingUnit(Style.UNIT_TYPE_DIPS); titleWithCommands.getUnselectedStyle().setPaddingTop(3); } tb.setTitleComponent(LayeredLayout.encloseIn(sl, BorderLayout.south(editBackground), titleWithCommands)); } BaseNavigationForm UIID 0 padding sides 1mm padding top/bottom 4mm bottom
  • 8. Button editBackground = new Button("Edit Background", "EditBackground"); int size = Display.getInstance().convertToPixels(10); Button logoImage = new Button("", app.getRoundedScaledLogo(), "Container"); Container titleContainer = BoxLayout.encloseY( title, tagline, FlowLayout.encloseCenterMiddle(logoImage)); Button menu = new Button("", "NavigationTitle"); Button preview = new Button("", "NavigationTitle"); FontImage.setMaterialIcon(menu, FontImage.MATERIAL_MENU); FontImage.setMaterialIcon(preview, FontImage.MATERIAL_PLAY_ARROW); Container titleWithCommands = BorderLayout.centerEastWest( titleContainer, FlowLayout.encloseCenter(preview), FlowLayout.encloseCenter(menu)); menu.addActionListener(e -> tb.openSideMenu()); ScaleImageLabel sl = new ScaleImageLabel(app.titleBackground.get()); sl.setUIID("TitleBottomSpace"); sl.setBackgroundType(Style.BACKGROUND_IMAGE_SCALED_FILL); if(super.shouldPaintStatusBar()) { titleWithCommands.getUnselectedStyle().setPaddingUnit(Style.UNIT_TYPE_DIPS); titleWithCommands.getUnselectedStyle().setPaddingTop(3); } tb.setTitleComponent(LayeredLayout.encloseIn(sl, BorderLayout.south(editBackground), titleWithCommands)); } BaseNavigationForm
  • 9. public class AppSettings implements PropertyBusinessObject { public final Property<String, AppSettings> name = new Property<>("name", "My Restaurant"); public final Property<String, AppSettings> tagline = new Property<>("tagline", "The place to eat"); public final Property<Image, AppSettings> titleBackground = new Property<>("titleBackground", null); private Image roundedScaledLogo; private final PropertyIndex idx = new PropertyIndex(this, "AppSettings", name, tagline, logo, titleBackground); @Override public PropertyIndex getPropertyIndex() { return idx; } public Image getRoundedScaledLogo() { return roundedScaledLogo; } AppSettings
  • 10. public final Property<Image, AppSettings> logo = new Property<Image, AppSettings>("logo", null) { public AppSettings set(Image value) { if(value != null) { int mm = Display.getInstance().convertToPixels(2f); int size = Display.getInstance().convertToPixels(11); GeneralPath gp = new GeneralPath(); float widthF = size; float heightF = size; gp.moveTo(x + mm, 0); gp.lineTo(x + widthF - mm, 0); gp.quadTo(x + widthF, 0, widthF, mm); gp.lineTo(x + widthF, heightF - mm); gp.quadTo(x + widthF, heightF, x + widthF - mm, heightF); gp.lineTo(x + mm, heightF); gp.quadTo(x, heightF, 0, heightF - radius); gp.lineTo(x, mm); gp.quadTo(x, 0, mm, 0); gp.closePath(); Image mask = Image.createImage(size, size, 0xff000000); Graphics g = mask.getGraphics(); g.setColor(0xffffff); g.setAntiAliased(true); g.fillShape(gp); Object m = mask.createMask(); roundedScaledLogo = value.fill(size, size).applyMask(m); } return super.set(value); } }; AppSettings
  • 11. public final Property<Image, AppSettings> logo = new Property<Image, AppSettings>("logo", null) { public AppSettings set(Image value) { if(value != null) { int mm = Display.getInstance().convertToPixels(2f); int size = Display.getInstance().convertToPixels(11); GeneralPath gp = new GeneralPath(); float widthF = size; float heightF = size; gp.moveTo(x + mm, 0); gp.lineTo(x + widthF - mm, 0); gp.quadTo(x + widthF, 0, widthF, mm); gp.lineTo(x + widthF, heightF - mm); gp.quadTo(x + widthF, heightF, x + widthF - mm, heightF); gp.lineTo(x + mm, heightF); gp.quadTo(x, heightF, 0, heightF - radius); gp.lineTo(x, mm); gp.quadTo(x, 0, mm, 0); gp.closePath(); Image mask = Image.createImage(size, size, 0xff000000); Graphics g = mask.getGraphics(); g.setColor(0xffffff); g.setAntiAliased(true); g.fillShape(gp); Object m = mask.createMask(); roundedScaledLogo = value.fill(size, size).applyMask(m); } return super.set(value); } }; AppSettings
  • 12. public final Property<Image, AppSettings> logo = new Property<Image, AppSettings>("logo", null) { public AppSettings set(Image value) { if(value != null) { int mm = Display.getInstance().convertToPixels(2f); int size = Display.getInstance().convertToPixels(11); GeneralPath gp = new GeneralPath(); float widthF = size; float heightF = size; gp.moveTo(x + mm, 0); gp.lineTo(x + widthF - mm, 0); gp.quadTo(x + widthF, 0, widthF, mm); gp.lineTo(x + widthF, heightF - mm); gp.quadTo(x + widthF, heightF, x + widthF - mm, heightF); gp.lineTo(x + mm, heightF); gp.quadTo(x, heightF, 0, heightF - radius); gp.lineTo(x, mm); gp.quadTo(x, 0, mm, 0); gp.closePath(); Image mask = Image.createImage(size, size, 0xff000000); Graphics g = mask.getGraphics(); g.setColor(0xffffff); g.setAntiAliased(true); g.fillShape(gp); Object m = mask.createMask(); roundedScaledLogo = value.fill(size, size).applyMask(m); } return super.set(value); } }; AppSettings
  • 13. public final Property<Image, AppSettings> logo = new Property<Image, AppSettings>("logo", null) { public AppSettings set(Image value) { if(value != null) { int mm = Display.getInstance().convertToPixels(2f); int size = Display.getInstance().convertToPixels(11); GeneralPath gp = new GeneralPath(); float widthF = size; float heightF = size; gp.moveTo(x + mm, 0); gp.lineTo(x + widthF - mm, 0); gp.quadTo(x + widthF, 0, widthF, mm); gp.lineTo(x + widthF, heightF - mm); gp.quadTo(x + widthF, heightF, x + widthF - mm, heightF); gp.lineTo(x + mm, heightF); gp.quadTo(x, heightF, 0, heightF - radius); gp.lineTo(x, mm); gp.quadTo(x, 0, mm, 0); gp.closePath(); Image mask = Image.createImage(size, size, 0xff000000); Graphics g = mask.getGraphics(); g.setColor(0xffffff); g.setAntiAliased(true); g.fillShape(gp); Object m = mask.createMask(); roundedScaledLogo = value.fill(size, size).applyMask(m); } return super.set(value); } }; AppSettings
  • 14. public final Property<Image, AppSettings> logo = new Property<Image, AppSettings>("logo", null) { public AppSettings set(Image value) { if(value != null) { int mm = Display.getInstance().convertToPixels(2f); int size = Display.getInstance().convertToPixels(11); GeneralPath gp = new GeneralPath(); float widthF = size; float heightF = size; gp.moveTo(x + mm, 0); gp.lineTo(x + widthF - mm, 0); gp.quadTo(x + widthF, 0, widthF, mm); gp.lineTo(x + widthF, heightF - mm); gp.quadTo(x + widthF, heightF, x + widthF - mm, heightF); gp.lineTo(x + mm, heightF); gp.quadTo(x, heightF, 0, heightF - radius); gp.lineTo(x, mm); gp.quadTo(x, 0, mm, 0); gp.closePath(); Image mask = Image.createImage(size, size, 0xff000000); Graphics g = mask.getGraphics(); g.setColor(0xffffff); g.setAntiAliased(true); g.fillShape(gp); Object m = mask.createMask(); roundedScaledLogo = value.fill(size, size).applyMask(m); } return super.set(value); } }; AppSettings
  • 15. public final Property<Image, AppSettings> logo = new Property<Image, AppSettings>("logo", null) { public AppSettings set(Image value) { if(value != null) { int mm = Display.getInstance().convertToPixels(2f); int size = Display.getInstance().convertToPixels(11); GeneralPath gp = new GeneralPath(); float widthF = size; float heightF = size; gp.moveTo(x + mm, 0); gp.lineTo(x + widthF - mm, 0); gp.quadTo(x + widthF, 0, widthF, mm); gp.lineTo(x + widthF, heightF - mm); gp.quadTo(x + widthF, heightF, x + widthF - mm, heightF); gp.lineTo(x + mm, heightF); gp.quadTo(x, heightF, 0, heightF - radius); gp.lineTo(x, mm); gp.quadTo(x, 0, mm, 0); gp.closePath(); Image mask = Image.createImage(size, size, 0xff000000); Graphics g = mask.getGraphics(); g.setColor(0xffffff); g.setAntiAliased(true); g.fillShape(gp); Object m = mask.createMask(); roundedScaledLogo = value.fill(size, size).applyMask(m); } return super.set(value); } }; AppSettings