SlideShare a Scribd company logo
Creating an Uber Clone - Part VIII
The “Where to?” UI
© Codename One 2017 all rights reserved
The “Where to?” UI
© Codename One 2017 all rights reserved
whereTo.addActionListener(e ->
showNavigationToolbar());
Where to?
void showNavigationToolbar() {
final Container layer = getLayeredPane(MapForm.class, true);
Button back = new Button("", "TitleCommand");
FontImage.setMaterialIcon(back, FontImage.MATERIAL_ARROW_BACK);
TextField from = new TextField("", "From", 40, TextField.ANY);
TextField to = new TextField("", "Where to?", 40, TextField.ANY);
Image circle = Image.createImage(square.getWidth(),square.getHeight(),0);
Graphics g = circle.getGraphics();
g.setColor(0xa4a4ac);
g.setAntiAliased(true);
g.fillArc(0, 0, circle.getWidth(), circle.getHeight(), 0, 360);
final Label fromSelected = new Label(square);
final Label toSelected = new Label(circle);
from.getHintLabel().setUIID("FromToTextFieldHint");
from.setUIID("FromToTextField");
to.getHintLabel().setUIID("FromToTextFieldHint");
to.setUIID("FromToTextField");
Where to?
void showNavigationToolbar() {
final Container layer = getLayeredPane(MapForm.class, true);
Button back = new Button("", "TitleCommand");
FontImage.setMaterialIcon(back, FontImage.MATERIAL_ARROW_BACK);
TextField from = new TextField("", "From", 40, TextField.ANY);
TextField to = new TextField("", "Where to?", 40, TextField.ANY);
Image circle = Image.createImage(square.getWidth(),square.getHeight(),0);
Graphics g = circle.getGraphics();
g.setColor(0xa4a4ac);
g.setAntiAliased(true);
g.fillArc(0, 0, circle.getWidth(), circle.getHeight(), 0, 360);
final Label fromSelected = new Label(square);
final Label toSelected = new Label(circle);
from.getHintLabel().setUIID("FromToTextFieldHint");
from.setUIID("FromToTextField");
to.getHintLabel().setUIID("FromToTextFieldHint");
to.setUIID("FromToTextField");
Where to?
final Label fromSelected = new Label(square);
final Label toSelected = new Label(circle);
from.getHintLabel().setUIID("FromToTextFieldHint");
from.setUIID("FromToTextField");
to.getHintLabel().setUIID("FromToTextFieldHint");
to.setUIID("FromToTextField");
Container navigationToolbar = BoxLayout.encloseY(back,
BorderLayout.centerCenterEastWest(from, null, fromSelected),
BorderLayout.centerCenterEastWest(to, null, toSelected)
);
navigationToolbar.setUIID("WhereToToolbar");
navigationToolbar.getUnselectedStyle().setBgPainter((g1, rect) -> {
g1.setAlpha(255);
g1.setColor(0xffffff);
if(dropShadow != null) {
g1.drawImage(dropShadow, rect.getX(),
rect.getY() + rect.getHeight() - dropShadow.getHeight(),
rect.getWidth(), dropShadow.getHeight());
g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(),
Where to?
final Label fromSelected = new Label(square);
final Label toSelected = new Label(circle);
from.getHintLabel().setUIID("FromToTextFieldHint");
from.setUIID("FromToTextField");
to.getHintLabel().setUIID("FromToTextFieldHint");
to.setUIID("FromToTextField");
Container navigationToolbar = BoxLayout.encloseY(back,
BorderLayout.centerCenterEastWest(from, null, fromSelected),
BorderLayout.centerCenterEastWest(to, null, toSelected)
);
navigationToolbar.setUIID("WhereToToolbar");
navigationToolbar.getUnselectedStyle().setBgPainter((g1, rect) -> {
g1.setAlpha(255);
g1.setColor(0xffffff);
if(dropShadow != null) {
g1.drawImage(dropShadow, rect.getX(),
rect.getY() + rect.getHeight() - dropShadow.getHeight(),
rect.getWidth(), dropShadow.getHeight());
g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(),
Where to?
navigationToolbar.getUnselectedStyle().setBgPainter((g1, rect) -> {
g1.setAlpha(255);
g1.setColor(0xffffff);
if(dropShadow != null) {
g1.drawImage(dropShadow, rect.getX(),
rect.getY() + rect.getHeight() - dropShadow.getHeight(),
rect.getWidth(), dropShadow.getHeight());
g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(),
rect.getHeight() - dropShadow.getHeight() / 2);
} else {
g1.fillRect(rect.getX(), rect.getY(),
rect.getWidth(), rect.getHeight());
}
g1.setColor(0xa4a4ac);
g1.setAntiAliased(true);
int x = fromSelected.getAbsoluteX() + fromSelected.getWidth() / 2 - 1;
int y = fromSelected.getAbsoluteY() + fromSelected.getHeight() / 2 +
circle.getHeight() / 2;
g1.fillRect(x, y, 2, toSelected.getAbsoluteY() - y +
toSelected.getHeight() / 2 - circle.getHeight() / 2);
});
Where to?
navigationToolbar.getUnselectedStyle().setBgPainter((g1, rect) -> {
g1.setAlpha(255);
g1.setColor(0xffffff);
if(dropShadow != null) {
g1.drawImage(dropShadow, rect.getX(),
rect.getY() + rect.getHeight() - dropShadow.getHeight(),
rect.getWidth(), dropShadow.getHeight());
g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(),
rect.getHeight() - dropShadow.getHeight() / 2);
} else {
g1.fillRect(rect.getX(), rect.getY(),
rect.getWidth(), rect.getHeight());
}
g1.setColor(0xa4a4ac);
g1.setAntiAliased(true);
int x = fromSelected.getAbsoluteX() + fromSelected.getWidth() / 2 - 1;
int y = fromSelected.getAbsoluteY() + fromSelected.getHeight() / 2 +
circle.getHeight() / 2;
g1.fillRect(x, y, 2, toSelected.getAbsoluteY() - y +
toSelected.getHeight() / 2 - circle.getHeight() / 2);
});
Where to?
navigationToolbar.getUnselectedStyle().setBgPainter((g1, rect) -> {
g1.setAlpha(255);
g1.setColor(0xffffff);
if(dropShadow != null) {
g1.drawImage(dropShadow, rect.getX(),
rect.getY() + rect.getHeight() - dropShadow.getHeight(),
rect.getWidth(), dropShadow.getHeight());
g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(),
rect.getHeight() - dropShadow.getHeight() / 2);
} else {
g1.fillRect(rect.getX(), rect.getY(),
rect.getWidth(), rect.getHeight());
}
g1.setColor(0xa4a4ac);
g1.setAntiAliased(true);
int x = fromSelected.getAbsoluteX() + fromSelected.getWidth() / 2 - 1;
int y = fromSelected.getAbsoluteY() + fromSelected.getHeight() / 2 +
circle.getHeight() / 2;
g1.fillRect(x, y, 2, toSelected.getAbsoluteY() - y +
toSelected.getHeight() / 2 - circle.getHeight() / 2);
});
Where to?
int x = fromSelected.getAbsoluteX() + fromSelected.getWidth() / 2 - 1;
int y = fromSelected.getAbsoluteY() + fromSelected.getHeight() / 2 +
circle.getHeight() / 2;
g1.fillRect(x, y, 2, toSelected.getAbsoluteY() - y +
toSelected.getHeight() / 2 - circle.getHeight() / 2);
});
back.addActionListener(e -> {
navigationToolbar.setY(-navigationToolbar.getHeight());
navigationToolbar.getParent().animateUnlayout(200, 120, () -> {
layer.removeAll();
revalidate();
});
});
layer.setLayout(new BorderLayout());
layer.add(NORTH, navigationToolbar);
navigationToolbar.setWidth(getDisplayWidth());
navigationToolbar.setHeight(getPreferredH());
navigationToolbar.setY(-navigationToolbar.getHeight());
layer.animateLayout(200);
}
Where to?
int x = fromSelected.getAbsoluteX() + fromSelected.getWidth() / 2 - 1;
int y = fromSelected.getAbsoluteY() + fromSelected.getHeight() / 2 +
circle.getHeight() / 2;
g1.fillRect(x, y, 2, toSelected.getAbsoluteY() - y +
toSelected.getHeight() / 2 - circle.getHeight() / 2);
});
back.addActionListener(e -> {
navigationToolbar.setY(-navigationToolbar.getHeight());
navigationToolbar.getParent().animateUnlayout(200, 120, () -> {
layer.removeAll();
revalidate();
});
});
layer.setLayout(new BorderLayout());
layer.add(NORTH, navigationToolbar);
navigationToolbar.setWidth(getDisplayWidth());
navigationToolbar.setHeight(getPreferredH());
navigationToolbar.setY(-navigationToolbar.getHeight());
layer.animateLayout(200);
}
Where to?
WhereToToolbar
© Codename One 2017 all rights reserved
WhereToToolbar
© Codename One 2017 all rights reserved
WhereToToolbar
© Codename One 2017 all rights reserved
FromToTextField
© Codename One 2017 all rights reserved
FromToTextField
© Codename One 2017 all rights reserved
FromToTextField
© Codename One 2017 all rights reserved
FromToTextField
© Codename One 2017 all rights reserved
FromToTextField
© Codename One 2017 all rights reserved
FromToTextField
© Codename One 2017 all rights reserved
FromToTextFieldHint
© Codename One 2017 all rights reserved
FromToTextFieldHint
© Codename One 2017 all rights reserved
FromToTextFieldHint
© Codename One 2017 all rights reserved

