6 package com.google.appinventor.components.runtime;
27 @DesignerComponent(version = YaVersion.EV3_UI_COMPONENT_VERSION,
28 description =
"A component that provides a high-level interface to a LEGO MINDSTORMS EV3 " +
29 "robot, with functions to draw graphs on EV3 screen.",
30 category = ComponentCategory.LEGOMINDSTORMS,
32 iconName =
"images/legoMindstormsEv3.png")
34 @UsesPermissions(permissionNames =
"android.permission.INTERNET," +
35 "android.permission.WRITE_EXTERNAL_STORAGE," +
36 "android.permission.READ_EXTERNAL_STORAGE")
43 super(container,
"Ev3UI");
50 public
void DrawPoint(
int color,
int x,
int y) {
51 String functionName =
"DrawPoint";
53 if (color != 0 && color != 1) {
67 sendCommand(functionName, command,
false);
75 sendCommand(functionName, command,
false);
82 public
void DrawIcon(
int color,
int x,
int y,
int type,
int no) {
83 String functionName =
"DrawIcon";
85 if (color != 0 && color != 1) {
101 sendCommand(functionName, command,
false);
109 sendCommand(functionName, command,
false);
116 public
void DrawLine(
int color,
int x1,
int y1,
int x2,
int y2) {
117 String functionName =
"DrawLine";
119 if (color != 0 && color != 1) {
135 sendCommand(functionName, command,
false);
143 sendCommand(functionName, command,
false);
150 public
void DrawRect(
int color,
int x,
int y,
int width,
int height,
boolean fill) {
151 String functionName =
"DrawRect";
153 if (color != 0 && color != 1) {
169 sendCommand(functionName, command,
false);
177 sendCommand(functionName, command,
false);
184 public
void DrawCircle(
int color,
int x,
int y,
int radius,
boolean fill) {
185 String functionName =
"DrawCircle";
187 if (color != 0 && color != 1 || radius < 0) {
202 sendCommand(functionName, command,
false);
210 sendCommand(functionName, command,
false);
217 public
void FillScreen(
int color) {
218 String functionName =
"FillScreen";
220 if (color != 0 && color != 1) {
234 sendCommand(functionName, command,
false);
242 sendCommand(functionName, command,
false);