More Related Content

PDF
Creating an Uber Clone - Part VIII - Transcript.pdf
PDF
Import java.awt.; Import acm.program.; Import acm.graphics.;.pdf
PDF
Create a java project that - Draw a circle with three random init.pdf
PPT
Mobile Game and Application with J2ME - Collision Detection
PPT
Mobile Game and Application with J2ME
PDF
Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...
PDF
package chapter15;import javafx.application.Application;import j.pdf
PDF
Mashup caravan android-talks
Creating an Uber Clone - Part VIII - Transcript.pdf
Import java.awt.; Import acm.program.; Import acm.graphics.;.pdf
Create a java project that - Draw a circle with three random init.pdf
Mobile Game and Application with J2ME - Collision Detection
Mobile Game and Application with J2ME
Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...
package chapter15;import javafx.application.Application;import j.pdf
Mashup caravan android-talks

Similar to Creating an Uber Clone - Part VIII.pdf (20)

PDF
Creating an Uber Clone - Part IV.pdf
PDF
662305 LAB12
PDF
UI Design From Scratch - Part 5 - transcript.pdf
PDF
The Ring programming language version 1.5.3 book - Part 70 of 184
PDF
PDF
Exploring Canvas
PDF
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
PDF
Creating an Uber Clone - Part VII.pdf
PDF
Creating an Uber Clone - Part XIX.pdf
PDF
662305 LAB13
PDF
UI Design From Scratch - Part 5.pdf
PDF
Creating an Uber Clone - Part XXIV.pdf
PDF
I need to create a page looks like a picture. But it looks different.pdf
DOCX
Applications
PDF
PDF
Creating an Uber Clone - Part XXII.pdf
PPTX
google play service 7.8 & new tech in M
PDF
Creating an Uber Clone - Part XXXIX.pdf
PDF
Initial UI Mockup - Part 3.pdf
PDF
The Ring programming language version 1.5.4 book - Part 60 of 185
Creating an Uber Clone - Part IV.pdf
662305 LAB12
UI Design From Scratch - Part 5 - transcript.pdf
The Ring programming language version 1.5.3 book - Part 70 of 184
Exploring Canvas
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
Creating an Uber Clone - Part VII.pdf
Creating an Uber Clone - Part XIX.pdf
662305 LAB13
UI Design From Scratch - Part 5.pdf
Creating an Uber Clone - Part XXIV.pdf
I need to create a page looks like a picture. But it looks different.pdf
Applications
Creating an Uber Clone - Part XXII.pdf
google play service 7.8 & new tech in M
Creating an Uber Clone - Part XXXIX.pdf
Initial UI Mockup - Part 3.pdf
The Ring programming language version 1.5.4 book - Part 60 of 185

More from ShaiAlmog1 (20)

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

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Machine learning based COVID-19 study performance prediction
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Electronic commerce courselecture one. Pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Encapsulation theory and applications.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Review of recent advances in non-invasive hemoglobin estimation
Dropbox Q2 2025 Financial Results & Investor Presentation
sap open course for s4hana steps from ECC to s4
Machine learning based COVID-19 study performance prediction
20250228 LYD VKU AI Blended-Learning.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Empathic Computing: Creating Shared Understanding
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Reach Out and Touch Someone: Haptics and Empathic Computing
Chapter 3 Spatial Domain Image Processing.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Approach and Philosophy of On baking technology
Digital-Transformation-Roadmap-for-Companies.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Spectroscopy.pptx food analysis technology
Electronic commerce courselecture one. Pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx

Creating an Uber Clone - Part VIII.pdf

  • 1. Creating an Uber Clone - Part VIII
  • 2. The “Where to?” UI © Codename One 2017 all rights reserved
  • 3. The “Where to?” UI © Codename One 2017 all rights reserved
  • 5. void showNavigationToolbar() { final Container layer = getLayeredPane(MapForm.class, true); Button back = new Button("", "TitleCommand"); FontImage.setMaterialIcon(back, FontImage.MATERIAL_ARROW_BACK); TextField from = new TextField("", "From", 40, TextField.ANY); TextField to = new TextField("", "Where to?", 40, TextField.ANY); Image circle = Image.createImage(square.getWidth(),square.getHeight(),0); Graphics g = circle.getGraphics(); g.setColor(0xa4a4ac); g.setAntiAliased(true); g.fillArc(0, 0, circle.getWidth(), circle.getHeight(), 0, 360); final Label fromSelected = new Label(square); final Label toSelected = new Label(circle); from.getHintLabel().setUIID("FromToTextFieldHint"); from.setUIID("FromToTextField"); to.getHintLabel().setUIID("FromToTextFieldHint"); to.setUIID("FromToTextField"); Where to?
  • 6. void showNavigationToolbar() { final Container layer = getLayeredPane(MapForm.class, true); Button back = new Button("", "TitleCommand"); FontImage.setMaterialIcon(back, FontImage.MATERIAL_ARROW_BACK); TextField from = new TextField("", "From", 40, TextField.ANY); TextField to = new TextField("", "Where to?", 40, TextField.ANY); Image circle = Image.createImage(square.getWidth(),square.getHeight(),0); Graphics g = circle.getGraphics(); g.setColor(0xa4a4ac); g.setAntiAliased(true); g.fillArc(0, 0, circle.getWidth(), circle.getHeight(), 0, 360); final Label fromSelected = new Label(square); final Label toSelected = new Label(circle); from.getHintLabel().setUIID("FromToTextFieldHint"); from.setUIID("FromToTextField"); to.getHintLabel().setUIID("FromToTextFieldHint"); to.setUIID("FromToTextField"); Where to?
  • 7. final Label fromSelected = new Label(square); final Label toSelected = new Label(circle); from.getHintLabel().setUIID("FromToTextFieldHint"); from.setUIID("FromToTextField"); to.getHintLabel().setUIID("FromToTextFieldHint"); to.setUIID("FromToTextField"); Container navigationToolbar = BoxLayout.encloseY(back, BorderLayout.centerCenterEastWest(from, null, fromSelected), BorderLayout.centerCenterEastWest(to, null, toSelected) ); navigationToolbar.setUIID("WhereToToolbar"); navigationToolbar.getUnselectedStyle().setBgPainter((g1, rect) -> { g1.setAlpha(255); g1.setColor(0xffffff); if(dropShadow != null) { g1.drawImage(dropShadow, rect.getX(), rect.getY() + rect.getHeight() - dropShadow.getHeight(), rect.getWidth(), dropShadow.getHeight()); g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(), Where to?
  • 8. final Label fromSelected = new Label(square); final Label toSelected = new Label(circle); from.getHintLabel().setUIID("FromToTextFieldHint"); from.setUIID("FromToTextField"); to.getHintLabel().setUIID("FromToTextFieldHint"); to.setUIID("FromToTextField"); Container navigationToolbar = BoxLayout.encloseY(back, BorderLayout.centerCenterEastWest(from, null, fromSelected), BorderLayout.centerCenterEastWest(to, null, toSelected) ); navigationToolbar.setUIID("WhereToToolbar"); navigationToolbar.getUnselectedStyle().setBgPainter((g1, rect) -> { g1.setAlpha(255); g1.setColor(0xffffff); if(dropShadow != null) { g1.drawImage(dropShadow, rect.getX(), rect.getY() + rect.getHeight() - dropShadow.getHeight(), rect.getWidth(), dropShadow.getHeight()); g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(), Where to?
  • 9. navigationToolbar.getUnselectedStyle().setBgPainter((g1, rect) -> { g1.setAlpha(255); g1.setColor(0xffffff); if(dropShadow != null) { g1.drawImage(dropShadow, rect.getX(), rect.getY() + rect.getHeight() - dropShadow.getHeight(), rect.getWidth(), dropShadow.getHeight()); g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight() - dropShadow.getHeight() / 2); } else { g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight()); } g1.setColor(0xa4a4ac); g1.setAntiAliased(true); int x = fromSelected.getAbsoluteX() + fromSelected.getWidth() / 2 - 1; int y = fromSelected.getAbsoluteY() + fromSelected.getHeight() / 2 + circle.getHeight() / 2; g1.fillRect(x, y, 2, toSelected.getAbsoluteY() - y + toSelected.getHeight() / 2 - circle.getHeight() / 2); }); Where to?
  • 10. navigationToolbar.getUnselectedStyle().setBgPainter((g1, rect) -> { g1.setAlpha(255); g1.setColor(0xffffff); if(dropShadow != null) { g1.drawImage(dropShadow, rect.getX(), rect.getY() + rect.getHeight() - dropShadow.getHeight(), rect.getWidth(), dropShadow.getHeight()); g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight() - dropShadow.getHeight() / 2); } else { g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight()); } g1.setColor(0xa4a4ac); g1.setAntiAliased(true); int x = fromSelected.getAbsoluteX() + fromSelected.getWidth() / 2 - 1; int y = fromSelected.getAbsoluteY() + fromSelected.getHeight() / 2 + circle.getHeight() / 2; g1.fillRect(x, y, 2, toSelected.getAbsoluteY() - y + toSelected.getHeight() / 2 - circle.getHeight() / 2); }); Where to?
  • 11. navigationToolbar.getUnselectedStyle().setBgPainter((g1, rect) -> { g1.setAlpha(255); g1.setColor(0xffffff); if(dropShadow != null) { g1.drawImage(dropShadow, rect.getX(), rect.getY() + rect.getHeight() - dropShadow.getHeight(), rect.getWidth(), dropShadow.getHeight()); g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight() - dropShadow.getHeight() / 2); } else { g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight()); } g1.setColor(0xa4a4ac); g1.setAntiAliased(true); int x = fromSelected.getAbsoluteX() + fromSelected.getWidth() / 2 - 1; int y = fromSelected.getAbsoluteY() + fromSelected.getHeight() / 2 + circle.getHeight() / 2; g1.fillRect(x, y, 2, toSelected.getAbsoluteY() - y + toSelected.getHeight() / 2 - circle.getHeight() / 2); }); Where to?
  • 12. int x = fromSelected.getAbsoluteX() + fromSelected.getWidth() / 2 - 1; int y = fromSelected.getAbsoluteY() + fromSelected.getHeight() / 2 + circle.getHeight() / 2; g1.fillRect(x, y, 2, toSelected.getAbsoluteY() - y + toSelected.getHeight() / 2 - circle.getHeight() / 2); }); back.addActionListener(e -> { navigationToolbar.setY(-navigationToolbar.getHeight()); navigationToolbar.getParent().animateUnlayout(200, 120, () -> { layer.removeAll(); revalidate(); }); }); layer.setLayout(new BorderLayout()); layer.add(NORTH, navigationToolbar); navigationToolbar.setWidth(getDisplayWidth()); navigationToolbar.setHeight(getPreferredH()); navigationToolbar.setY(-navigationToolbar.getHeight()); layer.animateLayout(200); } Where to?
  • 13. int x = fromSelected.getAbsoluteX() + fromSelected.getWidth() / 2 - 1; int y = fromSelected.getAbsoluteY() + fromSelected.getHeight() / 2 + circle.getHeight() / 2; g1.fillRect(x, y, 2, toSelected.getAbsoluteY() - y + toSelected.getHeight() / 2 - circle.getHeight() / 2); }); back.addActionListener(e -> { navigationToolbar.setY(-navigationToolbar.getHeight()); navigationToolbar.getParent().animateUnlayout(200, 120, () -> { layer.removeAll(); revalidate(); }); }); layer.setLayout(new BorderLayout()); layer.add(NORTH, navigationToolbar); navigationToolbar.setWidth(getDisplayWidth()); navigationToolbar.setHeight(getPreferredH()); navigationToolbar.setY(-navigationToolbar.getHeight()); layer.animateLayout(200); } Where to?
  • 14. WhereToToolbar © Codename One 2017 all rights reserved
  • 15. WhereToToolbar © Codename One 2017 all rights reserved
  • 16. WhereToToolbar © Codename One 2017 all rights reserved
  • 17. FromToTextField © Codename One 2017 all rights reserved
  • 18. FromToTextField © Codename One 2017 all rights reserved
  • 19. FromToTextField © Codename One 2017 all rights reserved
  • 20. FromToTextField © Codename One 2017 all rights reserved
  • 21. FromToTextField © Codename One 2017 all rights reserved
  • 22. FromToTextField © Codename One 2017 all rights reserved
  • 23. FromToTextFieldHint © Codename One 2017 all rights reserved
  • 24. FromToTextFieldHint © Codename One 2017 all rights reserved
  • 25. FromToTextFieldHint © Codename One 2017 all rights reserved