query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
A method that sets the scatter plot chart image name \param scatterPlot
public void SetScatterPlotChartImage(String scatterPlot) { boolean test = true; if((scatterPlot.isEmpty()) && (test)) { System.err.println("*** Warning ChartTypeChooser::" + "SetScatterPlotChartImage():: image is set to an empty string."); } if ((scatterPlot.length() > MAX_SIZE) && (test)) { System.err.println("*** Warning ChartTypeChooser::" + "SetScatterPlotChartImage():: image is a very long name."); } else if (test) { System.out.println("ChartTypeChooser:: " + "SetScatterPlotChartImage():: chosen image is set to: " + scatterPlot); } m_ScatterPlotChartImage = scatterPlot; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String GetScatterPlotChartImage() {\n\t\treturn m_ScatterPlotChartImage;\n\t}", "public void SetXYSplineChartImage(String XYSpline) {\n\t\tboolean test = true;\n\t\t\n\t\tif((XYSpline.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"SetXYSplineChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((XYSpline.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"SetXYSplineChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"SetXYSplineChartImage():: chosen image is set to: \" \n\t\t \t+ XYSpline);\n\t\t}\n\t\tm_XYSplineChartImage = XYSpline;\n\t}", "public void MakeScatter() {\n\t\tScatterButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(\n\t\t\t\tGetScatterPlotChartImage())));\n\t\tScatterButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Scatter Plot Chart \", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(ScatterButton);\n\t}", "public void setPlot_info(String plot_info) {\n this.plot_info = plot_info;\n }", "public void SetBubbleChartImage(String bubble) {\n\t\tboolean test = true;\n\t\t\n\t\tif((bubble.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"SetBubbleChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((bubble.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"SetBubbleChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"SetBubbleChartImage():: chosen image is set to: \" \n\t\t \t+ bubble);\n\t\t}\n\t\tm_BubbleChartImage = bubble;\n\t}", "public void addImagePlot(String path, Color color_fondo_chart, Color color_fondo_plot){\n try {\n String path_project = getClass().getClassLoader().getResource(\".\").getPath();\n \n File file = new File(path_project + path);\n BufferedImage image = ImageIO.read(file);\n //chart.setBackgroundImage(image);\n chart.setBackgroundPaint(color_fondo_chart);\n \n //color del fondo\n //plot.setBackgroundPaint(new Color(255, 228, 196));\n plot.setBackgroundPaint(color_fondo_plot);\n \n //agregar imagen de fondo\n plot.setBackgroundImage(image);\n \n } catch (IOException e) {\n System.out.println(\"Error al abrir el archivo \" +e.getMessage());\n }\n }", "public void SetPieChartImage(String pie) {\n\t\tboolean test = true;\n\t\t\n\t\tif((pie.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"SetPieChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((pie.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"SetPieChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"SetPieChartImage():: chosen image is set to: \" \n\t\t \t+ pie);\n\t\t}\n\t\tm_PieChartImage = pie;\n\t}", "private BufferedImage createPlotImage() {\r\n final BufferedImage img = new BufferedImage(getWidth(), getHeight(), \r\n Transparency.BITMASK);\r\n final Graphics g = img.getGraphics();\r\n ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, \r\n RenderingHints.VALUE_ANTIALIAS_ON);\r\n \r\n g.setColor(GUIConstants.color6);\r\n for(int i = 0; i < scatterData.size; i++) {\r\n drawItem(g, scatterData.xAxis.co[i], \r\n scatterData.yAxis.co[i], false, false);\r\n }\r\n return img;\r\n }", "public void fillShipPictureLabel() {\n\t\tString shipsName = this.ship.getShipName();\n\t\tif (shipsName == \"Thousand Sunny\") {\n\t\t\tshipPictureLabel.setIcon(new ImageIcon(SetupAdventureScreen.class.getResource(\"/images/ThousandSunny.png\")));\n\t\t}\n\t\telse if (shipsName == \"Black Pearl\") {\n\t\t\tshipPictureLabel.setIcon(new ImageIcon(SetupAdventureScreen.class.getResource(\"/images/BlackPearl.png\")));\n\t\t}\n\t\telse if (shipsName == \"Victoria Hunter\") {\n\t\t\tshipPictureLabel.setIcon(new ImageIcon(SetupAdventureScreen.class.getResource(\"/images/VictoriaHunter.png\")));\n\t\t}\n\t\telse {\n\t\t\tshipPictureLabel.setIcon(new ImageIcon(SetupAdventureScreen.class.getResource(\"/images/StarOne.png\")));\n\t\t}\n\t}", "public void setToolTip (String imageName)\r\n\t{\r\n\t\tthis.imageName = imageName;\r\n\t}", "public void SetStackedAreaChartImage(String stackedArea) {\n\t\tboolean test = true;\n\t\t\n\t\tif((stackedArea.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"SetStackedAreaChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((stackedArea.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"SetStackedAreaChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"SetStackedAreaChartImage():: chosen image is set to: \" \n\t\t \t+ stackedArea);\n\t\t}\n\t\tm_StackedAreaChartImage = stackedArea;\n\t}", "Icon getPlotterIcon();", "public void setImageView() {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image); \n }", "public void SetLineChartImage(String line) {\n\t\tboolean test = true;\n\t\t\n\t\tif((line.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"SetLineChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((line.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"SetLineChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"SetLineChartImage():: chosen image is set to: \" \n\t\t \t+ line);\n\t\t}\n\t\tm_LineChartImage = line;\n\t}", "String getPlotterName();", "void setImage(String image);", "public void setImage(String imageName)\n {\n if (imageName == null)\n {\n setImage((Image) null);\n }\n else\n {\n setImage(new Image(imageName));\n }\n }", "public void SetBarChartImage(String bar) {\n\t\tboolean test = true;\n\t\t\n\t\tif((bar.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"SetBarChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((bar.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"SetBarChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"SetBarChartImage():: chosen image is set to: \" \n\t\t \t+ bar);\n\t\t}\n\t\tm_BarChartImage = bar;\n\t}", "public void setImg(String mapSelect){\n\t\ttry {\n\t\t if (mapSelect.equals(\"map01.txt\")){\n\t\t\timg = ImageIO.read(new File(\"space.jpg\"));\n\t\t\timg2 = ImageIO.read(new File(\"metal.png\"));\n\n\t\t }\t\n\t\t if (mapSelect.equals(\"map02.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"forest.jpg\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"leaf.png\"));\n\t\t\t\timg3 = ImageIO.read(new File(\"log.png\"));\n\t\t }\n\t\t if (mapSelect.equals(\"map03.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"spinx.jpg\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"pyramid.png\"));\n\t\t\t\timg3 = ImageIO.read(new File(\"sandy.png\"));\n\t\t\t\t\n\t\t }\n\t\t if (mapSelect.equals(\"map04.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"doublebg.png\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"cloud.png\"));\n\t\t\t\t\n\t\t }\n\t\t\t\n\t\t}\n\t\t catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\t\n\t\t}\n\t}", "public void changeImageMule(){\n\t\tsetIcon(imgm);\n\t}", "private void setImageDynamic(){\n questionsClass.setQuestions(currentQuestionIndex);\n String movieName = questionsClass.getPhotoName();\n ImageView ReferenceToMovieImage = findViewById(R.id.Movie);\n int imageResource = getResources().getIdentifier(movieName, null, getPackageName());\n Drawable img = getResources().getDrawable(imageResource);\n ReferenceToMovieImage.setImageDrawable(img);\n }", "public void setTeachingAvatar(){\n\t\tavatar.setIcon(new ImageIcon(\"img/Asking.png\"));\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\tcomparedChart.setName(name);\n\t}", "public void setImg(){\n if(PicSingleton.getInstance().getPicToShape() != null){\n\n mResultImg.setImageDrawable(PicSingleton.getInstance().getPicShaped());\n }\n }", "protected void setChart(XSSFChart chart, String relId) {\n\t\tCTGraphicalObjectData data = graphicFrame.getGraphic().addNewGraphicData();\n\t\tappendChartElement(data, relId);\n\t\tchart.setGraphicFrame(this);\n\t\treturn;\n\t}", "public void setIconName(String name) {\n\t\tthis.name = name;\n\t\tsetTooltipText();\n\t}", "private void setName(String imageUrl, String imageName, String roleName){\r\n Log.d(TAG, \"setName: setting name to widgets.\");\r\n TextView n = findViewById(R.id.textView);\r\n n.setText(imageName);\r\n TextView r = findViewById(R.id.textView1);\r\n r.setText(roleName);\r\n\r\n ImageView imageView = findViewById(R.id.profile_image);\r\n Glide.with(this)\r\n .asBitmap()\r\n .load(imageUrl)\r\n .into(imageView);\r\n }", "public void setStats(String imageName) {\n\t\tmyObjectStatsPanel.setStats(myImageToObjectStatsMap.get(imageName));\n\t}", "public void setImage(Context ctx, String image)\n {\n }", "public void setImageView(double x, double y) {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image);\n \tboss.setTranslateX(x);\n \tboss.setTranslateY(y);\n }", "private void setIcon() {\n \n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"iconabc.png\")));\n }", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"/Icons/logo musica.png\")));\n }", "void setIcon(String current) {\n\tif (current != null && (!current.equals(currentName) || mapList == null)) {\n mapList = main.myData.getGridLinks(current);\n\n removeAll();\n if (mapList == null) {\n revalidate();\n return;\n }\n\n\t currentName = current;\n\n TreeSet ts = new TreeSet(Collator.getInstance(Locale.FRANCE));\n ts.addAll(mapList.keySet());\n Iterator iter = ts.iterator();\n ArrayList panels = new ArrayList();\n int idx = 0;\n int x = 0;\n int y = 0;\n while (iter.hasNext()) {\n String gridid = (String) iter.next();\n String[] refmap = (String[]) mapList.get(gridid);\n ImagePanel p = new ImagePanel(refmap);\n\n if (gridid.matches(\"[0-9],[0-9]\")) {\n x = Integer.parseInt\n (gridid.substring(0, gridid.indexOf(',')));\n y = Integer.parseInt\n (gridid.substring(gridid.indexOf(',')+1));\n }\n else {\n x = idx%4;\n y = idx/4;\n idx++;\n }\n\n // Prepare y-panels\n for (int i = panels.size(); i <= y; i++)\n panels.add(new ArrayList());\n\n // Prepare x-panels\n ArrayList al = (ArrayList) panels.get(y);\n for (int i = al.size(); i <= x; i++)\n al.add(null);\n\n al.set(x, p);\n }\n\n GridBagConstraints constr = new GridBagConstraints();\n constr.fill = GridBagConstraints.BOTH;\n constr.weightx = constr.weighty = 1;\n constr.insets = new Insets(5,5,5,5);\n for (int i = 0; i < panels.size(); i++) {\n ArrayList al = (ArrayList) panels.get(i);\n for (int j = 0; j < al.size(); j++) {\n JComponent px = new JPanel();\n constr.gridx = j;\n constr.gridy = i;\n if (al.get(j) != null)\n px = (ImagePanel)al.get(j);\n add(px, constr);\n }\n }\n\n\t // Adapt the display\n\t revalidate();\n\t}\n }", "private void changePicture(String s)\n {\n ImageView userPic = (ImageView)findViewById(R.id.imageViewOther);\n\n Glide.with(this)\n .asBitmap()\n .load(s)\n .into(userPic);\n }", "private void changeGraphic(ToggleButton toggleButton, Image diceImage){\n\t toggleButton.setGraphic(new ImageView(diceImage));\n\t}", "private void setChatContactPhoto(ChatSession chatSession)\n {\n this.contactPhotoPanel.setChatSession(chatSession);\n\n byte[] chatAvatar = chatSession.getChatAvatar();\n\n ImageIcon contactPhotoIcon;\n if (chatAvatar != null && chatAvatar.length > 0)\n {\n contactPhotoIcon = ImageUtils.getScaledRoundedIcon(chatAvatar,\n 128,\n 128);\n\n if (contactPhotoIcon != null)\n this.setIconImage(contactPhotoIcon.getImage());\n }\n else\n {\n this.setIconImage(ImageLoader\n .getImage(ImageLoader.SIP_COMMUNICATOR_LOGO));\n }\n }", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"radarlogoIcon.png\")));\n }", "void setFigure(FigureInfo f);", "void plot(Point2D coordinates, int color) {\n image.setRGB((int)coordinates.getX(), (int)coordinates.getY(), color);\n }", "public void setImg() {\n\t\tif (custom) {\n\t\t\tImage img1;\n\t\t\ttry {\n\t\t\t\timg1 = new Image(new FileInputStream(\"tmpImg.png\"));\n\t\t\t\tmainAvatar.setImage(img1); // Sets main user avatar as the custom image\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void _setPlotDefId(final String plotDefId) {\n logger.debug(\"_setPlotDefId {}\", plotDefId);\n\n this.plotDefId = plotDefId;\n\n // do not change plotId\n }", "@Override\n public void setProfileImage(String s, String s1) {\n }", "public void setIcon(Image i) {icon = i;}", "private void setICon() {\r\n \r\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"IconImage_1.png\")));\r\n }", "public void setWechatImg(String wechatImg) {\r\n\t\tthis.wechatImg = wechatImg;\r\n\t}", "public void changePicture() {\n ImageView imgView = (ImageView)findViewById(R.id.poll_object_btn_image);\n Resources res = getContext().getResources();\n if(type == \"generic\") {\n //add the new picture for the generic type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n else if(type == \"location\") {\n //add the new picture for the location type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n else if(type == \"picture\"){\n //add the new picture for the picture type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n }", "protected void setPic() {\n }", "public void titleImage(){\r\n\t\tint x = 75;\r\n\t\tint y = 100;\r\n\t\t//Title is displayed\r\n\t\tString title = \"Ticket Master\";\r\n\t\ttitleImage = new GLabel(title,x,y);\r\n\t\ttitleImage.setColor(Color.green);\r\n\t\ttitleImage.setFont(\"Arial-100\");\r\n\t\tcanvas.add(titleImage);\r\n\t}", "public void setImage (Product product) {\n\t\t//TODO beh�ver hj�lp. hur s�tter jag mha referens till objektet bilden?\n\t\tpictureLbl.setText(\"\");\n\t\t//picLbl.setIcon(product.getImageName());\n\t\tpictureLbl.repaint();\n\t}", "private void setPieceIconAndName(int rowIndex, int colIndex, PieceName pieceName){\n\t\tboolean isBlack = (rowIndex == 0 || rowIndex == 1) ? true : false;\n\t\tboolean isWhite = (rowIndex == 6 || rowIndex == 7) ? true : false;\n\t\tString fileExt = \".gif\";\n\t\tString filePackagePath = \"chess/icon/\";\n\t\tString fileName; \n\t\tPieceColor pieceColor; \n\n\t\tif(isBlack||isWhite){\n\t\t\tif(isBlack)\n\t\t\t{\t\n\t\t\t\tfileName = filePackagePath+\"b\"+pieceName+fileExt;\n\t\t\t\tpieceColor = PieceColor.BLACK;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfileName = filePackagePath+\"w\"+pieceName+fileExt; \n\t\t\t\tpieceColor = PieceColor.WHITE;\n\t\t\t} \n\t\t\tpieces[pieceCounter].setPieceIcon(getImage(getCodeBase(), fileName)); \n\t\t\tpieces[pieceCounter].setColor(pieceColor);\n\t\t}else{\n\t\t\tSystem.out.println(\"Error input Position\");\n\t\t} \n\t}", "@Override\n\tpublic void setName(String name) {\n\t\tfanChart.setName(name);\n\t}", "public void setImage( String s )\r\n {\r\n java.net.URL url = getClass().getResource( s );\r\n if ( url == null )\r\n {\r\n url = getClass().getResource( \"/\" + s );\r\n if ( url == null )\r\n {\r\n try\r\n { // for applications\r\n content = ImageIO.read( new File( s ) );\r\n }\r\n catch ( IOException ioe )\r\n {\r\n ioe.printStackTrace();\r\n }\r\n }\r\n else\r\n {\r\n content = getToolkit().getImage( url );\r\n }\r\n }\r\n else\r\n {\r\n content = getToolkit().getImage( url );\r\n }\r\n flush();\r\n\r\n }", "public void setDefaults(String imgName) {\n\t\tmyImageToObjectStatsMap.put(imgName, myObjectStatsPanel.exportStats());\n\t}", "private void SetIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"Icon.png.png\")));\n }", "public void setPlotType(@NotNull TICPlotType plotType) {\n this.plotType.set(plotType);\n }", "public void setTheGreenfootImage(String value){\n theGreenfootImage = value;\n }", "public void pointsImage(int points){\r\n\t\tint x = 10;\r\n\t\tint y = 30;\r\n\t\t//strPoints are given coordinates, a color, and a font\r\n\t\tString strPoints = \"Points = \";\r\n\t\tpointsImage = new GLabel(strPoints,x,y);\r\n\t\tpointsImage.setColor(Color.green);\r\n\t\tpointsImage.setFont(\"Arial-30\");\r\n\t\t//strPoints added to the canvas\r\n\t\tcanvas.add(pointsImage);\r\n\t\t//points are given coordinates, a unique color, and a font\r\n\t\tpointsImage1 = new GLabel(String.valueOf(points),125,y);\r\n\t\tif(points >= 0){\r\n\t\t\tpointsImage1.setColor(Color.green);\r\n\t\t}if(points < 0){\r\n\t\t\tpointsImage1.setColor(Color.red);\r\n\t\t}\r\n\t\tpointsImage1.setFont(\"Arial-30\");\r\n\t\t//points added to the canvas\r\n\t\tcanvas.add(pointsImage1);\r\n\t}", "void setImageResource(String imageResource) throws IOException;", "private void setCategoryImage(ImageView imageView, String url, TextView tV_category, String categoryName, int color) {\n // set image\n /* if (url!=null && !url.isEmpty())\n Picasso.with(mActivity)\n .load(url)\n .placeholder(R.drawable.default_circle_img)\n .error(R.drawable.default_circle_img)\n .into(imageView);*/\n\n if (url != null && !url.isEmpty())\n Glide.with(mActivity)\n .load(url)\n //.placeholder(R.drawable.default_circle_img)\n .error(R.drawable.default_circle_img)\n .into(imageView);\n\n // set category name\n if (categoryName != null) {\n // make first character of character is uppercase\n categoryName = categoryName.substring(0, 1).toUpperCase() + categoryName.substring(1).toLowerCase();\n tV_category.setText(categoryName);\n tV_category.setTextColor(color);\n }\n }", "public void setImageView(ImageView imageView){\r\n _imageView = imageView;\r\n }", "public void setImageView(ImageView imageView){\r\n _imageView = imageView;\r\n }", "void setIcon(){\n URL pathIcon = getClass().getResource(\"/sigepsa/icono.png\");\n Toolkit kit = Toolkit.getDefaultToolkit();\n Image img = kit.createImage(pathIcon);\n setIconImage(img);\n }", "private void setStudentImage() {\n ImagePicker.create(this)\n .single()\n .origin(images)\n .imageTitle(\"Tap to select student profile\") // image selection title\n .start(REQUEST_CODE_PICKER); // start image picker activity with request code\n }", "public void setImage(String Image) {\n this.Image = Image;\n }", "public void sendPlotOptions() {\r\n JsonObject plotOptions = getPlotOptions();\r\n //System.out.println(\"plotOptionsObject: \" + plotOptionsObject.toJson());\r\n for (SNPPlot chart : new SNPPlot[] {femaleChart, maleChart}) {\r\n chart.sendPlotOptions(plotOptions);\r\n }\r\n }", "@Override\n protected void onBeforeClusterItemRendered(Person person, MarkerOptions markerOptions) {\n mImageView.setImageResource(person.profilePhoto);\n Bitmap icon = mIconGenerator.makeIcon();\n //write your info code here\n markerOptions.icon(BitmapDescriptorFactory.fromBitmap(icon)).title(person.name);\n }", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"croissant.png\")));\n }", "public String GetXYSplineChartImage() {\n\t\treturn m_XYSplineChartImage;\n\t}", "private void setImage(){\n if(objects.size() <= 0)\n return;\n\n IImage img = objects.get(0).getImgClass();\n boolean different = false;\n \n //check for different images.\n for(IDataObject object : objects){\n IImage i = object.getImgClass();\n \n if((img == null && i != null) || \n (img != null && i == null)){\n different = true;\n break;\n }else if (img != null && i != null){ \n \n if(!i.getName().equals(img.getName()) ||\n !i.getDir().equals(img.getDir())){\n different = true;\n break;\n }\n } \n }\n \n if(!different){\n image.setText(BUNDLE.getString(\"NoImage\"));\n if(img != null){\n imgName = img.getName();\n imgDir = img.getDir();\n image.setImage(img.getImage());\n }else{\n image.setImage(null);\n }\n }else{\n image.setText(BUNDLE.getString(\"DifferentImages\"));\n }\n \n image.repaint();\n }", "public void setWeatherImage(java.lang.String weatherImage)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(WEATHERIMAGE$2, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(WEATHERIMAGE$2);\n }\n target.setStringValue(weatherImage);\n }\n }", "@Override\n protected void onBeforeClusterItemRendered(LocationInfo locationInfo, MarkerOptions markerOptions) {\n// mImageView.setImageResource(person.profilePhoto);\n// Bitmap icon = mIconGenerator.makeIcon();\n// markerOptions.icon(BitmapDescriptorFactory.fromBitmap(icon)).title(person.name);\n // Draw a single person.\n // Set the info window to show their name.\n mImageView.setImageResource(mapPointCircle);\n// Bitmap icon = mIconGenerator.makeIcon();\n markerOptions.icon(getPointIcon()).title(locationInfo.getTitle());\n markerOptions.anchor(0.5f, 0.5f);\n }", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"icon.png\")));\n }", "private void setIcon() {\n this.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"logo.ico\")));\n }", "public void setImageView(ImageView imageView) {\r\n _imageView = imageView;\r\n }", "public void setImg( String address, JLabel jlbl ) {\n jlbl.setIcon( new ImageIcon(address) );\n jlbl.setHorizontalAlignment( JLabel.CENTER );\n }", "private void setImageButtonImage(int typeIconId) {\n ImageButton btn = (ImageButton) findViewById(R.id.btn_typeIcon);\n\n TypeIcon typeIcon = MainActivity.getTypeIconById(typeIconId);\n\n // Gets the id of the actual image to display, using the name of the TypeIcon\n String name = typeIcon.getDrawablePath();\n final int id = getResources().getIdentifier(name, \"drawable\", getPackageName());\n btn.setImageResource(id);\n\n iconId = typeIconId;\n }", "public static void scatterPlot(String title, int[] arr) \n {\n XYChartBuilder builder = new XYChartBuilder();\n builder.width(800);\n builder.height(600);\n builder.title(\"Int array values\");\n builder.xAxisTitle(\"Index\");\n builder.yAxisTitle(\"Number\");\n\n // Add data and title to the chart\n XYChart chart = builder.build();\n chart.getStyler().setDefaultSeriesRenderStyle(XYSeriesRenderStyle.Scatter);\n chart.getStyler().setMarkerSize(2);\n\n XYSeries series = chart.addSeries(title, null, arr);\n series.setMarkerColor(Color.BLACK);\n\n // display the chart:\n new SwingWrapper(chart).displayChart();\n }", "public void setStaticPicture(String path);", "public void setPlotId(final String plotId) {\n logger.debug(\"setPlotId {}\", plotId);\n\n final String prevPlotId = this.plotId;\n\n _setPlotId(plotId);\n\n if (plotId != null && !ObjectUtils.areEquals(prevPlotId, plotId)) {\n logger.debug(\"firePlotChanged {}\", plotId);\n\n // bind(plotId) ?\n // fire PlotChanged event to initialize correctly the widget:\n ocm.firePlotChanged(null, plotId, this); // null forces different source\n }\n }", "public void Set3DBarChartImage(String threeDBar) {\n\t\tboolean test = true;\n\t\t\n\t\tif((threeDBar.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"Set3DBarChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((threeDBar.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"Set3DBarChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"Set3DBarChartImage():: chosen image is set to: \" \n\t\t \t+ threeDBar);\n\t\t}\n\t\tm_3DBarChartImage = threeDBar;\n\t}", "private void setImageOnGUI() {\n\n // Capture position and set to the ImageView\n if (AppConstants.fullScreenBitmap != null) {\n fullScreenSnap.setImageBitmap(AppConstants.fullScreenBitmap);\n }\n\n }", "public void setProfileImg() {\n }", "private void iconImage() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"icon.jpg\")));\n }", "private void showImage() {\n this.animalKind = (String) imageCbox.getSelectedItem();\n try {\n ImageIcon imageIcon = new ImageIcon(getClass().getResource(\"/\" + animalKind + \"E.png\")); // load the image to a imageIcon\n Image image = imageIcon.getImage(); // transform it\n Image newImg = image.getScaledInstance(120, 120, Image.SCALE_SMOOTH); // scale it the smooth way\n imageIcon = new ImageIcon(newImg);// transform it back\n imgLabel.setIcon(imageIcon);\n this.add(imgLabel, gbc);\n\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n repaint();\n }", "public void set(Image img, int line, int column, Point higher, Point lower, int size) {\n if (hasComponent(line, column)) {\n DisplayComponent dc = components[line][column];\n if (dc instanceof SpriteComponent) {\n SpriteComponent spritec = (SpriteComponent) components[line][column];\n spritec.set(img);\n } else {\n components[line][column] = new SpriteComponent(img, higher, lower, size);\n }\n } else {\n components[line][column] = new SpriteComponent(img, higher, lower, size);\n }\n\n repaint(column * fontSize, line * fontSize, size, size);\n }", "public void setEatImage(java.lang.String param) {\n localEatImageTracker = true;\n\n this.localEatImage = param;\n }", "@SuppressLint(\"NewApi\")\n\tvoid changeIcon()\n\t{\n\n\t\tif (CropImage.isExplicitCameraPermissionRequired(this)) {\n\t\t\trequestPermissions(new String[]{Manifest.permission.CAMERA,Manifest.permission.WRITE_EXTERNAL_STORAGE}, CropImage.CAMERA_CAPTURE_PERMISSIONS_REQUEST_CODE);\n\t\t} else {\n\t\t\tCropImage.startPickImageActivity(this);\n\t\t}\n\n\n\t}", "private void drawImage(){\n Integer resourceId = imageId.get(this.name);\n if (resourceId != null) {\n drawAbstract(resourceId);\n } else {\n drawNone();\n }\n }", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"MainLogo.png\")));\n }", "private void setImage() {\n\t\t\n\t\tfor(int i=0; i<user.getIsVisited().length; i++) {\n\t\t\tif(user.getIsVisited()[i])\n\t\t\t\tspots[i].setBackgroundResource(R.drawable.num1_certified + i*2);\n\t\t\telse\n\t\t\t\tspots[i].setBackgroundResource(R.drawable.num1 + i*2);\n\t\t}\n\t}", "public ScatterPlot(HighlightManager highlightManager, \r\n GeoData xGeoData, \r\n GeoData yGeoData,\r\n String xLabel,\r\n String yLabel)\r\n {\r\n xData_ = xGeoData;\r\n yData_ = yGeoData;\r\n highlightManager_ = highlightManager;\r\n xLabel_ = xLabel;\r\n yLabel_ = yLabel;\r\n\r\n\r\n highlightManager_.addHighlightChangedListener(this);\r\n\r\n\r\n // Set up the mouse motion listener\r\n addMouseMotionListener(this);\r\n\r\n\r\n // Get the size of the GeoData (assuming the size of the xGeoData\r\n // equals the size of the yGeoData\r\n xSize_ = xData_.getSize(); \r\n\r\n\r\n fillVector();\r\n }", "void setShapeLabel(String Label);", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"img/icon.png\")));\n }", "public final void setImage(java.lang.String image)\n\t{\n\t\tsetImage(getContext(), image);\n\t}", "public void addToPlotAction(final GenericPlotFrame frame) {\n final PlotProperties props = frame.getPlotProperties();\n addPlotRegister(props);\n frame.getPlotPanel().updateRegisters();\n }", "private void _setPlotId(final String plotId) {\n logger.debug(\"_setPlotId {}\", plotId);\n\n this.plotId = plotId;\n\n // reset case:\n if (plotId == null) {\n // reset plotDefId:\n if (this.plotDefId != null) {\n _setPlotDefId(null);\n }\n\n // TODO: how to fire reset event ie DELETE(id)\n resetForm();\n }\n }", "private void setCategory(String s, int src) {\n CategoryText = findViewById(R.id.transaction_select_category);\n categoryImage = findViewById(R.id.category_image);\n CategoryText.setText(s);\n categoryName = s;\n categoryImage.setImageResource(src);\n categoryImage.setTag(src);\n imgSrc = src;\n }", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"podologia32x32.png\")));\n }", "public void setLogotipo(ImageIcon imagem) {\n jLabelLogotipo.setIcon(imagem);\n }", "public ChartTypeChooser(GUI host){\n\t\tthis.SetHost(host);\n\t\tthis.SetPieChartImage(\"pie_chart.jpg\");\n\t\tthis.SetXYSplineChartImage(\"XYSpline.jpg\");\n\t\tthis.SetBarChartImage(\"bar_chart.jpg\");\n\t\tthis.SetStackedAreaChartImage(\"stacked_area.jpg\");\n\t\tthis.SetScatterPlotChartImage(\"scatter.jpg\");\n\t\tthis.SetLineChartImage(\"line.jpg\");\n\t\tthis.SetBubbleChartImage(\"BubbleChart.jpg\");\n\t\tthis.Set3DBarChartImage(\"3d_bar_chart.jpg\"); \n\t}" ]
[ "0.6595313", "0.61293346", "0.6057589", "0.5886566", "0.5764355", "0.5665403", "0.5504946", "0.55005884", "0.54824394", "0.54442954", "0.5413678", "0.5365177", "0.533807", "0.5183485", "0.5121215", "0.5102598", "0.50477743", "0.50325555", "0.49590045", "0.49561524", "0.49521834", "0.4915826", "0.48756498", "0.48672754", "0.48443705", "0.48430347", "0.48387617", "0.48356336", "0.48354444", "0.48119918", "0.4800747", "0.47760466", "0.47601965", "0.47529992", "0.4750479", "0.47499597", "0.4745581", "0.47414765", "0.47414425", "0.47381306", "0.47376606", "0.47325206", "0.47317886", "0.47301012", "0.4728421", "0.47265875", "0.47209784", "0.4709451", "0.4708529", "0.4692202", "0.46886182", "0.4687518", "0.4684936", "0.46809083", "0.46776742", "0.46723014", "0.46688375", "0.46646947", "0.46563", "0.46562034", "0.46562034", "0.46504775", "0.4647215", "0.46442476", "0.46407253", "0.46372804", "0.46351027", "0.46342033", "0.46294248", "0.46248665", "0.4624183", "0.4623944", "0.461586", "0.46153098", "0.46093535", "0.4609025", "0.46075523", "0.46062276", "0.4604599", "0.45904157", "0.45871672", "0.45797613", "0.45764172", "0.457478", "0.4574192", "0.457351", "0.45732656", "0.45727545", "0.45604876", "0.45597622", "0.45586005", "0.45560238", "0.4554642", "0.45437038", "0.4540146", "0.45371333", "0.45352116", "0.45311537", "0.45213026", "0.45202312" ]
0.84903556
0
A method that sets the stacked area chart image name \param stackedArea
public void SetStackedAreaChartImage(String stackedArea) { boolean test = true; if((stackedArea.isEmpty()) && (test)) { System.err.println("*** Warning ChartTypeChooser::" + "SetStackedAreaChartImage():: image is set to an empty string."); } if ((stackedArea.length() > MAX_SIZE) && (test)) { System.err.println("*** Warning ChartTypeChooser::" + "SetStackedAreaChartImage():: image is a very long name."); } else if (test) { System.out.println("ChartTypeChooser:: " + "SetStackedAreaChartImage():: chosen image is set to: " + stackedArea); } m_StackedAreaChartImage = stackedArea; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String GetStackedAreaChartImage() {\n\t\treturn m_StackedAreaChartImage;\n\t}", "public void MakeStacked() {\n\t\tStackedButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetStackedAreaChartImage())));\n\t\tStackedButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Stacked Area Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(StackedButton);\n\t}", "public void SetBarChartImage(String bar) {\n\t\tboolean test = true;\n\t\t\n\t\tif((bar.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"SetBarChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((bar.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"SetBarChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"SetBarChartImage():: chosen image is set to: \" \n\t\t \t+ bar);\n\t\t}\n\t\tm_BarChartImage = bar;\n\t}", "public void SetXYSplineChartImage(String XYSpline) {\n\t\tboolean test = true;\n\t\t\n\t\tif((XYSpline.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"SetXYSplineChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((XYSpline.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"SetXYSplineChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"SetXYSplineChartImage():: chosen image is set to: \" \n\t\t \t+ XYSpline);\n\t\t}\n\t\tm_XYSplineChartImage = XYSpline;\n\t}", "private void solveHStackedBar(StackedBarSymbol stackedBar) {\n if (getHost() == null || getHost().getProjection() == null) {\n return;\n }\n stackedBar.setHost(getHost());\n stackedBar.normalize();\n Projection w2d = getHost().getProjection();\n Point2D p2dUser = null;\n if (stackedBar.isAscent()) {\n p2dUser = new Point2D.Double(stackedBar.getBase()\n + stackedBar.getValue(), 0);\n }\n if (stackedBar.isDescent()) {\n p2dUser = new Point2D.Double(stackedBar.getBase()\n - stackedBar.getValue(), 0);\n }\n if (!stackedBar.isValueSet()) {\n throw new IllegalArgumentException(\n \"stacked bar symbol ascent or descent value should be supplied.\");\n }\n if (!stackedBar.isBaseSet()) {\n throw new IllegalArgumentException(\n \"stacked bar symbol base value should be supplied.\");\n }\n Point2D p2ddevice = w2d.userToPixel(p2dUser);\n\n Point2D p2dUserBase = new Point2D.Double(stackedBar.getBase(), 0);\n Point2D p2ddeviceBase = w2d.userToPixel(p2dUserBase);\n\n double y = getComponentYLocation(stackedBar);\n double x = p2ddeviceBase.getX();\n if (stackedBar.isAscent()) {\n x = p2ddeviceBase.getX();\n }\n if (stackedBar.isDescent()) {\n x = p2ddevice.getX();\n }\n\n double height = stackedBar.getThickness();\n double width = Math.abs(p2ddevice.getX() - p2ddeviceBase.getX());\n\n if (stackedBar.getMorpheStyle() == MorpheStyle.Round) {\n double round = stackedBar.getRound();\n GeneralPath barPath = new GeneralPath();\n if (stackedBar.isAscent()) {\n barPath.moveTo(x, y);\n barPath.lineTo(x + width - round, y);\n barPath.quadTo(x + width, y, x + width, y + round);\n barPath.lineTo(x + width, y + height - round);\n barPath.quadTo(x + width, y + height, x + width - round, y\n + height);\n barPath.lineTo(x, y + height);\n barPath.closePath();\n }\n else if (stackedBar.isDescent()) {\n barPath.moveTo(x + round, y);\n barPath.lineTo(x + width, y);\n barPath.lineTo(x + width, y + height);\n barPath.lineTo(x + round, y + height);\n barPath.quadTo(x, y + height, x, y + height - round);\n barPath.lineTo(x, y + round);\n barPath.quadTo(x, y, x + round, y);\n barPath.closePath();\n }\n stackedBar.setBarShape(barPath);\n }\n else {\n Rectangle2D barRec = new Rectangle2D.Double(x, y, width, height);\n stackedBar.setBarShape(barRec);\n }\n\n // stack Fill\n List<Stack> stacks = stackedBar.getStacks();\n\n int count = 0;\n for (Stack stack : stacks) {\n\n // data from host bar\n stack.setThickness(stackedBar.getThickness());\n stack.setBase(stackedBar.getStackBase(stack));\n stack.setNature(stackedBar.getNature());\n stack.setBarFill(stackedBar.getBarFill());\n\n if (stackedBar.isAscent()) {\n stack.setAscentValue(stack.getNormalizedValue());\n }\n else if (stackedBar.isDescent()) {\n stack.setDescentValue(stack.getNormalizedValue());\n }\n\n Point2D stackedp2dUser = null;\n if (stackedBar.isAscent()) {\n stackedp2dUser = new Point2D.Double(\n stackedBar.getStackBase(stack)\n + stack.getNormalizedValue(), 0);\n }\n else if (stackedBar.isDescent()) {\n stackedp2dUser = new Point2D.Double(\n stackedBar.getStackBase(stack)\n - stack.getNormalizedValue(), 0);\n }\n Point2D stackedp2ddevice = w2d.userToPixel(stackedp2dUser);\n\n Point2D stackedp2dUserBase = new Point2D.Double(\n stackedBar.getStackBase(stack), 0);\n Point2D stackedp2ddeviceBase = w2d.userToPixel(stackedp2dUserBase);\n\n double stackedy = getComponentYLocation(stackedBar);\n double stackedx = stackedp2ddeviceBase.getX();\n if (stackedBar.isAscent()) {\n stackedx = stackedp2ddeviceBase.getX();\n }\n if (stackedBar.isDescent()) {\n stackedx = stackedp2ddevice.getX();\n }\n double stackedheight = stackedBar.getThickness();\n double stackedwidth = Math.abs(stackedp2ddevice.getX()\n - stackedp2ddeviceBase.getX());\n\n if (stackedBar.getMorpheStyle() == MorpheStyle.Round) {\n if (count == stacks.size() - 1) {\n double round = stackedBar.getRound();\n GeneralPath barPath = new GeneralPath();\n if (stackedBar.isAscent()) {\n barPath.moveTo(stackedx, stackedy);\n barPath.lineTo(stackedx + stackedwidth - round,\n stackedy);\n barPath.quadTo(stackedx + stackedwidth, stackedy,\n stackedx + stackedwidth, stackedy + round);\n barPath.lineTo(stackedx + stackedwidth, stackedy\n + stackedheight - round);\n barPath.quadTo(stackedx + stackedwidth, stackedy\n + stackedheight, stackedx + stackedwidth\n - round, stackedy + stackedheight);\n barPath.lineTo(stackedx, stackedy + stackedheight);\n barPath.closePath();\n }\n else if (stackedBar.isDescent()) {\n barPath.moveTo(stackedx + round, stackedy);\n barPath.lineTo(stackedx + stackedwidth, stackedy);\n barPath.lineTo(stackedx + stackedwidth, stackedy\n + stackedheight);\n barPath.lineTo(stackedx + round, stackedy\n + stackedheight);\n barPath.quadTo(stackedx, stackedy + stackedheight,\n stackedx, stackedy + stackedheight - round);\n barPath.lineTo(stackedx, stackedy + round);\n barPath.quadTo(stackedx, stackedy, stackedx + round,\n stackedy);\n barPath.closePath();\n }\n stack.setBarShape(barPath);\n }\n else {\n Rectangle2D barRec = new Rectangle2D.Double(stackedx,\n stackedy, stackedwidth, stackedheight);\n stack.setBarShape(barRec);\n }\n }\n else {\n Rectangle2D barRec = new Rectangle2D.Double(stackedx, stackedy,\n stackedwidth, stackedheight);\n stack.setBarShape(barRec);\n }\n\n // stack.setBar(stack);\n\n count++;\n }\n\n }", "public void setSelectedImgOver(YuiImage selectedImgOver) {\r\n\t\tthis.selectedImgOver = selectedImgOver;\r\n\t}", "private void solveVStackedBar(StackedBarSymbol stackedBar) {\n if (getHost() == null || getHost().getProjection() == null) {\n return;\n }\n stackedBar.setHost(getHost());\n stackedBar.normalize();\n Projection w2d = getHost().getProjection();\n Point2D p2dUser = null;\n if (stackedBar.isAscent()) {\n p2dUser = new Point2D.Double(0, stackedBar.getBase()\n + stackedBar.getValue());\n }\n if (stackedBar.isDescent()) {\n p2dUser = new Point2D.Double(0, stackedBar.getBase()\n - stackedBar.getValue());\n }\n if (!stackedBar.isValueSet()) {\n throw new IllegalArgumentException(\n \"stacked bar symbol ascent or descent value should be supplied.\");\n }\n if (!stackedBar.isBaseSet()) {\n throw new IllegalArgumentException(\n \"stacked bar symbol base value should be supplied.\");\n }\n\n Point2D p2ddevice = w2d.userToPixel(p2dUser);\n\n Point2D p2dUserBase = new Point2D.Double(0, stackedBar.getBase());\n Point2D p2ddeviceBase = w2d.userToPixel(p2dUserBase);\n\n double x = getComponentXLocation(stackedBar);\n double y = p2ddevice.getY();\n if (stackedBar.isAscent()) {\n y = p2ddevice.getY();\n }\n if (stackedBar.isDescent()) {\n y = p2ddeviceBase.getY();\n }\n\n double width = stackedBar.getThickness();\n double height = Math.abs(p2ddeviceBase.getY() - p2ddevice.getY());\n\n if (stackedBar.getMorpheStyle() == MorpheStyle.Round) {\n double round = stackedBar.getRound();\n if (stackedBar.isAscent()) {\n GeneralPath barPath = new GeneralPath();\n barPath.moveTo(x, y + round);\n barPath.lineTo(x, y + height);\n barPath.lineTo(x + width, y + height);\n barPath.lineTo(x + width, y + round);\n barPath.quadTo(x + width, y, x + width - round, y);\n barPath.lineTo(x + round, y);\n barPath.quadTo(x, y, x, y + round);\n barPath.closePath();\n stackedBar.setBarShape(barPath);\n }\n else if (stackedBar.isDescent()) {\n GeneralPath barPath = new GeneralPath();\n barPath.moveTo(x, y);\n barPath.lineTo(x, y + height - round);\n barPath.quadTo(x, y + height, x + round, y + height);\n barPath.lineTo(x + width - round, y + height);\n barPath.quadTo(x + width, y + height, x + width, y + height\n - round);\n barPath.lineTo(x + width, y);\n barPath.closePath();\n stackedBar.setBarShape(barPath);\n }\n }\n else if (stackedBar.getMorpheStyle() == MorpheStyle.Rectangle) {\n\n Rectangle2D barRec = new Rectangle2D.Double(x, y, width, height);\n stackedBar.setBarShape(barRec);\n }\n\n List<Stack> stacks = stackedBar.getStacks();\n\n int count = 0;\n for (Stack stack : stacks) {\n\n // data from host stacked bar\n stack.setThickness(stackedBar.getThickness());\n stack.setBase(stackedBar.getStackBase(stack));\n stack.setNature(stackedBar.getNature());\n stack.setBarFill(stackedBar.getBarFill());\n\n if (stackedBar.isAscent()) {\n stack.setAscentValue(stack.getNormalizedValue());\n }\n else if (stackedBar.isDescent()) {\n stack.setDescentValue(stack.getNormalizedValue());\n }\n\n Point2D stackedp2dUser = null;\n if (stackedBar.isAscent()) {\n stackedp2dUser = new Point2D.Double(0,\n stackedBar.getStackBase(stack)\n + stack.getNormalizedValue());\n }\n else if (stackedBar.isDescent()) {\n stackedp2dUser = new Point2D.Double(0,\n stackedBar.getStackBase(stack)\n - stack.getNormalizedValue());\n }\n\n Point2D stackedp2ddevice = w2d.userToPixel(stackedp2dUser);\n\n Point2D stackedp2dUserBase = new Point2D.Double(0,\n stackedBar.getStackBase(stack));\n Point2D stackedp2ddeviceBase = w2d.userToPixel(stackedp2dUserBase);\n\n double stackedx = getComponentXLocation(stackedBar);\n double stackedy = stackedp2ddevice.getY();\n if (stackedBar.isAscent()) {\n stackedy = stackedp2ddevice.getY();\n }\n if (stackedBar.isDescent()) {\n stackedy = stackedp2ddeviceBase.getY();\n }\n double stackedwidth = stackedBar.getThickness();\n double stackedheight = Math.abs(stackedp2ddeviceBase.getY()\n - stackedp2ddevice.getY());\n\n if (stackedBar.getMorpheStyle() == MorpheStyle.Round) {\n if (count == stacks.size() - 1) {\n double round = stackedBar.getRound();\n GeneralPath barPath = new GeneralPath();\n if (stackedBar.isAscent()) {\n barPath.moveTo(stackedx, stackedy + round);\n barPath.lineTo(stackedx, stackedy + stackedheight);\n barPath.lineTo(stackedx + stackedwidth, stackedy\n + stackedheight);\n barPath.lineTo(stackedx + stackedwidth, stackedy\n + round);\n barPath.quadTo(stackedx + stackedwidth, stackedy,\n stackedx + stackedwidth - round, stackedy);\n barPath.lineTo(stackedx + round, stackedy);\n barPath.quadTo(stackedx, stackedy, stackedx, stackedy\n + round);\n barPath.closePath();\n }\n else if (stackedBar.isDescent()) {\n barPath.moveTo(stackedx, stackedy);\n barPath.lineTo(stackedx, stackedy + stackedheight\n - round);\n barPath.quadTo(stackedx, stackedy + stackedheight,\n stackedx + round, stackedy + stackedheight);\n barPath.lineTo(stackedx + stackedwidth - round,\n stackedy + stackedheight);\n barPath.quadTo(stackedx + stackedwidth, stackedy\n + stackedheight, stackedx + stackedwidth,\n stackedy + stackedheight - round);\n barPath.lineTo(stackedx + stackedwidth, stackedy);\n barPath.closePath();\n }\n stack.setBarShape(barPath);\n }\n else {\n Rectangle2D barRec = new Rectangle2D.Double(stackedx,\n stackedy, stackedwidth, stackedheight);\n stack.setBarShape(barRec);\n }\n }\n else if (stackedBar.getMorpheStyle() == MorpheStyle.Rectangle) {\n Rectangle2D barRec = new Rectangle2D.Double(stackedx, stackedy,\n stackedwidth, stackedheight);\n stack.setBarShape(barRec);\n }\n\n count++;\n }\n }", "private void setImageOnGUI() {\n\n // Capture position and set to the ImageView\n if (AppConstants.fullScreenBitmap != null) {\n fullScreenSnap.setImageBitmap(AppConstants.fullScreenBitmap);\n }\n\n }", "public void setAreaName(String areaName) {\n this.areaName = areaName;\n }", "public void setAreaName(String areaName) {\n this.areaName = areaName;\n }", "public void createImageSet() {\n\t\t\n\t\t\n\t\tString image_folder = getLevelImagePatternFolder();\n \n String resource = \"0.png\";\n ImageIcon ii = new ImageIcon(this.getClass().getResource(image_folder + resource));\n images.put(\"navigable\", ii.getImage());\n\n\t}", "public String getAreaName() {\n\t\tif (areaName == null) {\n\t\t\tProtectedRegion p = getPlot();\n\t\t\tPlotInfo info = plugin.getPlotInfo(worldName, p.getId());\n\t\t\tif (info != null) {\n\t\t\t\tareaName = info.areaName;\n\t\t\t}\n\t\t}\n\t\treturn areaName;\n\t}", "public void fill()\n\t{\n\t\tColor[] colors = Color.values();\n\t\tFigure rf;\n\t\ton_stack.clear();\n\t\t\n\t\t// create regular rummikub figures\n\t\tfor (int n=1;n<14;n++)\n\t\t{\n\t\t\tfor(int c=0;c<4;c++)\n\t\t\t{\n\t\t\t\trf = new Figure();\n\t\t\t\trf.setColor(colors[c]);\n\t\t\t\ttry {\n\t\t\t\t\trf.setNumber(n);\n\t\t\t\t\trf.setInstance(1);\n\t\t\t\t} catch (GeneralException e) {\n\t\t\t\t}\n\t\t\t\trf.setPlacement(Placement.ON_STACK);\n\t\t\t\tthis.on_stack.add(rf);\n\t\t\t\t\n\t\t\t\trf = new Figure();\n\t\t\t\trf.setColor(colors[c]);\n\t\t\t\ttry {\n\t\t\t\t\trf.setNumber(n);\n\t\t\t\t\trf.setInstance(2);\n\t\t\t\t} catch (GeneralException e) {\n\t\t\t\t}\n\t\t\t\trf.setPlacement(Placement.ON_STACK);\n\t\t\t\tthis.on_stack.add(rf);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// create jokers\n\t\trf = new Figure();\n\t\ttry {\n\t\t\trf.setInstance(3);\n\t\t} catch (GeneralException e) {\n\t\t}\n\t\tthis.on_stack.add(rf);\n\t\trf = new Figure();\n\t\ttry {\n\t\t\trf.setInstance(4);\n\t\t} catch (GeneralException e) {\n\t\t}\n\t\tthis.on_stack.add(rf);\n\t\t\n\t}", "@Override\n public final void setArea(JQLayoutArea area)\n {\n if (area != null)\n {\n removeClass(area.getAreaClass().toString());\n }\n this.area = area;\n if (this.area != null)\n {\n addClass(this.area.getAreaClass().toString());\n }\n }", "public void areaTracker() {\n\n\t\turl = ClassLoader.getSystemClassLoader().getResource(\n\t\t\t\t\"res/floor_plan.jpg\");\n\n\t\t// file path is read to the buffered image\n\t\ttry {\n\t\t\ticon1 = ImageIO.read(url);\n\t\t} catch (IOException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// mouse listener (to display the selected area) for the mouse events\n\n\t\taddMouseListener(new MouseEventAdapterA());\n\t\tsetVisible(true);\n\t}", "@Override\r\n\t\t\t\tpublic void onAnimationEnd(Animation animation) {\n\t\t\t\t\tartwork_front.setImageBitmap(behind);\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onAnimationEnd(Animation animation) {\n\t\t\t\t\tartwork_front.setImageBitmap(behind);\r\n\t\t\t\t}", "public void setArea() {\n\t\tthis.area= height*width;\n\t}", "public void initGraph(StackPane stackPane, String lineChartTitle) {\n m_pLineChartTitle = lineChartTitle;\n m_pStackPane = stackPane;\n\n createChart(m_pLineChartTitle);\n if (m_pStackPane.getChildren().size() > 0) {\n m_pStackPane.getChildren().remove(0); // Remove the last line chart if there is\n }\n m_pStackPane.getChildren().add(m_pLineChart);\n addOrReplaceDataSeries();\n }", "public void setImageView() {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image); \n }", "private void setupBarChart() {\n mBarChart.setOnChartValueSelectedListener(this);\n mBarChart.getDescription().setEnabled(false);\n mBarChart.setDrawBorders(true);\n mBarChart.setBorderWidth(1.f);\n mBarChart.setBorderColor(Color.parseColor(\"#616161\"));\n mBarChart.setPinchZoom(true);\n mBarChart.setDrawBarShadow(false);\n mBarChart.setDrawGridBackground(false);\n mBarChart.setTouchEnabled(true);\n mBarChart.setDoubleTapToZoomEnabled(false);\n\n Legend l = mBarChart.getLegend();\n l.setVerticalAlignment(Legend.LegendVerticalAlignment.TOP);\n l.setHorizontalAlignment(Legend.LegendHorizontalAlignment.RIGHT);\n l.setOrientation(Legend.LegendOrientation.VERTICAL);\n l.setDrawInside(true);\n l.setYOffset(0f);\n l.setXOffset(10f);\n l.setYEntrySpace(0f);\n l.setTextSize(8f);\n\n// List<String> list = new ArrayList<String>();\n// for(Report report: mReportList){\n// list.add(report.monthYear);\n// }\n// final String[] stringMonthYear = list.toArray(new String[0]);\n\n XAxis xAxis = mBarChart.getXAxis();\n xAxis.setGranularity(1f);\n xAxis.setPosition(XAxis.XAxisPosition.TOP);\n xAxis.setCenterAxisLabels(true);\n xAxis.setValueFormatter(new IAxisValueFormatter() {\n @Override\n public String getFormattedValue(float value, AxisBase axis) {\n int n = (int) value;\n switch (n) {\n case 0:\n if(mReportList.size()<1){\n break;\n }\n return mReportList.get(0).monthYear;\n case 1:\n if(mReportList.size()<2){\n break;\n }\n return mReportList.get(1).monthYear;\n case 2:\n if(mReportList.size()<3){\n break;\n }\n return mReportList.get(2).monthYear;\n case 3:\n if(mReportList.size()<4){\n break;\n }\n return mReportList.get(3).monthYear;\n }\n if (n < 0) {\n return \"Tháng\";\n } else{\n return \"Tháng\";\n }\n }\n });\n\n YAxis leftAxis = mBarChart.getAxisLeft();\n leftAxis.setValueFormatter(new LargeValueFormatter());\n leftAxis.setDrawGridLines(false);\n leftAxis.setSpaceTop(35f);\n leftAxis.setAxisMinimum(0f); // this replaces setStartAtZero(true)\n\n mBarChart.getAxisRight().setEnabled(false);\n\n float groupSpace = 0.04f;\n float barSpace = 0.03f; // x2 dataset\n float barWidth = 0.45f; // x2 dataset\n // (0.45 + 0.03) * 2 + 0.04 = 1.00 -> interval per \"group\"\n\n int startMonth = 0;\n\n ArrayList<BarEntry> yValsThu = new ArrayList<BarEntry>();\n ArrayList<BarEntry> yValsChi = new ArrayList<BarEntry>();\n\n int i = 0;\n for (Report report : mReportList) {\n yValsThu.add(new BarEntry(i, (float) report.incomeTotal));\n yValsChi.add(new BarEntry(i, (float) report.expenseTotal));\n i++;\n }\n\n BarDataSet setThu, setChi;\n\n if (mBarChart.getData() != null && mBarChart.getData().getDataSetCount() > 0) {\n\n setThu = (BarDataSet) mBarChart.getData().getDataSetByIndex(0);\n setChi = (BarDataSet) mBarChart.getData().getDataSetByIndex(1);\n setThu.setValues(yValsThu);\n setChi.setValues(yValsChi);\n mBarChart.getData().notifyDataChanged();\n mBarChart.notifyDataSetChanged();\n\n } else {\n // create 4 DataSets\n setThu = new BarDataSet(yValsThu, \"Thu\");\n setThu.setColor(Color.parseColor(\"#64dd17\"));\n setChi = new BarDataSet(yValsChi, \"Chi\");\n setChi.setColor(Color.parseColor(\"#2196f3\"));\n\n BarData data = new BarData(setThu, setChi);\n data.setValueFormatter(new LargeValueFormatter());\n\n mBarChart.setData(data);\n }\n\n // specify the width each bar should have\n mBarChart.getBarData().setBarWidth(barWidth);\n\n // restrict the x-axis range\n mBarChart.getXAxis().setAxisMinimum(startMonth);\n\n // barData.getGroupWith(...) is a helper that calculates the width each group needs based on the provided parameters\n mBarChart.getXAxis().setAxisMaximum(startMonth + mBarChart.getBarData().getGroupWidth(groupSpace, barSpace) * mReportList.size());\n mBarChart.groupBars(startMonth, groupSpace, barSpace);\n for (IBarDataSet set : mBarChart.getData().getDataSets()) {\n ((BarDataSet) set).setBarBorderWidth(1.f);\n ((BarDataSet) set).setBarBorderColor(Color.parseColor(\"#616161\"));\n }\n mBarChart.invalidate();\n mBarChart.animateY(800);\n\n //[END Setup Bar Char]\n }", "public void setArea(String safeAreaData, String which) throws NoSuchElementException,\r\n\t\t\tNumberFormatException {\r\n\r\n\t\tdataStorage.setArea(safeAreaData, which);\r\n\t}", "public void setAreaId(Integer areaId) {\n this.areaId = areaId;\n }", "public void setAreaId(Integer areaId) {\n this.areaId = areaId;\n }", "void setImage(BufferedImage valueImage, BufferedImage BackImage);", "public void Set3DBarChartImage(String threeDBar) {\n\t\tboolean test = true;\n\t\t\n\t\tif((threeDBar.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"Set3DBarChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((threeDBar.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"Set3DBarChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"Set3DBarChartImage():: chosen image is set to: \" \n\t\t \t+ threeDBar);\n\t\t}\n\t\tm_3DBarChartImage = threeDBar;\n\t}", "public void SetLineChartImage(String line) {\n\t\tboolean test = true;\n\t\t\n\t\tif((line.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"SetLineChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((line.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"SetLineChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"SetLineChartImage():: chosen image is set to: \" \n\t\t \t+ line);\n\t\t}\n\t\tm_LineChartImage = line;\n\t}", "public String GetBarChartImage() {\n\t\treturn m_BarChartImage;\n\t}", "public void fillShipPictureLabel() {\n\t\tString shipsName = this.ship.getShipName();\n\t\tif (shipsName == \"Thousand Sunny\") {\n\t\t\tshipPictureLabel.setIcon(new ImageIcon(SetupAdventureScreen.class.getResource(\"/images/ThousandSunny.png\")));\n\t\t}\n\t\telse if (shipsName == \"Black Pearl\") {\n\t\t\tshipPictureLabel.setIcon(new ImageIcon(SetupAdventureScreen.class.getResource(\"/images/BlackPearl.png\")));\n\t\t}\n\t\telse if (shipsName == \"Victoria Hunter\") {\n\t\t\tshipPictureLabel.setIcon(new ImageIcon(SetupAdventureScreen.class.getResource(\"/images/VictoriaHunter.png\")));\n\t\t}\n\t\telse {\n\t\t\tshipPictureLabel.setIcon(new ImageIcon(SetupAdventureScreen.class.getResource(\"/images/StarOne.png\")));\n\t\t}\n\t}", "public void addImagePlot(String path, Color color_fondo_chart, Color color_fondo_plot){\n try {\n String path_project = getClass().getClassLoader().getResource(\".\").getPath();\n \n File file = new File(path_project + path);\n BufferedImage image = ImageIO.read(file);\n //chart.setBackgroundImage(image);\n chart.setBackgroundPaint(color_fondo_chart);\n \n //color del fondo\n //plot.setBackgroundPaint(new Color(255, 228, 196));\n plot.setBackgroundPaint(color_fondo_plot);\n \n //agregar imagen de fondo\n plot.setBackgroundImage(image);\n \n } catch (IOException e) {\n System.out.println(\"Error al abrir el archivo \" +e.getMessage());\n }\n }", "private BarData generateBarData() {\n ArrayList<BarEntry> entries2 = new ArrayList<BarEntry>();\n\n /*\n for (int index = 0; index < itemcount; index++) {\n entries1.add(new BarEntry(0, 25));\n\n // stacked\n entries2.add(new BarEntry(0, new float[]{13, 13}));\n }*/\n entries2.add(new BarEntry(0, 3f));\n\n\n// BarDataSet set1 = new BarDataSet(entries1, \"Bar 1\");\n// set1.setColor(Color.rgb(60, 220, 78));\n// set1.setValueTextColor(Color.rgb(60, 220, 78));\n// set1.setValueTextSize(10f);\n// set1.setAxisDependency(YAxis.AxisDependency.LEFT);\n\n BarDataSet set2 = new BarDataSet(entries2, \"\");\n// set2.setStackLabels(new String[]{\"Stack 1\", \"Stack 2\"});\n// set2.setColors(new int[]{Color.rgb(61, 165, 255), Color.rgb(23, 197, 255)});\n set2.setColor(getResources().getColor(R.color.chart_red));\n set2.setValueTextColor(Color.rgb(61, 165, 255));\n\n set2.setValueTextSize(10f);\n set2.setHighlightEnabled(false);\n\n set2.setAxisDependency(YAxis.AxisDependency.LEFT);\n\n float barWidth = (hoursArray.size() + 1) * 2f; // x2 dataset\n // (0.45 + 0.02) * 2 + 0.06 = 1.00 -> interval per \"group\"\n\n BarData d = new BarData(set2);\n d.setBarWidth(barWidth);\n d.setValueTextSize(0f);\n\n // make this BarData object grouped\n// d.groupBars(0, groupSpace, barSpace); // start at x = 0\n\n return d;\n }", "public void SetScatterPlotChartImage(String scatterPlot) {\n\t\tboolean test = true;\n\t\t\n\t\tif((scatterPlot.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"SetScatterPlotChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((scatterPlot.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"SetScatterPlotChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"SetScatterPlotChartImage():: chosen image is set to: \" \n\t\t \t+ scatterPlot);\n\t\t}\n\t\tm_ScatterPlotChartImage = scatterPlot;\n\t}", "public AreaChart(DataSet inputdataset) {\n\t\tsuper.setDataset(inputdataset);\n\t}", "PlotAreaType createPlotAreaType();", "public void setCurrentImageHistory(Stack<ColorImage> img) {\n currentImage = img;\n }", "private void setImageDynamic(){\n questionsClass.setQuestions(currentQuestionIndex);\n String movieName = questionsClass.getPhotoName();\n ImageView ReferenceToMovieImage = findViewById(R.id.Movie);\n int imageResource = getResources().getIdentifier(movieName, null, getPackageName());\n Drawable img = getResources().getDrawable(imageResource);\n ReferenceToMovieImage.setImageDrawable(img);\n }", "private void setData() {\n BarDataSet set = new BarDataSet(getEntries(), \"Monthly Report\");\n set.setColors(new int[]{R.color.md_blue_700, R.color.md_deep_purple_300}, this);\n mData = new BarData(set);\n mChart.setData(mData);\n mData.setValueFormatter(new LargeValueFormatter());\n }", "public void setBackground(Image i)\n {\n background=i;\n imageLabel.setIcon(new ImageIcon(i));\n imageLabel.setBounds(0,0,700,600);\n add(imageLabel);\n }", "public ChartTypeChooser(GUI host){\n\t\tthis.SetHost(host);\n\t\tthis.SetPieChartImage(\"pie_chart.jpg\");\n\t\tthis.SetXYSplineChartImage(\"XYSpline.jpg\");\n\t\tthis.SetBarChartImage(\"bar_chart.jpg\");\n\t\tthis.SetStackedAreaChartImage(\"stacked_area.jpg\");\n\t\tthis.SetScatterPlotChartImage(\"scatter.jpg\");\n\t\tthis.SetLineChartImage(\"line.jpg\");\n\t\tthis.SetBubbleChartImage(\"BubbleChart.jpg\");\n\t\tthis.Set3DBarChartImage(\"3d_bar_chart.jpg\"); \n\t}", "public void SetBubbleChartImage(String bubble) {\n\t\tboolean test = true;\n\t\t\n\t\tif((bubble.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"SetBubbleChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((bubble.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"SetBubbleChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"SetBubbleChartImage():: chosen image is set to: \" \n\t\t \t+ bubble);\n\t\t}\n\t\tm_BubbleChartImage = bubble;\n\t}", "public void getRegionalDistrictData(final String mRegion,final String mWeek){\n mSTKCStockOutBarRegional = new STKCStockOutBarRegional() {\n @Override\n protected void onPostExecute(String results) {\n //dialog.dismiss();\n if (!results.equalsIgnoreCase(\"error\")) {\n try {\n JSONObject obj = new JSONObject(results);\n if(obj.getString(\"status\").equalsIgnoreCase(\"ok\")) {\n\n Log.e(\"District GraphData\", \"\"+results);\n\n JSONArray res = obj.getJSONArray(\"results\");\n\n String[] drugs = new String[res.length()];\n\n for(int i= 0; i< res.length();i++){\n JSONArray array = res.getJSONArray(i);\n barEntries.add(new BarEntry(i+1, (float) array.getDouble(2)));\n barEntries1.add(new BarEntry(i+1, (float) array.getDouble(1)));\n drugs[i] = array.getString(3);\n }\n // [\"UcOzqLVFJVo\",0,0,\"Kyotera District\"]\n\n BarDataSet barDataSet = new BarDataSet(barEntries,\"Stockouts\");\n barDataSet.setColor(Color.parseColor(\"#7CB5EC\"));\n Collections.sort(barEntries, new EntryXComparator());\n BarDataSet barDataSet1 = new BarDataSet(barEntries1,\"Clients at risk(*100) -Paediatrics\");\n barDataSet1.setColors(Color.parseColor(\"#000000\"));\n Collections.sort(barEntries1, new EntryXComparator());\n\n\n BarData data = new BarData(barDataSet,barDataSet1);\n barChart.setData(data);\n\n barProg.setVisibility(View.GONE);\n\n XAxis xAxisB = barChart.getXAxis();\n xAxisB.setValueFormatter(new IndexAxisValueFormatter(drugs));\n barChart.getAxisLeft().setAxisMinimum(0);\n xAxisB.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxisB.setGranularity(1);\n xAxisB.setLabelRotationAngle(45);\n xAxisB.setCenterAxisLabels(true);\n xAxisB.setGranularityEnabled(true);\n\n barChart.setFitBars(true);\n\n float barSpace = 0.01f;\n float groupSpace = 0.1f;\n int groupCount = 12;\n\n //IMPORTANT *****\n data.setBarWidth(0.15f);\n barChart.getXAxis().setAxisMinimum(0);\n barChart.getXAxis().setAxisMaximum(0 + barChart.getBarData().getGroupWidth(groupSpace, barSpace) * groupCount);\n barChart.groupBars(0, groupSpace, barSpace); // perform the \"explicit\" grouping\n //***** IMPORTANT\n\n Log.e(\"here GraphData 2\", \"\"+res.length());\n\n\n\n }else{\n Toast.makeText(getActivity(), \"message failed!\", Toast.LENGTH_SHORT).show();\n if(dialog.isShowing()){\n dialog.dismiss();\n }\n }\n } catch (JSONException localJSONException) {\n Log.e(\"gettingjson\", localJSONException.toString());\n localJSONException.printStackTrace();\n if(dialog.isShowing()){\n dialog.dismiss();\n }\n }\n }\n }\n @Override\n protected void onPreExecute()\n {\n //dialog = ProgressDialog.show(getActivity(), \"\", \"Loading Data...\", true);\n //dialog.setCancelable(true);\n }\n\n };\n mSTKCStockOutBarRegional.execute(mRegion, mWeek);\n\n }", "public void setCodigoArea(int p) { this.codigoArea = p; }", "public void setCodigoArea(int p) { this.codigoArea = p; }", "void setImage(String image);", "public stockArea() {\n\n\t\tsetPreferredSize(new Dimension(800, 400));\n\t\tcreaStockArea();\n\t\tfor (int i = 0; i < terrain.length; i++) {\n\t\t\tfor (int j = 0; j < terrain.length; j++) {\n\t\t\t\tthis.add(terrain[i][j]);\n\t\t\t}\n\t\t}\n\t}", "public static void setFrameImageIcon(JFrame frame, String filename) {\r\n if (frame != null) {\r\n ImageIcon csvIcon = MoGridImage.create(filename);\r\n if (csvIcon != null) {\r\n frame.setIconImage(csvIcon.getImage());\r\n }\r\n }\r\n }", "public void setAreacode(Integer areacode) {\n this.areacode = areacode;\n }", "public void setImage(Image newImage)\n {\n if (newImage == null)\n {\n setFill(null);\n }\n else\n {\n setFill(new ImageFill(newImage));\n }\n }", "public void setImage(String ref){\n\t ImageIcon ii = new ImageIcon(this.getClass().getResource(ref));\n\t image = ii.getImage();\n\t}", "public void setHotImage (Image image) {\r\n\tcheckWidget();\r\n\tif (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);\r\n\tif ((style & SWT.SEPARATOR) != 0) return;\r\n\r\n\t/* TEMPORARY CODE: remove when when FLAT tool bars are implemented */\r\n\tif ((parent.style & SWT.FLAT) != 0) setImage (image);\r\n\r\n\thotImage = image;\r\n}", "public void setBackgroundColor(Color color) {\n //bar.setBackground(color);\n }", "public void setStandNAME(ItemStack stack, String name) {\n/* 314 */ NBTTagCompound nbttagcompound = stack.getTagCompound();\n/* */ \n/* 316 */ if (nbttagcompound == null) {\n/* */ \n/* 318 */ nbttagcompound = new NBTTagCompound();\n/* 319 */ stack.setTagCompound(nbttagcompound);\n/* */ } \n/* */ \n/* 322 */ NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag(this.standInfo);\n/* */ \n/* 324 */ if (!nbttagcompound.hasKey(this.standInfo))\n/* */ {\n/* 326 */ nbttagcompound.setTag(this.standInfo, nbttagcompound1);\n/* */ }\n/* */ \n/* 329 */ nbttagcompound1.setString(this.standName, name);\n/* */ }", "public void setBackgroundImage(BackgroundImage image) {\n this.backgroundImage = image;\n }", "@Override\r\n\tpublic void setImagePath(String path) {\r\n\t\tsuper.setImagePath(path);\t\r\n\t\tparams.put(\"tnznetgraph\", path+nng.getImgName());\t\r\n\t}", "private void showStacksVisualization() {\n\t\tsetVisualization(new StackVisualization(rootComposite, controller, checklist));\n\t}", "public void generateBarChart(float[] act, float[] act1)\n {\n\n HorizontalBarChart barChart= (HorizontalBarChart) findViewById(R.id.chart);\n /*\n ArrayList<BarEntry> entries = new ArrayList<>();\n entries.add(new BarEntry(4f, 0));\n entries.add(new BarEntry(8f, 1));\n entries.add(new BarEntry(6f, 2));\n entries.add(new BarEntry(12f, 3));\n entries.add(new BarEntry(18f, 4));\n entries.add(new BarEntry(10f, 6));\n entries.add(new BarEntry(14f, 7));\n entries.add(new BarEntry(2f, 5));\n\n BarDataSet dataset1 = new BarDataSet(entries, \"# of Calls\");\n */\n\n ArrayList<String> labels = new ArrayList<String>();\n labels.add(\"Food\");\n labels.add(\"Cloth\");\n labels.add(\"Travelling\");\n labels.add(\"Stationary\");\n labels.add(\"Furniture\");\n labels.add(\"Medicine\");\n labels.add(\"Bill\");\n labels.add(\"Utensils\");\n\n\n /* for create Grouped Bar chart*/\n ArrayList<BarEntry> group1 = new ArrayList<>();\n group1.add(new BarEntry(act1[0], 0));\n group1.add(new BarEntry(act1[1], 1));\n group1.add(new BarEntry(act1[2], 2));\n group1.add(new BarEntry(act1[3], 3));\n group1.add(new BarEntry(act1[4], 4));\n group1.add(new BarEntry(act1[5], 5));\n group1.add(new BarEntry(act1[6], 6));\n group1.add(new BarEntry(act1[7], 7));\n\n ArrayList<BarEntry> group2 = new ArrayList<>();\n group2.add(new BarEntry(act[0], 0));\n group2.add(new BarEntry(act[1], 1));\n group2.add(new BarEntry(act[2], 2));\n group2.add(new BarEntry(act[3], 3));\n group2.add(new BarEntry(act[4], 4));\n group2.add(new BarEntry(act[5], 5));\n group2.add(new BarEntry(act[6], 6));\n group2.add(new BarEntry(act[7], 7));\n\n BarDataSet barDataSet1 = new BarDataSet(group1, \"Planned Amount\");\n //barDataSet1.setColor(Color.rgb(0, 155, 0));\n barDataSet1.setColor(getResources().getColor(R.color.darkgreen));\n\n BarDataSet barDataSet2 = new BarDataSet(group2, \"Actual Amount\");\n barDataSet2.setColor(getResources().getColor(R.color.purered));\n\n\n ArrayList<IBarDataSet> dataset = new ArrayList<>();\n dataset.add(barDataSet1);\n dataset.add(barDataSet2);\n /**/\n\n BarData data = new BarData(labels,dataset);\n// // dataset.setColors(ColorTemplate.COLORFUL_COLORS); //\n barChart.setData(data);\n barChart.animateY(5000);\n barChart.setDescription(\"Expense Graph\");\n barChart.setDescriptionPosition(2f, 2f);\n\n }", "public void setBlockImage(ImagePattern color) {\n rectangle.setFill(color);\n }", "void setImage(BufferedImage i);", "private void drawImage(){\n Integer resourceId = imageId.get(this.name);\n if (resourceId != null) {\n drawAbstract(resourceId);\n } else {\n drawNone();\n }\n }", "public static void main(String[] args) {\n\n OverlaidBarChartDemo demo = new OverlaidBarChartDemo(\"Overlaid Bar Chart Demo\");\n demo.pack();\n RefineryUtilities.centerFrameOnScreen(demo);\n demo.setVisible(true);\n\n }", "public void setAmusementObjectImageA(int imageId){\r\n amusementObjectImageA = imageId;\r\n }", "private void setUpGraph() {\n \tString title;\n\t\ttry {\n\t\t\ttitle = util.readTextFile(new File(UI.UITEXT_DIRECTORY)).get(GRAPHTITLE_DEX);\n\t\t\taCS = new AreaChartSample(cellStateNames,title);\n\t\t} catch (FileNotFoundException e) {\n\t\t\taCS = new AreaChartSample(cellStateNames, \"ERROR ON TITLE\");\n\t\t}\n\t\troot.getChildren().add(aCS.getAreaChart());\n \tplot();\n }", "public void setArea(String area) {\n this.area = area;\n }", "private void setData() {\n LineDataSet set1 = new LineDataSet(valuesTemperature, \"Temperature\");\n\n set1.setColor(Color.RED);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n LineData data = new LineData(set1);\n\n // set data\n chartTemperature.setData(data);\n\n // get the legend (only possible after setting data)\n Legend l = chartTemperature.getLegend();\n l.setEnabled(true);\n\n\n // create a dataset and give it a type\n set1 = new LineDataSet(valuesPressure, \"Pressure\");\n\n set1.setColor(Color.GREEN);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n data = new LineData(set1);\n\n // set data\n chartPressure.setData(data);\n\n // get the legend (only possible after setting data)\n l = chartPressure.getLegend();\n l.setEnabled(true);\n\n\n\n // create a dataset and give it a type\n set1 = new LineDataSet(valuesAltitude, \"Altitude\");\n\n set1.setColor(Color.BLUE);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n data = new LineData(set1);\n\n // set data\n chartAltitude.setData(data);\n\n // get the legend (only possible after setting data)\n l = chartAltitude.getLegend();\n l.setEnabled(true);\n }", "public void setStandID(ItemStack stack, int ID) {\n/* 219 */ NBTTagCompound nbttagcompound = stack.getTagCompound();\n/* */ \n/* 221 */ if (nbttagcompound == null) {\n/* */ \n/* 223 */ nbttagcompound = new NBTTagCompound();\n/* 224 */ stack.setTagCompound(nbttagcompound);\n/* */ } \n/* */ \n/* 227 */ NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag(this.standInfo);\n/* */ \n/* 229 */ if (!nbttagcompound.hasKey(this.standInfo))\n/* */ {\n/* 231 */ nbttagcompound.setTag(this.standInfo, nbttagcompound1);\n/* */ }\n/* */ \n/* 234 */ nbttagcompound1.setInteger(this.standID, ID);\n/* */ }", "public void setArea(String area) {\n this.area = area;\n }", "public void setImage(Context ctx, String image)\n {\n }", "@Override\n\tpublic void setItemStack(ItemStack stack) {\n\t}", "public void MakeBar() {\n\t\tBarButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(GetBarChartImage())));\t\n\t\tBarButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Bar chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BarButton);\t\n\t}", "public void setImageIndex(int index)\n\t{\n\t\tthis.drawer.setImageIndex(index);\n\t}", "public void setIcon(int index, Image image)\r\n {\r\n if (index >= this.labels.size())\r\n {\r\n throw new IllegalArgumentException(\r\n \"UMLFragmentLabelFigure: No such index.\");\r\n }\r\n\r\n this.labels.get(index).setIcon(image);\r\n }", "public static void setEvent(StackPane stackPane) {\n stackPane.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n\n tiles.entrySet().stream().map(oTile -> oTile.getValue())\n .filter(tile -> tile.isEmpty())\n .forEach(tile -> tile.changeTileFillToNull());\n\n tiles.entrySet().stream().map(oTile -> oTile.getValue())\n .filter(tile -> !tile.isEmpty())\n .forEach(tile -> tile.changeTileFillToLightPink());\n\n int posX = (int) (event.getX() / 50);\n int posY = (int) (event.getY() / 50);\n Coordinates coordinates = new Coordinates(posX, posY);\n tiles.get(coordinates).changeTileFillToPink();\n setLastClicked(coordinates);\n }\n }\n );\n }", "public void setTimeSeriesIdentifier(TimeSeriesIdentifier timeSeriesIdentifier)\n\t{\n\t\tthis.timeSeriesIdentifier = timeSeriesIdentifier;\n\t\tif (unitsAbbr == null || unitsAbbr.trim().length() == 0 || unitsAbbr.trim().equalsIgnoreCase(\"unknown\"))\n\t\t\tunitsAbbr = this.timeSeriesIdentifier.getStorageUnits();\n\t}", "public void changeImageMule(){\n\t\tsetIcon(imgm);\n\t}", "@Test\n public void test48() throws Throwable {\n Line2D.Double line2D_Double0 = new Line2D.Double(0.0, 0.0, (-3419.6012506212037), (-3419.6012506212037));\n line2D_Double0.y2 = 1830.949;\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D(\"A2mVhdCINzNxW\\\"g@uU\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) categoryAxis3D0);\n CategoryItemRenderer[] categoryItemRendererArray0 = new CategoryItemRenderer[8];\n ScatterRenderer scatterRenderer0 = new ScatterRenderer();\n categoryItemRendererArray0[0] = (CategoryItemRenderer) scatterRenderer0;\n AreaRenderer areaRenderer0 = new AreaRenderer();\n categoryItemRendererArray0[1] = (CategoryItemRenderer) areaRenderer0;\n AreaRenderer areaRenderer1 = new AreaRenderer();\n categoryItemRendererArray0[2] = (CategoryItemRenderer) areaRenderer1;\n StackedBarRenderer stackedBarRenderer0 = new StackedBarRenderer(true);\n categoryItemRendererArray0[3] = (CategoryItemRenderer) stackedBarRenderer0;\n CategoryStepRenderer categoryStepRenderer0 = new CategoryStepRenderer(false);\n categoryItemRendererArray0[4] = (CategoryItemRenderer) categoryStepRenderer0;\n WaterfallBarRenderer waterfallBarRenderer0 = new WaterfallBarRenderer();\n categoryItemRendererArray0[5] = (CategoryItemRenderer) waterfallBarRenderer0;\n StackedBarRenderer3D stackedBarRenderer3D0 = new StackedBarRenderer3D(false);\n categoryItemRendererArray0[6] = (CategoryItemRenderer) stackedBarRenderer3D0;\n IntervalBarRenderer intervalBarRenderer0 = new IntervalBarRenderer();\n categoryItemRendererArray0[7] = (CategoryItemRenderer) intervalBarRenderer0;\n combinedDomainCategoryPlot0.setRenderers(categoryItemRendererArray0);\n StackedBarRenderer3D stackedBarRenderer3D1 = new StackedBarRenderer3D();\n TickUnits tickUnits0 = new TickUnits();\n combinedDomainCategoryPlot0.setRenderer(93, (CategoryItemRenderer) stackedBarRenderer3D1);\n }", "public void setBackgroundImage(String imagePath) \n\t{\n\t try\n\t {\n\t\t Context context = this.getContext();\n\t\t if (context != null)\n\t\t {\n\t\t\t FileInputStream wFile = new FileInputStream(imagePath);\n\t\t\t BufferedInputStream wBuffer = new BufferedInputStream(wFile);\n\t\t\t mBackImage = BitmapFactory.decodeStream(wBuffer);\n\t if (wFile != null) \n\t {\n\t \t wFile.close();\n\t }\n\t if (wBuffer != null) \n\t {\n\t \t wBuffer.close();\n\t }\n\t\t }\n\t\t if (mBackImage != null)\n\t\t {\n\t\t\t drawThumbnail();\n\t\t }\n\t }\n\t catch(FileNotFoundException e)\n\t { \n\t\t Log.e(LOG_TAG, \"The file '\" + imagePath + \"' does not exists.\");\n\t }\n\t catch(Exception e)\n\t {\n\t\t Log.e(LOG_TAG, e.toString());\n\t }\n\t}", "public void drawOverview()\n\t{\n\t\tstackRows = (int)Math.ceil(stacks.size()/9.f);\n\t\tfor(int y = 0; y < 6; y++)\n\t\t{\n\t\t\tfor(int x = 0; x < 9; x++)\n\t\t\t{\t\t\n\t\t\t\t\tint slotIndex = x+9*y;\n\t\t\t\t\tint stackIndex = x+9*(y+scrollOffset);\n\t\t\t\t\t//System.out.println(slotIndex);\n\t\t\t\t\tSlot slot = new Slot(inventory,slotIndex, x*24, y*18);\t\t\t\t\n\t\t\t\t\tthis.addSlotToContainer(slot);\n\t\t\t\t\t\n\t\t\t\t\tif(stackIndex < stacks.size())\n\t\t\t\t\t\tslot.putStack(stacks.get(stackIndex));\n\t\t\t\t\telse\n\t\t\t\t\t\tslot.putStack(null);\n\t\t\t}\n\t\t}\n\t\t/*int i =0;\n\t\tfor(ItemStack stack : stacks)\n\t\t{\n\t\t\tthis.inventorySlots.get(i).putStack(stack);\n\t\t\t\n\t\t\ti++;\n\t\t}*/\n\t\t//this.inventoryItemStacks = stacks;\n\t}", "public void onCreated(ItemStack stack, World worldIn, EntityPlayer playerIn)\n {\n NBTTagCompound nbttagcompound = stack.getTagCompound();\n\n if (nbttagcompound != null)\n {\n if (nbttagcompound.hasKey(\"map_scale_direction\", 99))\n {\n scaleMap(stack, worldIn, nbttagcompound.getInteger(\"map_scale_direction\"));\n nbttagcompound.removeTag(\"map_scale_direction\");\n }\n else if (nbttagcompound.getBoolean(\"map_tracking_position\"))\n {\n enableMapTracking(stack, worldIn);\n nbttagcompound.removeTag(\"map_tracking_position\");\n }\n }\n }", "@Override\n\tpublic void setName(String name) {\n\t\tcomparedChart.setName(name);\n\t}", "public void setBackground(String imagePath) {\n\t\ttry {\n\t\t\timagePath = imagePath.replace(\"\\\\\", \"/\");\n\t\t\tString pathString = new File(imagePath).toURI().toURL().toString();\n\t\t\tbackgroundImagePane.setStyle(\"-fx-background-image:url(\\\"\" + pathString + \"\\\");\");\n\t\t} catch (MalformedURLException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public ABLoadChartExport(RenderedImage rendImage) {\n super(rendImage);\n }", "private void setImage(Bitmap image) {\n }", "void setImage(Layer layer, Image image);", "public void onFinalImageSet(String str, C13648f fVar, Animatable animatable) {\n int i;\n int i2 = 0;\n if (fVar != null) {\n i2 = fVar.getWidth();\n i = fVar.getHeight();\n } else {\n i = 0;\n }\n if (i2 <= 0 || i <= 0) {\n StringBuilder sb = new StringBuilder(\"Invalid image info received: (w=\");\n sb.append(i2);\n sb.append(\",h=\");\n sb.append(i);\n sb.append(')');\n C3166a.m11966e(\"UserSpecialEntryView\", sb.toString());\n i2 = 540;\n i = 32;\n }\n C8033a.m24643a(this.f21869a, C47891a.m148821a(((float) i2) * (((float) C3358ac.m12510a(32.0f)) / ((float) i))));\n }", "public void setImage(java.lang.String image) {\n\t\t_imageCompanyAg.setImage(image);\n\t}", "private void setupHistogram() {\n\n // Create chart using the ChartFactory.\n chart = MimsChartFactory.createMimsHistogram(\"\", \"Pixel Value\", \"\", null, PlotOrientation.VERTICAL, true, true, false);\n chart.setBackgroundPaint(this.getBackground());\n chart.removeLegend();\n\n // Set the renderer.\n MimsXYPlot plot = (MimsXYPlot) chart.getPlot();\n XYBarRenderer renderer = (XYBarRenderer) plot.getRenderer();\n renderer.setDrawBarOutline(false);\n renderer.setShadowVisible(false);\n renderer.setBarPainter(new StandardXYBarPainter());\n\n // Listen for key pressed events.\n KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new KeyEventDispatcher() {\n public boolean dispatchKeyEvent(KeyEvent e) {\n if (e.getID() == KeyEvent.KEY_PRESSED && thisIsVisible() && ui.isActive()) {\n chartPanel.keyPressed(e);\n }\n return false;\n }\n });\n\n // Movable range and domain.\n plot.setDomainPannable(true);\n plot.setRangePannable(true);\n\n chartPanel = new MimsChartPanel(chart);\n chartPanel.setSize(350, 225);\n jPanel1.add(chartPanel);\n }", "public static String updateImage(int tier) {\n\t\tif(tier == 3) {\n\t\t\treturn \"greenBalloon.png\"; \n\t\t}\n\t\telse if(tier == 2) {\n\t\t\treturn \"blueBalloon.png\"; \n\t\t}\n\t\telse if(tier == 1) {\n\t\t\treturn \"redBalloon.png\"; \n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "public void setAreaCode(String areaCode) {\n this.areaCode = areaCode;\n }", "void setFigure(FigureInfo f);", "public void setAreaCode(int value) {\r\n this.areaCode = value;\r\n }", "private void setICon() {\r\n \r\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"IconImage_1.png\")));\r\n }", "private void setIconSelected(int selectedContainer) {\n int size = mTabHost.getTabWidget().getChildCount();\n for (int i = 0; i < size; i++) {\n View tabView = mTabHost.getTabWidget().getChildAt(i);\n ImageView tabIcon = ((ImageView)(tabView.findViewById(R.id.tabImage)));\n tabIcon.setImageResource(i == selectedContainer ? tabIconsActive[i]:tabIconsIdle[i]);\n }\n }", "public void setImageAlpha(int imageAlpha) {\n\t\tthis.imageAlpha = imageAlpha;\n\t}", "@Override\n public void onDrawerOpened() {\n directionsHandleImage.setImageResource(R.drawable.tab_right_handle);\n }", "@Test\n public void test15() throws Throwable {\n DefaultMultiValueCategoryDataset defaultMultiValueCategoryDataset0 = new DefaultMultiValueCategoryDataset();\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis(\"#C%b:FJR+QY\");\n DateAxis dateAxis0 = new DateAxis(\"#C%b:FJR+QY\");\n GroupedStackedBarRenderer groupedStackedBarRenderer0 = new GroupedStackedBarRenderer();\n CategoryPlot categoryPlot0 = new CategoryPlot((CategoryDataset) defaultMultiValueCategoryDataset0, (CategoryAxis) extendedCategoryAxis0, (ValueAxis) dateAxis0, (CategoryItemRenderer) groupedStackedBarRenderer0);\n JFreeChart jFreeChart0 = new JFreeChart((Plot) categoryPlot0);\n DefaultMultiValueCategoryDataset defaultMultiValueCategoryDataset1 = (DefaultMultiValueCategoryDataset)defaultMultiValueCategoryDataset0.clone();\n // Undeclared exception!\n try { \n jFreeChart0.createBufferedImage(1628, 1628, 1502.679, (double) 1628, (ChartRenderingInfo) null);\n } catch(NoClassDefFoundError e) {\n //\n // Could not initialize class sun.dc.pr.Rasterizer\n //\n assertThrownBy(\"sun.dc.DuctusRenderingEngine\", e);\n }\n }", "@Override\n\tpublic void initialize(URL fxmlFileLocation, ResourceBundle resources) {\n\t\tmainMenu.setGraphic(new ImageView(\"/Images/stackedlines.png\"));\n\t\tarea1.setText(Constants.DASHBOARD_TEXT_BOX1);\n\t\tarea2.setText(Constants.DASHBOARD_TEXT_BOX2);\n\t\tarea1.setFocusTraversable(false);\n\t\tarea2.setFocusTraversable(false);\n\t\tpopulateCharts();\n\t}", "public final void setLabelStacking(LabelStacking labelStacking) {\r\n\t\tsetLabelStacking(labelStacking.getName());\r\n\t}", "@Override\n public String GetImagePart() {\n return \"coal\";\n }", "private BufferedImage createPlotImage() {\r\n final BufferedImage img = new BufferedImage(getWidth(), getHeight(), \r\n Transparency.BITMASK);\r\n final Graphics g = img.getGraphics();\r\n ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, \r\n RenderingHints.VALUE_ANTIALIAS_ON);\r\n \r\n g.setColor(GUIConstants.color6);\r\n for(int i = 0; i < scatterData.size; i++) {\r\n drawItem(g, scatterData.xAxis.co[i], \r\n scatterData.yAxis.co[i], false, false);\r\n }\r\n return img;\r\n }", "private void setAreaTransparent(int p_78434_1_, int p_78434_2_, int p_78434_3_, int p_78434_4_)\r\n {\r\n if (!this.hasTransparency(p_78434_1_, p_78434_2_, p_78434_3_, p_78434_4_))\r\n {\r\n for (int var5 = p_78434_1_; var5 < p_78434_3_; ++var5)\r\n {\r\n for (int var6 = p_78434_2_; var6 < p_78434_4_; ++var6)\r\n {\r\n this.imageData[var5 + var6 * this.imageWidth] &= 16777215;\r\n }\r\n }\r\n }\r\n }" ]
[ "0.6621059", "0.5766302", "0.5080265", "0.48944193", "0.48497587", "0.46695712", "0.46289453", "0.46059448", "0.46034792", "0.46034792", "0.45144022", "0.44998047", "0.44822648", "0.44604453", "0.44327474", "0.44223443", "0.44223443", "0.44185388", "0.4401215", "0.43937784", "0.43849653", "0.43832603", "0.4362133", "0.4362133", "0.4355852", "0.43509108", "0.43507028", "0.4346897", "0.43433413", "0.43425873", "0.43196282", "0.43037468", "0.43008253", "0.4296248", "0.42798427", "0.42792386", "0.4277854", "0.42367834", "0.42343405", "0.422317", "0.4220991", "0.42092317", "0.42092317", "0.42074895", "0.42047164", "0.42045867", "0.41862798", "0.41797924", "0.41456336", "0.41412804", "0.41337183", "0.41273686", "0.41247913", "0.4123768", "0.41201192", "0.4118688", "0.41177127", "0.41135824", "0.41113463", "0.41088834", "0.41072568", "0.41033322", "0.40974832", "0.40973875", "0.4093189", "0.40887484", "0.40866613", "0.40828663", "0.40807593", "0.40799522", "0.40779126", "0.407436", "0.40726852", "0.40717402", "0.40681386", "0.40673757", "0.40607187", "0.40567368", "0.40521705", "0.40510848", "0.40479574", "0.4046231", "0.40455875", "0.40449974", "0.4043206", "0.40429708", "0.40352803", "0.40333447", "0.4032169", "0.40301174", "0.40300316", "0.40272567", "0.40227756", "0.40187693", "0.40173367", "0.40151107", "0.40111262", "0.40105882", "0.39934507", "0.39910412" ]
0.8454211
0
Create the interface of buttons, allowing a chart to be created
public Container createInterface(){ ChartTypeInterface.setLayout(new GridLayout(4,2,20,20)); MakePie(); MakeXYSpline(); MakeStacked(); MakeScatter(); MakeLine(); MakeBubble(); MakeBar(); MakeBar3D(); return ChartTypeInterface; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void createCompButtons() {\n\t\tbtnExcelReport = new Button(getCompButtons(), SWT.NONE);\n\t\tbtnExcelReport.setText(\"Excel Report\");\n\t\tbtnExcelReport.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tbtnExcelReport\n\t\t.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(\n\t\t\t\t\torg.eclipse.swt.events.SelectionEvent e) {\n\t\t\t\tcmdExcelReportWidgetSelected();\n\t\t\t}\n\t\t});\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(550, 400);\n\t\tshell.setText(\"Source A Antenna 1 Data\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnNewButton_1.setBounds(116, 10, 98, 30);\n\t\tbtnNewButton_1.setText(\"pol 1\");\n\t\t\n\t\tButton btnPol = new Button(shell, SWT.NONE);\n\t\tbtnPol.setText(\"pol 2\");\n\t\tbtnPol.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol.setBounds(220, 10, 98, 30);\n\t\t\n\t\tButton btnPol_1 = new Button(shell, SWT.NONE);\n\t\tbtnPol_1.setText(\"pol 3\");\n\t\tbtnPol_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_1.setBounds(324, 10, 98, 30);\n\t\t\n\t\tButton btnPol_2 = new Button(shell, SWT.NONE);\n\t\tbtnPol_2.setText(\"pol 4\");\n\t\tbtnPol_2.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_2.setBounds(428, 10, 98, 30);\n\t\t\n\t\tButton button_3 = new Button(shell, SWT.NONE);\n\t\tbutton_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tPlot_graph nw = new Plot_graph();\n\t\t\t\tnw.GraphScreen();\n\t\t\t}\n\t\t});\n\t\tbutton_3.setBounds(116, 46, 98, 30);\n\t\t\n\t\tButton button_4 = new Button(shell, SWT.NONE);\n\t\tbutton_4.setBounds(116, 83, 98, 30);\n\t\t\n\t\tButton button_5 = new Button(shell, SWT.NONE);\n\t\tbutton_5.setBounds(116, 119, 98, 30);\n\t\t\n\t\tButton button_6 = new Button(shell, SWT.NONE);\n\t\tbutton_6.setBounds(116, 155, 98, 30);\n\t\t\n\t\tButton button_7 = new Button(shell, SWT.NONE);\n\t\tbutton_7.setBounds(220, 155, 98, 30);\n\t\t\n\t\tButton button_8 = new Button(shell, SWT.NONE);\n\t\tbutton_8.setBounds(220, 119, 98, 30);\n\t\t\n\t\tButton button_9 = new Button(shell, SWT.NONE);\n\t\tbutton_9.setBounds(220, 83, 98, 30);\n\t\t\n\t\tButton button_10 = new Button(shell, SWT.NONE);\n\t\tbutton_10.setBounds(220, 46, 98, 30);\n\t\t\n\t\tButton button_11 = new Button(shell, SWT.NONE);\n\t\tbutton_11.setBounds(428, 155, 98, 30);\n\t\t\n\t\tButton button_12 = new Button(shell, SWT.NONE);\n\t\tbutton_12.setBounds(428, 119, 98, 30);\n\t\t\n\t\tButton button_13 = new Button(shell, SWT.NONE);\n\t\tbutton_13.setBounds(428, 83, 98, 30);\n\t\t\n\t\tButton button_14 = new Button(shell, SWT.NONE);\n\t\tbutton_14.setBounds(428, 46, 98, 30);\n\t\t\n\t\tButton button_15 = new Button(shell, SWT.NONE);\n\t\tbutton_15.setBounds(324, 46, 98, 30);\n\t\t\n\t\tButton button_16 = new Button(shell, SWT.NONE);\n\t\tbutton_16.setBounds(324, 83, 98, 30);\n\t\t\n\t\tButton button_17 = new Button(shell, SWT.NONE);\n\t\tbutton_17.setBounds(324, 119, 98, 30);\n\t\t\n\t\tButton button_18 = new Button(shell, SWT.NONE);\n\t\tbutton_18.setBounds(324, 155, 98, 30);\n\n\t}", "public void createButtons() {\n\n addRow = new JButton(\"Add row\");\n add(addRow);\n\n deleteRow = new JButton(\"Delete row\");\n add(deleteRow);\n }", "private void createButtonsPanel() {\r\n Composite buttonsPanel = new Composite(this, SWT.NONE);\r\n buttonsPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));\r\n buttonsPanel.setLayout(new GridLayout(4, true));\r\n\r\n getButtonFromAction(buttonsPanel, \"New\", new NewAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Save\", new SaveAction());\r\n getButtonFromAction(buttonsPanel, \"Delete\", new DeleteAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Cancel\", new CancelAction());\r\n }", "protected void createButtons(Panel panel) {\n panel.add(new Filler(24,20));\n\n Choice drawingChoice = new Choice();\n drawingChoice.addItem(fgUntitled);\n\n\t String param = getParameter(\"DRAWINGS\");\n\t if (param == null)\n\t param = \"\";\n \tStringTokenizer st = new StringTokenizer(param);\n while (st.hasMoreTokens())\n drawingChoice.addItem(st.nextToken());\n // offer choice only if more than one\n if (drawingChoice.getItemCount() > 1)\n panel.add(drawingChoice);\n else\n panel.add(new Label(fgUntitled));\n\n\t\tdrawingChoice.addItemListener(\n\t\t new ItemListener() {\n\t\t public void itemStateChanged(ItemEvent e) {\n\t\t if (e.getStateChange() == ItemEvent.SELECTED) {\n\t\t loadDrawing((String)e.getItem());\n\t\t }\n\t\t }\n\t\t }\n\t\t);\n\n panel.add(new Filler(6,20));\n\n Button button;\n button = new CommandButton(new DeleteCommand(\"Delete\", fView));\n panel.add(button);\n\n button = new CommandButton(new DuplicateCommand(\"Duplicate\", fView));\n panel.add(button);\n\n button = new CommandButton(new GroupCommand(\"Group\", fView));\n panel.add(button);\n\n button = new CommandButton(new UngroupCommand(\"Ungroup\", fView));\n panel.add(button);\n\n button = new Button(\"Help\");\n\t\tbutton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n\t\t showHelp();\n\t\t }\n\t\t }\n\t\t);\n panel.add(button);\n\n fUpdateButton = new Button(\"Simple Update\");\n\t\tfUpdateButton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n if (fSimpleUpdate)\n setBufferedDisplayUpdate();\n else\n setSimpleDisplayUpdate();\n\t\t }\n\t\t }\n\t\t);\n\n // panel.add(fUpdateButton); // not shown currently\n }", "public void MakeBubble() {\n\t\tBubbleButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetBubbleChartImage())));\n\t\tBubbleButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetColumns().length >= 3){\n\t\t\t\t\t\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\tGetHost().LeftPanelContent(new BubbleChart(\n\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\"Bubble Chart\", \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost()));\n\t\t\t\t\t}else {\n\t\t\t\t\t\tGetHost().LeftPanelContent(new BubbleChart(\n\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost()));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"You must have three columns selected to use this chart\", \n\t\t\t\t\t\"Bubble Chart Format\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BubbleButton);\n\t}", "public void createButtons() {\n\t\tbutton1 = new JButton(\"Button1\");\n\t\tbutton2 = new JButton(\"Button2\");\n\t\tbutton3 = new JButton(\"Button3\");\n\t\tbutton4 = new JButton(\"Button4\");\n\t\tbutton5 = new JButton(\"Button5\");\n\t}", "private void createButton(){\n addButton();\n addStartButton();\n }", "protected void createButtons(Composite parent) {\n\t\tcomRoot = new Composite(parent, SWT.BORDER);\n\t\tcomRoot.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false));\n\t\tcomRoot.setLayout(new GridLayout(2, false));\n\n\t\ttbTools = new ToolBar(comRoot, SWT.WRAP | SWT.RIGHT | SWT.FLAT);\n\t\ttbTools.setLayout(new GridLayout());\n\t\ttbTools.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, false));\n\n\t\tfinal ToolItem btnSettings = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnSettings.setText(Messages.btnAdvancedSettings);\n\t\tbtnSettings.setToolTipText(Messages.tipAdvancedSettings);\n\t\tbtnSettings.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tPerformanceSettingsDialog dialog = new PerformanceSettingsDialog(\n\t\t\t\t\t\tgetShell(), getMigrationWizard().getMigrationConfig());\n\t\t\t\tdialog.open();\n\t\t\t}\n\t\t});\n\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tbtnPreviewDDL = new ToolItem(tbTools, SWT.CHECK);\n\t\tbtnPreviewDDL.setSelection(false);\n\t\tbtnPreviewDDL.setText(Messages.btnPreviewDDL);\n\t\tbtnPreviewDDL.setToolTipText(Messages.tipPreviewDDL);\n\t\tbtnPreviewDDL.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tboolean flag = btnPreviewDDL.getSelection();\n\t\t\t\tswitchText(flag);\n\t\t\t}\n\t\t});\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\n\t\tfinal ToolItem btnExportScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnExportScript.setText(Messages.btnExportScript);\n\t\tbtnExportScript.setToolTipText(Messages.tipSaveScript);\n\t\tbtnExportScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\texportScriptToFile();\n\t\t\t}\n\t\t});\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tfinal ToolItem btnUpdateScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnUpdateScript.setText(Messages.btnUpdateScript);\n\t\tbtnUpdateScript.setToolTipText(Messages.tipUpdateScript);\n\t\tbtnUpdateScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tprepare4SaveScript();\n\t\t\t\tgetMigrationWizard().saveMigrationScript(false, isSaveSchema());\n\t\t\t\tMessageDialog.openInformation(PlatformUI.getWorkbench()\n\t\t\t\t\t\t.getDisplay().getActiveShell(),\n\t\t\t\t\t\tMessages.msgInformation, Messages.setOptionPageOKMsg);\n\t\t\t}\n\t\t});\n\t\tbtnUpdateScript\n\t\t\t\t.setEnabled(getMigrationWizard().getMigrationScript() != null);\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tfinal ToolItem btnNewScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnNewScript.setText(Messages.btnCreateNewScript);\n\t\tbtnNewScript.setToolTipText(Messages.tipCreateNewScript);\n\t\tbtnNewScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tprepare4SaveScript();\n\t\t\t\tString name = EditScriptDialog.getMigrationScriptName(\n\t\t\t\t\t\tgetShell(), getMigrationWizard().getMigrationConfig()\n\t\t\t\t\t\t\t\t.getName());\n\t\t\t\tif (StringUtils.isBlank(name)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgetMigrationWizard().getMigrationConfig().setName(name);\n\t\t\t\tgetMigrationWizard().saveMigrationScript(true, isSaveSchema());\n\t\t\t\tbtnUpdateScript.setEnabled(getMigrationWizard()\n\t\t\t\t\t\t.getMigrationScript() != null);\n\t\t\t\tMessageDialog.openInformation(PlatformUI.getWorkbench()\n\t\t\t\t\t\t.getDisplay().getActiveShell(),\n\t\t\t\t\t\tMessages.msgInformation, Messages.setOptionPageOKMsg);\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tprotected void createCompButtons() {\n\t\tbuildCompButtons();\n\t}", "private JPanel createButtons()\r\n\t{\r\n\t\tJPanel buttons = new JPanel();\r\n\t\tbuttons.setLayout(new FlowLayout(FlowLayout.TRAILING));\r\n\r\n\r\n\t\tButton save = new Button(PrimeMain1.texts.getString(\"save\"));\r\n\t\tsave.addActionListener(this);\r\n\t\tsave.setActionCommand(\"save\");\r\n\r\n\t\tButton cancel = new Button(PrimeMain1.texts.getString(\"cancel\"));\r\n\t\tcancel.addActionListener(this);\r\n\t\tcancel.setActionCommand(\"cancel\");\r\n\r\n\r\n\t\tbuttons.add(save);\r\n\t\tbuttons.add(cancel);\r\n\r\n\t\treturn buttons;\r\n\t}", "public void MakeBar() {\n\t\tBarButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(GetBarChartImage())));\t\n\t\tBarButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Bar chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BarButton);\t\n\t}", "private void createButtons() {\n Button helpSettingsButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = -5797923866320649518L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateToHelp();\n }\n });\n\n// Button skillSettingsButton = new Button(\"\",\n// new Button.ClickListener() {\n// private static final long serialVersionUID = 7147554466396214893L;\n//\n// @Override\n// public void buttonClick(ClickEvent event) {\n// settingsPresenter.navigateToSkills();\n// }\n// });\n// skillSettingsButton.addStyleName(\"icon-cog\");\n\n Button medicSettingsButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = 7147554466396214893L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateToMedic();\n }\n });\n\n\n Button logoutButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = -1096188732209266611L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateBack();\n }\n });\n logoutButton.addStyleName(\"default\");\n\n // Adding and aligning the 3 Buttons.\n //Setting a Description for the buttons which is displayed when flying over the button\n super.verticalNavigation.addComponent(helpSettingsButton);\n super.verticalNavigation.setComponentAlignment(helpSettingsButton, Alignment.MIDDLE_CENTER);\n helpSettingsButton.setDescription(\"Set the Help options for the Patient\");\n helpSettingsButton.setIcon(new ThemeResource(\"img/contacgg.png\"), BUTTON_HELP_SETTINGS);\n helpSettingsButton.setWidth(BUTTON_WIDTH);\n helpSettingsButton.setHeight(BUTTON_HEIGHT);\n\n super.verticalNavigation.addComponent(medicSettingsButton);\n super.verticalNavigation.setComponentAlignment(medicSettingsButton, Alignment.MIDDLE_CENTER);\n medicSettingsButton.setDescription(\"Set the Medication options for the Patient\");\n medicSettingsButton.setIcon(new ThemeResource(\"img/medicine-icon-cog.png\"),BUTTON_MEDIC_SETTINGS);\n medicSettingsButton.setWidth(BUTTON_WIDTH);\n medicSettingsButton.setHeight(BUTTON_HEIGHT);\n\n// addComponent(skillSettingsButton);\n// setComponentAlignment(skillSettingsButton, Alignment.MIDDLE_CENTER);\n// skillSettingsButton.setDescription(\"Set the Skill options for the Patient\");\n// skillSettingsButton.setIcon(new ThemeResource(\"img/skill2-icon-cog.png\"), BUTTON_SKILL_SETTINGS);\n// skillSettingsButton.setWidth(BUTTON_WIDTH);\n// skillSettingsButton.setHeight(BUTTON_HEIGHT);\n\n logoutButton.setWidth(BUTTON_WIDTH);\n super.verticalNavigation.addComponent(logoutButton);\n super.verticalNavigation.setComponentAlignment(logoutButton, Alignment.MIDDLE_CENTER);\n logoutButton.setDescription(\"You will be logged out\");\n logoutButton.setIcon(new ThemeResource(\"img/logout.png\"), BUTTON_LOGOUT);\n logoutButton.setWidth(BUTTON_WIDTH);\n logoutButton.setHeight(BUTTON_HEIGHT);\n\n }", "private void createComponentForButtons(Composite section)\n {\n createRowForNewStyleButton(section);\n createRowForNewRegexButton(section);\n createRowForNewColumnButton(section);\n createRowForDeleteButton(section);\n createRowForDeleteAllButton(section);\n }", "private void createBottomButtons() {\n // Create a composite that will contain the control buttons.\n Composite bottonBtnComposite = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(3, true);\n gl.horizontalSpacing = 10;\n bottonBtnComposite.setLayout(gl);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n bottonBtnComposite.setLayoutData(gd);\n\n // Create the Interpolate button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n interpolateBtn = new Button(bottonBtnComposite, SWT.PUSH);\n interpolateBtn.setText(\"Interpolate\");\n interpolateBtn.setLayoutData(gd);\n interpolateBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorData upperColorData = upperColorWheel.getColorData();\n ColorData lowerColorData = lowerColorWheel.getColorData();\n\n colorBar.interpolate(upperColorData, lowerColorData, rgbRdo\n .getSelection());\n undoBtn.setEnabled(true);\n updateColorMap();\n }\n });\n\n // Create the Undo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n undoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n undoBtn.setText(\"Undo\");\n undoBtn.setEnabled(false);\n undoBtn.setLayoutData(gd);\n undoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n undoBtn.setEnabled(colorBar.undoColorBar());\n updateColorMap();\n redoBtn.setEnabled(true);\n }\n });\n\n // Create the Redo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n redoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n redoBtn.setText(\"Redo\");\n redoBtn.setEnabled(false);\n redoBtn.setLayoutData(gd);\n redoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n redoBtn.setEnabled(colorBar.redoColorBar());\n updateColorMap();\n undoBtn.setEnabled(true);\n }\n });\n\n // Create the Revert button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n revertBtn = new Button(bottonBtnComposite, SWT.PUSH);\n revertBtn.setText(\"Revert\");\n revertBtn.setLayoutData(gd);\n revertBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n colorBar.revertColorBar();\n updateColorMap();\n undoBtn.setEnabled(false);\n redoBtn.setEnabled(false);\n }\n });\n\n // Create the Save button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n saveBtn = new Button(bottonBtnComposite, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n if( seldCmapName == null ) {\n saveBtn.setEnabled(false);\n }\n \n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorMap cm = (ColorMap) cmapParams.getColorMap();\n seldCmapName = selCmapCombo.getText();\n \n// int sepIndx = seldCmapName.indexOf(File.separator);\n// String cmapCat = seldCmapName.substring(0,seldCmapName.indexOf(File.separator));\n// String cmapName = seldCmapName.substring( seldCmapName.indexOf(File.separator));\n if (lockedCmaps != null && lockedCmaps.isLocked(seldCmapName)) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists and is locked.\\n\\n\" +\n \t\t\t\"You cannot overwrite it.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tconfirmDlg.open();\n \tcolorBar.undoColorBar();\n updateColorMap();\n \treturn;\n } \n else if( ColorMapUtil.colorMapExists( seldCmapCat, seldCmapName ) ) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists.\\n\\n\" +\n \t\t\t\"Do you want to overwrite it?\",\n \t\t\tMessageDialog.QUESTION, new String[]{\"Yes\", \"No\"}, 0);\n \tconfirmDlg.open();\n\n \tif( confirmDlg.getReturnCode() == MessageDialog.CANCEL ) {\n \t\treturn;\n \t}\n }\n\n try {\n ColorMapUtil.saveColorMap( cm, seldCmapCat, seldCmapName );\n \n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Colormap Saved\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" Saved.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n } catch (VizException e) {\n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Error\", null, \n \t\t\t\"Error Saving Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\"\\n\"+e.getMessage(),\n \t\t\tMessageDialog.ERROR, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n }\n\n completeSave();\n }\n });\n\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.grabExcessHorizontalSpace = false;\n deleteBtn = new Button(bottonBtnComposite, SWT.PUSH);\n deleteBtn.setText(\"Delete\");\n deleteBtn.setLayoutData(gd);\n deleteBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tdeleteColormap();\n }\n });\n Label sep = new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n sep.setLayoutData(gd);\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.HORIZONTAL_ALIGN_END);\n Button closeBtn = new Button(shell, SWT.PUSH);\n closeBtn.setText(\" Close \");\n closeBtn.setLayoutData(gd);\n closeBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tshell.dispose();\n }\n });\n }", "private void addButtons() {\r\n\t\troot.getChildren().add(button); // creating the Easy button \r\n\t\tb1 = new Button(\"Easy\");\r\n\t\tb1.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Easy\";\r\n\t\t\t}\r\n\t\t});\r\n\t\troot.getChildren().add(b1); // creating the Normal button\r\n\t\tb2 = new Button(\"Normal\");\r\n\t\tb2.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Normal\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb2.setLayoutX(50);\r\n\t\troot.getChildren().add(b2); // creating the Hard button\r\n\t\tb3 = new Button(\"Hard\");\r\n\t\tb3.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Hard\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb3.setLayoutX(115);\r\n\t\troot.getChildren().add(b3);\r\n\t}", "public void createButtons() {\n\t\tescapeBackground = new GRect(200, 150, 300, 400);\n\t\tescapeBackground.setFilled(true);\n\t\tescapeBackground.setColor(Color.gray);\n\n\t\tbutton1 = new GButton(\"Return to Game\", 250, 175, 200, 50, Color.cyan);\n\t\tbutton3 = new GButton(\"Exit Level\", 250, 330, 200, 50, Color.cyan);\n\t\tbutton4 = new GButton(\"Return to Menu\", 250, 475, 200, 50, Color.cyan);\n\n\t\tescapeButtons.add(button1);\n\t\tescapeButtons.add(button3);\n\t\tescapeButtons.add(button4);\n\n\t}", "public void drawButtons(){\r\n\t\tGuiBooleanButton showDirection = new GuiBooleanButton(1, 10, 20, 150, 20, \"Show Direction\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowdir(), \"showdir\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showdir\").split(\";\"));\r\n\t\tGuiChooseStringButton dirpos = new GuiChooseStringButton(2, width/2+50, 20, 150, 20, \"Dir-Position\", GuiPositions.getPosList(), \"posdir\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosDir()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showFPS= new GuiBooleanButton(3, 10, 45, 150, 20, \"Show FPS\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowfps(), \"showfps\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfps\").split(\";\"));\r\n\t\tGuiChooseStringButton fpspos = new GuiChooseStringButton(4, width/2+50, 45, 150, 20, \"FPS-Position\", GuiPositions.getPosList(), \"posfps\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosFPS()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showCoor = new GuiBooleanButton(5, 10, 70, 150, 20, \"Show Coor\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowcoor(), \"showcoor\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showcoor\").split(\";\"));\r\n\t\tGuiChooseStringButton coorpos = new GuiChooseStringButton(6, width/2+50, 70, 150, 20, \"Coor-Position\", GuiPositions.getPosList(), \"poscoor\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosCoor()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showworldage = new GuiBooleanButton(7, 10, 95, 150, 20, \"Show WorldAge\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowWorldAge(), \"showworldage\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showworldage\").split(\";\"));\r\n\t\tGuiChooseStringButton worldagepos = new GuiChooseStringButton(8, width/2+50, 95, 150, 20, \"WorldAge-Position\", GuiPositions.getPosList(), \"posworldage\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosWorldAge()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\tGuiBooleanButton showFriendly = new GuiBooleanButton(7, 10, 120, 150, 20, \"Mark friendly spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingFriendlySpawns(), \"showfmobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfriendlymobspawn\").split(\";\"));\r\n\t\tGuiBooleanButton showAggressiv = new GuiBooleanButton(7, 10, 145, 150, 20, \"Mark aggressiv spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingAggressivSpawns(), \"showamobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showaggressivmobspawn\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton dynamic = new GuiBooleanButton(7, width/2+50, 120, 150, 20, \"dynamic selection\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isDynamic(), \"dynamichsel\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.dynamicselection\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tGuiButton back = new GuiButton(9, width/2-100,height-50 , \"back to game\");\r\n\t\t\r\n\t\tbuttonList.add(showworldage);\r\n\t\tbuttonList.add(worldagepos);\r\n\t\tbuttonList.add(dirpos);\r\n\t\tbuttonList.add(fpspos);\r\n\t\tbuttonList.add(coorpos);\r\n\t\tbuttonList.add(showCoor);\r\n\t\tbuttonList.add(showFPS);\r\n\t\tbuttonList.add(showDirection);\r\n\t\t\r\n\t\tbuttonList.add(showFriendly);\r\n\t\tbuttonList.add(showAggressiv);\r\n\t\tbuttonList.add(dynamic);\r\n\t\t\r\n\t\tbuttonList.add(back);\r\n\t}", "private void createButtons() {\n\t\tfor (int x = 0; x < buttons.length; x++)\n\t\t\tfor (int y = 0; y < buttons[x].length; y++) {\n\t\t\t\tif ((x % 2 == 0 && y % 2 == 0) || (x % 2 == 1 && y % 2 == 1))\n\t\t\t\t\tbuttons[x][y] = new DarkButton();\n\t\t\t\telse\n\t\t\t\t\tbuttons[x][y] = new LightButton();\n\n\t\t\t\tbuttonListener(x, y);\n\t\t\t}\n\t\t\t\n\t\t\tinitButtonIcons();\n\t}", "public ChartFrame(Chart chart) {\r\n\t\tthis.chart = chart;\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c = 0; c < seatGrid[r].length; c++) {\r\n\t\t\t\tJLabel label = new JLabel();\r\n\t\t\t\tlabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n\t\t\t\tseatGrid[r][c] = label;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tremoveBtn = new JButton(\"Remove\");\r\n\t\tremoveBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonRemoveClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taddBtn = new JButton(\"Add\");\r\n\t\taddBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonAddClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tswapBtn = new JButton(\"Swap\");\r\n\t\tswapBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonSwapClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tloadBtn = new JButton(\"Load\");\r\n\t\tloadBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonLoadClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmoveBtn = new JButton(\"Move\");\r\n\t\tmoveBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonMoveClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));\r\n\t\tpanel.setLayout(new GridLayout(7, 5));\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c = 0; c < seatGrid[r].length; c++) {\r\n\t\t\t\tpanel.add(seatGrid[r][c]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < seatGrid[0].length; i++) {\r\n\t\t\tpanel.add(Box.createHorizontalGlue());\r\n\t\t}\r\n\r\n\t\tpanel.add(removeBtn);\r\n\t\tpanel.add(addBtn);\r\n\t\tpanel.add(loadBtn);\r\n\t\tpanel.add(swapBtn);\r\n\t\tpanel.add(moveBtn);\r\n\r\n\t\tadd(panel);\r\n\t\tsetSize(500, 400);\r\n\t\tsetVisible(true);\r\n\t\tsetTitle(\"Seating Chart\");\r\n\t\tupdate();\r\n\r\n\t}", "private void createButton() {\n this.setIcon(images.getImageIcon(fileName + \"-button\"));\n this.setActionCommand(command);\n this.setPreferredSize(new Dimension(width, height));\n this.setMaximumSize(new Dimension(width, height));\n }", "private void createUIComponents() {\n bt1 = new JButton(\"Hola\");\n }", "private void constructChartPanel() {\n chartPanel = new JPanel();\n chartPanel.setBorder(BorderFactory.createTitledBorder(\"Price Chart\"));\n chartPanel.setPreferredSize(relativeSize(0.4f, 0.35f));\n \n displayChartButton = new JButton(\"Click to Display Price Chart\");\n displayChartButton.setEnabled(false);\n displayChartButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n JPanel cPanel = chart.getChartPanel();\n chartPanel.removeAll();\n chartPanel.add(cPanel);\n cPanel.setPreferredSize(relativeSize(0.4f, 0.35f));\n \n pack();\n repaint();\n }\n });\n \n chartPanel.add(displayChartButton);\n }", "private void generateButtons(){\n\t\tint coordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tint coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t//Button button = new Button(coordX, coordY);\n\t\t//buttons.put(0, button);\n\t}", "public void buildButtons() {\r\n\t\tImage temp1= display_img.getImage();\r\n\t\tImageIcon img=new ImageIcon(temp1.getScaledInstance(800, 800, Image.SCALE_SMOOTH));\r\n\t\timg1 = img.getImage();\r\n\t\tfor(int y=0;y<10;y++) {\r\n\t\t\tfor(int x=0; x<10; x++) {\r\n\t\t\t\tImage image = Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(img1.getSource(), new CropImageFilter(x * 800 / 10, y * 800 / 10, 100, 100)));\r\n\t\t\t\tImageIcon icon = new ImageIcon(image);\r\n\t\t\t\tJButton temp = new JButton(icon);\r\n\t\t\t\ttemp.putClientProperty(\"position\", new Point(y,x));\r\n\t\t\t\tsolutions.add(new Point(y,x));\r\n\t\t\t\ttemp.putClientProperty(\"isLocked\", false);\r\n\t\t\t\ttemp.addMouseListener(new DragMouseAdapter());\r\n\t\t\t\tgrid[x][y]=temp;\r\n\r\n\t\t\t\tbuttons.add(temp);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "Button createButton();", "public void createButtonGrid() {\n\t\tbuttonPanel.setOpaque(false);\n\t\t\n\t\t// designs array of buttons\n\t\tfor (int counter = 1; counter <= 20; counter++) {\n\t\t\tbuttonArray[counter] = new JButton();\n\t\t\tbuttonArray[counter].setOpaque(false);\n\t\t\tbuttonArray[counter].setVisible(true);\n\t\t\tbuttonArray[counter].setBorderPainted(false);\n\t\t\tbuttonArray[counter].setHorizontalTextPosition(JButton.CENTER);\n\t\t\tbuttonArray[counter].setVerticalTextPosition(SwingConstants.CENTER);\n\t\t\tbuttonArray[counter].setFont(new Font(\"Courier\", Font.PLAIN, 15));\n\t\t\tbuttonArray[counter].setText(\"<html><font color = white>\" + Integer.toString(counter) + \"</font></html>\");\n\t\t\t// add action listener to each button\n\t\t\tbuttonArray[counter].addActionListener(eventsMain);\n\t\t\t// add each button to the container\n\t\t\tbuttonPanel.add(buttonArray[counter]);\n\t\t}\n\t\t\n\t\t// set colour for ach row of buttons\n\t\tfor (int counter = 1; counter <= 20; counter++) {\n\t\t\tif (counter >= 1 && counter < 6) {\n\t\t\t\tbuttonArray[counter].setIcon(btnBlue);\n\t\t\t} else if (counter > 5 && counter < 11) {\n\t\t\t\tbuttonArray[counter].setIcon(btnGreen);\n\t\t\t} else if (counter > 10 && counter < 16) {\n\t\t\t\tbuttonArray[counter].setIcon(btnRed);\n\t\t\t} else if (counter > 15 && counter < 21) {\n\t\t\t\tbuttonArray[counter].setIcon(btnGray);\n\t\t\t}\n\t\t}\n\t}", "public JButtonsPanel() {\r\n setBorder(BorderFactory.createEtchedBorder(Color.GREEN, new Color(148, 145, 140)));\r\n\r\n jOpen.setText(BTN_OPEN);\r\n jOpen.setToolTipText(MSG_OPEN);\r\n jOpen.setBounds(new Rectangle(BTN_LEFT, BTN_VSPACE, BTN_WIDTH, BTN_HEIGHT));\r\n add(jOpen);\r\n\r\n jCheckHealth.setText(BTN_CHECK_HEALTH);\r\n jCheckHealth.setToolTipText(MSG_CHECK_HEALTH);\r\n jCheckHealth.setBounds(new Rectangle(BTN_LEFT, (int) (jOpen.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jCheckHealth);\r\n\r\n jClose.setText(BTN_CLOSE);\r\n jClose.setToolTipText(MSG_CLOSE);\r\n jClose.setBounds(new Rectangle(BTN_LEFT, (int) (jCheckHealth.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClose);\r\n\r\n jClaim.setText(BTN_CLAIM);\r\n jClaim.setToolTipText(MSG_CLAIM);\r\n jClaim.setBounds(new Rectangle(BTN_LEFT, (int) (jClose.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClaim);\r\n\r\n jRelease.setText(BTN_RELEASE);\r\n jRelease.setToolTipText(MSG_RELEASE);\r\n jRelease.setBounds(new Rectangle(BTN_LEFT, (int) (jClaim.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jRelease);\r\n\r\n jDeviceEnable.setText(BTN_DEVICE_ENABLE);\r\n jDeviceEnable.setToolTipText(MSG_DEVICE_ENABLE);\r\n jDeviceEnable.setBounds(new Rectangle(BTN_LEFT, (int) (jRelease.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jDeviceEnable);\r\n\r\n jDeviceDisable.setText(BTN_DEVICE_DISABLE);\r\n jDeviceDisable.setToolTipText(MSG_DEVICE_DISABLE);\r\n jDeviceDisable.setBounds(new Rectangle(BTN_LEFT, (int) (jDeviceEnable.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jDeviceDisable);\r\n\r\n jClearData.setText(BTN_CLEAR_DATA);\r\n jClearData.setToolTipText(MSG_CLEAR_DATA);\r\n jClearData.setBounds(new Rectangle(BTN_LEFT, (int) (jDeviceDisable.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClearData);\r\n\r\n jBeginEnrollCapture.setText(BTN_BEGIN_ENROLL_CAPTURE);\r\n jBeginEnrollCapture.setToolTipText(MSG_BEGIN_ENROLL_CAPTURE);\r\n jBeginEnrollCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jClearData.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jBeginEnrollCapture);\r\n\r\n jEndCapture.setText(BTN_END_CAPTURE);\r\n jEndCapture.setToolTipText(MSG_END_CAPTURE);\r\n jEndCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jBeginEnrollCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jEndCapture);\r\n\r\n jBeginVerifyCapture.setText(BTN_BEGIN_VERIFY_CAPTURE);\r\n jBeginVerifyCapture.setToolTipText(MSG_BEGIN_VERIFY_CAPTURE);\r\n jBeginVerifyCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jEndCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jBeginVerifyCapture);\r\n\r\n jIdentifyMatch.setText(BTN_IDENTIFY_MATCH);\r\n jIdentifyMatch.setToolTipText(MSG_IDENTIFY_MATCH);\r\n jIdentifyMatch.setBounds(new Rectangle(BTN_LEFT, (int) (jBeginVerifyCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jIdentifyMatch);\r\n\r\n jVerifyMatch.setText(BTN_VERIFY_MATCH);\r\n jVerifyMatch.setToolTipText(MSG_VERIFY_MATCH);\r\n jVerifyMatch.setBounds(new Rectangle(BTN_LEFT, (int) (jIdentifyMatch.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jVerifyMatch);\r\n\r\n jIdentify.setText(BTN_IDENTIFY);\r\n jIdentify.setToolTipText(MSG_IDENTIFY);\r\n jIdentify.setBounds(new Rectangle(BTN_LEFT, (int) (jVerifyMatch.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jIdentify);\r\n\r\n jVerify.setText(BTN_VERIFY);\r\n jVerify.setToolTipText(MSG_VERIFY);\r\n jVerify.setBounds(new Rectangle(BTN_LEFT, (int) (jIdentify.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jVerify);\r\n }", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, Messages.BTN_ADD,\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tMessages.BTN_FINISH, false);\r\n\t\tinitDataBindings();\r\n\t}", "private HBox createButtons() {\n\t\tButton solve = new Button(\"Solve\");\n\t\tButton clear = new Button(\"Clear\");\n\t\tButton quit = new Button(\"Quit\");\n\t\t\n\t\tsolve.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\tclear.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\tquit.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\t\n\t\tsolve.setOnAction(e -> solve());\n\t\tclear.setOnAction(e -> clear());\n\t\tquit.setOnAction(e -> quit());\n\t\t\n\t\tHBox buttons = new HBox();\n\t\tbuttons.setSpacing(20);\n\t\tbuttons.setPadding(new Insets(20,20,20,20));\n\t\tbuttons.setAlignment(Pos.CENTER);\n\t\tbuttons.getChildren().addAll(solve, clear, quit);\n\t\tbuttons.setStyle(\"-fx-background-color: #DCDCDC;\");\n\t\t\n\t\treturn buttons;\n\t}", "protected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \" 设 置 \",\n\t\t\t\ttrue);//IDialogConstants.CANCEL_LABEL\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\" 取 消 \", false);//IDialogConstants.CANCEL_LABEL\n\t}", "public void createGameButtons() {\n \tcreateGameButton(myResources.getString(\"startcommand\"), 1, GAME_BUTTON_XLOCATION, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"stopcommand\"), 0, GAME_BUTTON_XLOCATION * 3, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"speedup\"), SPEED_INCREASE, GAME_BUTTON_XLOCATION*5, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"slowdown\"), 1/SPEED_INCREASE, GAME_BUTTON_XLOCATION*7, GAME_BUTTON_YLOCATION);\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent)\n\t{\n\t\tButton button_1 = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tbutton_1.setText(\"Ja\");\n\t\tButton button = createButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t\tbutton.setText(\"Nein\");\n\t}", "public GUIVerbrauchsdiagramm(String title, EnergyData energyData) {\n super(title);\n this.energyData = energyData;\n setExtendedState(JFrame.MAXIMIZED_BOTH);\n ChartPanel chartPanel = (ChartPanel) createPanel(energyData);\n\n buttonGroup.add(verbrauchDiagramm);\n buttonGroup.add(zaehlerDiagramm);\n pRadiobuttons.add(verbrauchDiagramm);\n pRadiobuttons.add(zaehlerDiagramm);\n pRadiobuttons.setBorder(new EmptyBorder(0, 20, 0, 0));\n verbrauchDiagramm.setSelected(true);\n tDate.setForeground(Color.gray);\n\n pSkipDay.setLayout(new GridLayout(1, 7, 5, 0));\n pSkipDay.add(bBackwardsM);\n pSkipDay.add(bBackwardsW);\n pSkipDay.add(bBackwards);\n pSkipDay.add(tDate);\n pSkipDay.add(bForwards);\n pSkipDay.add(bForwardsW);\n pSkipDay.add(bForwardsM);\n\n pDate.add(lCurrentDate);\n pDate.add(lEmpty2);\n pDate.add(pSkipDay);\n\n\n pCsv.add(bExportCSV);\n pCsv.add(lEmpty);\n pCsv.add(bExportJSON);\n\n\n pHeader.add(pRadiobuttons);\n pHeader.add(pDate);\n pHeader.add(pCsv);\n\n this.add(chartPanel, BorderLayout.CENTER);\n this.add(pHeader, BorderLayout.NORTH);\n\n //Actionlistener\n ActionListener actionListenerDiagramm = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (verbrauchDiagramm.isSelected()) {\n System.out.println(\"Verbrauchsdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetVerbrauchsdiagramm(energyData);\n chart.setTitle(\"Stromzählerübersicht\");\n }\n if (zaehlerDiagramm.isSelected()) {\n System.out.println(\"Zählerdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetZaehlerdiagramm(energyData);\n chart.setTitle(\"Zählerstand\");\n }\n }\n };\n\n bExportCSV.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n try {\n JFileChooser fileChooser = new JFileChooser(\"./CSV\");\n fileChooser.setDialogTitle(\"CSV-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.csv\",\"csv\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".csv\")){\n path = path +\".csv\";\n }\n FileHandler.writeCSV(map,path);\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden in ein CSV-File exportiert\");\n }\n });\n\n bExportJSON.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n FileHandler.saveJSON(map);\n\n try {\n JFileChooser fileChooser = new JFileChooser(\"./JSON\");\n fileChooser.setDialogTitle(\"JSON-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.json\",\"json\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".json\")){\n path = path +\".json\";\n }\n FileWriter fileWriter = new FileWriter(path);\n fileWriter.write(FileHandler.saveJSON(map));\n fileWriter.flush();\n fileWriter.close();\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden zum JSON exportiert \\n\" + \"https://api.npoint.io/0dc854da1619aca3be45\");\n }\n });\n\n bForwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, true);\n }\n });\n\n bBackwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, false);\n }\n });\n bBackwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, false);\n }\n });\n bForwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, true);\n }\n });\n bBackwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, false);\n }\n });\n bForwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, true);\n }\n });\n\n /*chart.getXYPlot().addChangeListener(new PlotChangeListener() {\n @Override\n public void plotChanged(PlotChangeEvent plotChangeEvent) {\n XYPlot plot = plotChangeEvent.getPlot().getChart().getXYPlot();\n PlotChangeListener plotChangeListener = this;\n\n plot.removeChangeListener(plotChangeListener);\n long upperBound = (long) plot.getDomainAxis().getUpperBound();\n long lowerBound = (long) plot.getDomainAxis().getLowerBound();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(upperBound / 900000 * 900000);\n upperBound = calendar.getTimeInMillis();\n\n calendar.setTimeInMillis(lowerBound / 900000 * 900000);\n lowerBound = calendar.getTimeInMillis();\n System.out.println(new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\").format(new Date(lowerBound)));\n\n System.out.println(getEnergyData().getSdatData().containsKey(lowerBound));\n\n double highestValue = 0;\n if (getEnergyData().getSdatData().containsKey(lowerBound)) {\n for (long i = lowerBound; i < upperBound; i = i + 86400000) {\n if (getEnergyData().getSdatData().get(i).getRelativBezug() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getRelativBezug();\n\n }\n if (getEnergyData().getSdatData().get(i).getRelativeEinspeisung() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getZaehlerstandEinspeisung();\n }\n }\n\n System.out.println(highestValue);\n System.out.println(highestValue + 1);\n\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(highestValue + 1);\n }else {\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(plot.getRangeAxis().getUpperBound());\n }\n plot.addChangeListener(plotChangeListener);\n\n }\n\n });\n */\n\n tDate.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent e) {\n checkDate(e);\n }\n\n @Override\n public void keyPressed(KeyEvent e) {\n\n }\n\n @Override\n public void keyReleased(KeyEvent e) {\n\n }\n });\n\n tDate.addFocusListener(new FocusListener() {\n @Override\n public void focusGained(FocusEvent e) {\n if (tDate.getText().equals(\"Datum:\")) {\n tDate.setText(\"\");\n tDate.setForeground(Color.BLACK);\n }\n }\n\n @Override\n public void focusLost(FocusEvent e) {\n if (tDate.getText().isEmpty()) {\n tDate.setForeground(Color.GRAY);\n tDate.setText(\"Datum:\");\n }\n }\n });\n\n\n verbrauchDiagramm.addActionListener(actionListenerDiagramm);\n zaehlerDiagramm.addActionListener(actionListenerDiagramm);\n }", "private void createRgbHsbButtons() {\n \t\n Composite comp1 = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(3, false);\n gl.horizontalSpacing = 10;\n comp1.setLayout(gl);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n comp1.setLayoutData(gd);\n\n // Create a group to contain the RGB and HSB radio buttons.\n Group colorGroup = new Group(comp1, SWT.NONE);\n colorGroup.setText(\" Use color model: \");\n\n RowLayout groupRowLayout = new RowLayout();\n groupRowLayout.marginLeft = 10;\n groupRowLayout.marginRight = 10;\n groupRowLayout.spacing = 10;\n colorGroup.setLayout(groupRowLayout);\n\n // Create the RGB radio button. When the radio button is selected\n // update the upper and lower color wheel objects to display the RGB\n // sliders.\n rgbRdo = new Button(colorGroup, SWT.RADIO);\n rgbRdo.setText(\"RGB\");\n rgbRdo.setSelection(true);\n rgbRdo.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n changeColorWheels();\n }\n });\n\n // Create the HSB radio button. When the radio button is selected\n // update the upper and lower color wheel objects to display the HSB\n // sliders.\n hsbRdo = new Button(colorGroup, SWT.RADIO);\n hsbRdo.setText(\"HSB\");\n hsbRdo.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n changeColorWheels();\n }\n });\n \n Composite catComp = new Composite(comp1, SWT.NONE);\n gl = new GridLayout(1, false);\n gl.horizontalSpacing = 20;\n catComp.setLayout(gl);\n gd = new GridData(GridData.CENTER);\n gd.horizontalAlignment = SWT.CENTER;\n \n catComp.setLayoutData(gd);\n\n Label selCatLbl = new Label( catComp, SWT.None );\n selCatLbl.setText(\"Category\");\n \n final Combo selCmapCatCombo = new Combo( catComp, SWT.DROP_DOWN | SWT.READ_ONLY );\n selCmapCatCombo.setItems( availColorMapCats );\n selCmapCatCombo.select(0);\n \n selCmapCatCombo.addSelectionListener( new SelectionAdapter() {\n \tpublic void widgetSelected(SelectionEvent event) {\n \t\tString seldCat = selCmapCatCombo.getText();\n \t\tif( seldCat.equals( seldCmapCat ) ) {\n \t\t\treturn;\n \t\t}\n \t\t\n \t\tseldCmapCat = seldCat;\n \t\tseldCmapName = null;\n \t\tavailColorMaps.clear();\n \t\t\n for( String cmap : ColorMapUtil.listColorMaps(seldCmapCat) ) {\n \tif( seldCmapName == null ) {\n \t\tseldCmapName = cmap;\n \t\tif( !initColorMap() ) {\n \t\tseldCmapName = null;\n \t\t\tcontinue; // don't add to the list\n \t\t}\n \t}\n \tavailColorMaps.add(cmap);\n }\n \t\n createSliderData();\n selCmapCombo.setItems( availColorMaps.toArray(new String[0] ) );\n selCmapCombo.select(0);\n colorBar.setNewColorMap(sliderText, colorArray);\n \t}\n });\n \n Composite cmapComp = new Composite(comp1, SWT.NONE);\n gl = new GridLayout(1, false);\n gl.horizontalSpacing = 10;\n cmapComp.setLayout(gl);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n cmapComp.setLayoutData(gd);\n\n Label selCmapLbl = new Label( cmapComp, SWT.None );\n selCmapLbl.setText(\"Colormap\");\n \n selCmapCombo = new Combo( cmapComp, SWT.DROP_DOWN );\n selCmapCombo.setItems( availColorMaps.toArray(new String[0] ) );\n selCmapCombo.select(0);\n \n selCmapCombo.addSelectionListener( new SelectionAdapter() {\n \tpublic void widgetSelected(SelectionEvent event) {\n \t\tString seldCmap = selCmapCombo.getText();\n \t\tif( seldCmap.equals( seldCmapName ) ) {\n \t\t\treturn;\n \t\t}\n \t\t\n \t\tseldCmapName = seldCmap;\n\n \t\tif( initColorMap() ) {\n createSliderData();\n \t\t}\n colorBar.setNewColorMap(sliderText, colorArray);\n \t}\n });\n \n// selCmapCombo.addModifyListener( new ModifyListener() {\n//\t\t\t@Override\n//\t\t\tpublic void modifyText(ModifyEvent e) { \n//\t\t\t\tseldCmapName = selCmapCombo.getText();\n//\t\t\t}\n// });\n }", "public void MakeStacked() {\n\t\tStackedButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetStackedAreaChartImage())));\n\t\tStackedButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Stacked Area Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(StackedButton);\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n panelChart = new javax.swing.JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jButton1.setText(\"Balansas\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n panelChart.setBackground(new java.awt.Color(255, 255, 255));\n panelChart.setLayout(new java.awt.BorderLayout());\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelChart, javax.swing.GroupLayout.DEFAULT_SIZE, 686, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGap(306, 306, 306)\n .addComponent(jButton1)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(panelChart, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addContainerGap())\n );\n\n pack();\n }", "private void createButton() {\n\t\tbtnAddTask = new JButton(\"Add Task\");\n\t\tbtnSave = new JButton(\"Save\");\n\t\tbtnCancel = new JButton(\"Cancel\");\n\n\t\tbtnAddTask.addActionListener(new ToDoAction());\n\t\tbtnSave.addActionListener(new ToDoAction());\n\t\tbtnCancel.addActionListener(new ToDoAction());\n\t}", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Rechercher\", true);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, \"Annuler\", false);\r\n\t}", "private void addGraphButton() {\n\t\tgraphButton = new JButton(\"Graph\");\n\t\tadd (graphButton, SOUTH);\n\t\tgraphButton.addActionListener(this);\n\t}", "private void init_buttons(){\r\n /**\r\n * BOTON NUEVO\r\n */\r\n im_tool1.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonInicio();\r\n botonNuevo();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON EDITAR\r\n */\r\n im_tool2.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonEditar();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON GUARDAR\r\n */\r\n im_tool3.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonGuardar();\r\n }\r\n }\r\n }); \r\n /**\r\n * BOTON ELIMINAR\r\n */\r\n im_tool4.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonEliminar();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON IMPRIMIR\r\n */\r\n im_tool5.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){ \r\n botonImprimir();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON REGRESAR\r\n */\r\n im_tool6.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonInicio();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON POR ASIGNAR\r\n */\r\n im_tool7.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON NOTAS DE CREDITO\r\n */\r\n im_tool8.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON DEVOLUCION\r\n */\r\n im_tool9.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON BUSCAR\r\n */\r\n im_tool12.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n switch (mouseEvent.getClickCount()){\r\n case 1:\r\n botonInicio();\r\n botonBuscar();\r\n break;\r\n case 2:\r\n Datos.setIdButton(2003041);\r\n Gui.getInstance().showBusqueda(\"Busqueda\"); \r\n break;\r\n }\r\n }\r\n });\r\n /**\r\n * SELECCION EN LA TABLA\r\n */\r\n tb_guias.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n if ((tb_guias.getItems() != null) && (!tb_guias.getItems().isEmpty()))\r\n selectedRowGuide();\r\n }\r\n }\r\n }); \r\n /**\r\n * metodo para mostrar buscar el nro de guia\r\n * param: ENTER O TAB\r\n */\r\n tf_nroguia.setOnKeyReleased((KeyEvent ke) -> {\r\n if (ke.getCode().equals(KeyCode.ENTER)){\r\n //Valida que el evento se haya generado en el campo de busqueda\r\n if(((Node)ke.getSource()).getId().equals(\"tf_nroguia\")){\r\n //Solicita los datos y envia la Respuesta a imprimirse en la Pantalla\r\n Datos.setLog_cguias(new log_CGuias()); \r\n boolean boo = Ln.getInstance().check_log_CGuias_rela_caja(tf_nroguia.getText()); \r\n numGuias = 0;\r\n if(boo){\r\n Datos.setRep_log_cguias(Ln.getInstance().find_log_CGuias(tf_nroguia.getText(), \"\", \"ncaja\", Integer.parseInt(rows)));\r\n loadTable(Datos.getRep_log_cguias()); \r\n }\r\n else{\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de \" + ScreenName + \" NO existe!\", \"A\");\r\n tf_nroguia.requestFocus();\r\n }\r\n }\r\n }\r\n });\r\n /**\r\n * metodo para mostrar buscar el nro de guia\r\n * param: ENTER O TAB\r\n */\r\n tf_nrorguia.setOnKeyReleased((KeyEvent ke) -> {\r\n if (ke.getCode().equals(KeyCode.ENTER)){\r\n //Valida que el evento se haya generado en el campo de busqueda\r\n if(((Node)ke.getSource()).getId().equals(\"tf_nrorguia\")){\r\n //Solicita los datos y envia la Respuesta a imprimirse en la Pantalla\r\n boolean booa = true; \r\n if(booa){\r\n boolean booc = Ln.getInstance().check_log_CGuias_caja(tf_nrorguia.getText()); \r\n if(booc){\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n }\r\n else{\r\n for (int i = 0; i < log_guide_guia.size(); i++) {\r\n if(tf_nrorguia.getText().equals(tb_guias.getItems().get(i).getGuias())){\r\n booa = false;\r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n break;\r\n }\r\n } \r\n if(booa){\r\n log_Guide_rel_inv guide_carga = new log_Guide_rel_inv();\r\n\r\n List<Fxp_Archguid_gfc> data = \r\n Ln.getList_log_Archguid_gfc(Ln.getInstance().find_Archguid_gfc(tf_nrorguia.getText()));\r\n\r\n if (data.get(0).getStat_guia().equals(\"X\")\r\n || data.get(0).getStat_guia().equals(\"C\")){\r\n guide_carga.setNumorden(String.valueOf((log_guide_guia.size() + 1)));\r\n guide_carga.setGuias(tf_nrorguia.getText());\r\n guide_carga.setNumfact(data.get(0).getNumfact());\r\n guide_carga.setNumclie(data.get(0).getNumclie());\r\n\r\n if (data.get(0).getStat_guia().equals(\"A\")){\r\n if (tipoOperacion == 1)\r\n guide_carga.setStat_guia(null);\r\n else\r\n guide_carga.setStat_guia(data.get(0).getStat_guia());\r\n }\r\n else{\r\n guide_carga.setStat_guia(null);\r\n }\r\n \r\n \r\n log_guide_guia.add(guide_carga);\r\n\r\n loadTableGuide_guias();\r\n change_im_val(200, im_checkg); \r\n\r\n numFactCarga = numFactCarga + data.get(0).getNumfact();\r\n numClieCarga = numClieCarga + data.get(0).getNumclie();\r\n\r\n tf_nrorguia.setText(\"\");\r\n }else{\r\n if (data.get(0).getStat_guia().equals(\"\")){\r\n Gui.getInstance().showMessage(\"El Nro. de Guia NO tiene relación de Guia de Carga!\", \"A\");\r\n }\r\n else{\r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n }\r\n tf_nrorguia.requestFocus();\r\n }\r\n \r\n }\r\n }\r\n }\r\n else{\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de Guia NO existe!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n }\r\n }\r\n }\r\n });\r\n }", "private ButtonJPanel(){\n GridLayout layout = new GridLayout(0, 1);//creates a grid layout with 1 column and unlimited rows, for the buttons\n setLayout(layout);//sets the JPanel layout\n layout.setVgap(5);//sets the vertical gap between the buttons\n setBackground(Color.WHITE);//sets the color of the panel to WHITE\n \n fillrecimg = new ImageIcon(\"src/fillrec.png\");//assigns a png image to the ImageIcon\n fillovalimg = new ImageIcon(\"src/filloval.png\");\n emptyrecimg = new ImageIcon(\"src/emptyrec.png\");\n emptyovalimg = new ImageIcon(\"src/emptyoval.png\");\n linedrawimg = new ImageIcon(\"src/linedraw.png\");\n \n clear = new JButton(\"Clear\");//initializes the buttons, either with text or an icon\n (fillrec = new JButton(fillrecimg)).setActionCommand(\"Filled Rectangle\");//icon buttons are assigned a string ActionCommand\n (filloval = new JButton(fillovalimg)).setActionCommand(\"Filled Oval\");\n (emptyrec = new JButton(emptyrecimg)).setActionCommand(\"Empty Rectangle\");\n (emptyoval = new JButton(emptyovalimg)).setActionCommand(\"Empty Oval\");\n (linedraw = new JButton(linedrawimg)).setActionCommand(\"Line Drawing\");\n opencolor = new JButton(\"Color Chooser\");\n \n JButton[] buttons = {clear, fillrec, filloval, emptyrec, emptyoval, linedraw, opencolor};//an array of all the buttons\n \n for(JButton button : buttons){//for each button...\n button.addActionListener(this);//add a listener\n add(button);//add the button to the panel\n button.setOpaque(true);//make the color visable\n button.setBackground(Color.BLACK);//set background to black\n button.setFont(new Font(Font.DIALOG, Font.PLAIN, 13));//sets the font, style, and size\n }\n }", "@Override\n protected void addButtons()\n {\n JLabel agentOptions = new JLabel(\"Client Options \", SwingConstants.CENTER);\n addComponentToGridBag(this, agentOptions, 0, 0, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n\n JButton agentSendMessage = new JButton(\"Send Message\");\n addComponentToGridBag(this, agentSendMessage, 0, 2, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentSendMessage.addActionListener((ActionEvent e) ->\n {\n String to = getTo();\n String content = getContent(to);\n sendMessage(to, content);\n });\n\n JButton agentShowPortal = new JButton(\"Show Portal\");\n addComponentToGridBag(this, agentShowPortal, 0, 3, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentShowPortal.addActionListener((ActionEvent e) ->\n {\n displayConnections();\n });\n\n JButton agentexit = new JButton(\"Exit\");\n addComponentToGridBag(this, agentexit, 0, 5, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentexit.addActionListener((ActionEvent e) ->\n {\n System.exit(0);\n });\n }", "private void makeFrontGUIButtons(){\n Dimension preferred = getPreferredSize();\n\n optionsButton = new JButton();\n makeFrontButton(optionsButton, \"optionsIcon\", \"showOptions\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) (preferred.getHeight() * 0.98), 39, 37));\n makeSearchButton();\n\n zoomInButton = new JButton();\n makeFrontButton(zoomInButton, \"plusIcon\", \"zoomIn\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) preferred.getHeight() / 3 * 2, 39, 37));\n\n zoomOutButton = new JButton();\n makeFrontButton(zoomOutButton, \"minusIcon\", \"zoomOut\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) (preferred.getHeight() / 3 * 2 + 45), 39, 37));\n\n makeShowRoutePanelButton();\n\n fullscreenButton = new JButton();\n makeFrontButton(fullscreenButton, \"fullscreenIcon\", \"fullscreen\", new Rectangle((int) preferred.getWidth() - 60, (int) (preferred.getHeight() - preferred.getHeight() / 3 * 2 + 100), 39, 37));\n\n mapTypeButton = new JButton();\n makeFrontButton(mapTypeButton, \"layerIcon\", \"mapType\", new Rectangle((int) preferred.getWidth() - 49, (int) (preferred.getHeight() - preferred.getHeight() / 3 * 2 - 45), 39, 37));\n makeCloseDirectionListPanel();\n }", "private void setupButtonListeners() {\r\n final SharedPreferences sharedPref = getSharedPreferences(getString(R.string.pref_file_key),\r\n Context.MODE_PRIVATE);\r\n final String accessToken = sharedPref.getString(getString(R.string.access_token_key), null);\r\n\r\n final BarChart chart = findViewById(R.id.chart);\r\n\r\n final Button btnNext = findViewById(R.id.btn_next);\r\n btnNext.setVisibility(View.GONE); // current week is displayed on create, so no next week\r\n btnNext.setOnClickListener(new View.OnClickListener() {\r\n\r\n public void onClick(View v) {\r\n // Clear old data\r\n chart.invalidate();\r\n chart.clear();\r\n\r\n offsetFromToday--;\r\n\r\n // Calculate new endDate used to keep track of which day or week is displayed\r\n // and update the date heading\r\n if(dataType.equals(\"NON-SED\")) {\r\n endDate.add(Calendar.DATE, 1);\r\n updateDateHeading(null);\r\n } else {\r\n Calendar startDate = endDate;\r\n startDate.add(Calendar.DATE, 1);\r\n endDate = calcEndDateFromStart(startDate);\r\n updateDateHeading(startDate);\r\n }\r\n\r\n // Request new data\r\n getActivityData(accessToken, false);\r\n }\r\n });\r\n\r\n final Button btnPrev = findViewById(R.id.btn_prev);\r\n btnPrev.setOnClickListener(new View.OnClickListener() {\r\n\r\n public void onClick(View v) {\r\n // Clear old data\r\n chart.invalidate();\r\n chart.clear();\r\n\r\n offsetFromToday++;\r\n\r\n // Calculate new endDate used to keep track of which day or week is displayed\r\n // and update the date heading\r\n if(dataType.equals(\"NON-SED\")) {\r\n endDate.add(Calendar.DATE, -1);\r\n updateDateHeading(null);\r\n } else {\r\n endDate = calcPrevEndDate(endDate);\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n updateDateHeading(startDate);\r\n }\r\n\r\n // Request new data\r\n getActivityData(accessToken, false);\r\n }\r\n });\r\n }", "private void createAdditionalButtonControls(Composite parent) {\r\n\t\tComposite btnComposite = new Composite(parent, SWT.NONE);\r\n\t\tbtnComposite.setLayout(new GridLayout(2, false));\r\n\r\n\t\tButton selAllBtn = new Button(btnComposite, SWT.PUSH);\r\n\t\tselAllBtn.setText(Messages.TOPOLOGY_BTN_SELECT_ALL_TXT);\r\n\t\tselAllBtn.addSelectionListener(new SelectionListener() {\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tselectedUnitsList.setAllChecked(true);\r\n\t\t\t\tupdateSelectedItemsProperty();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton deselAllBtn = new Button(btnComposite, SWT.PUSH);\r\n\t\tdeselAllBtn.setText(Messages.TOPOLOGY_BTN_DESELECT_ALL_TXT);\r\n\t\tdeselAllBtn.addSelectionListener(new SelectionListener() {\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tselectedUnitsList.setAllChecked(false);\r\n\t\t\t\tupdateSelectedItemsProperty();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Add\",\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\r\n\t}", "private void createButtonsPane(VBox labelsPane){\n\t\tHBox buttonsPane = new HBox();\n\t\tButton easy = new Button(\"EASY\");\n\t\teasy.setFont(new Font(\"Arial Black\", 12));\n\t\teasy.setTextFill(Color.BLUE);\n\t\teasy.setFocusTraversable(false);\n\t\tButton medium = new Button(\"MEDIUM\");\n\t\tmedium.setFont(new Font(\"Arial Black\", 12));\n\t\tmedium.setTextFill(Color.BLUE);\n\t\tmedium.setFocusTraversable(false);\n\t\tButton hard = new Button(\"HARD\");\n\t\thard.setFont(new Font(\"Arial Black\", 12));\n\t\thard.setTextFill(Color.BLUE);\n\t\thard.setFocusTraversable(false);\n\t\tbuttonsPane.getChildren().addAll(easy, medium, hard);\n\t\tbuttonsPane.setMargin(easy, new Insets(10,5,5,5));\n\t\tbuttonsPane.setMargin(medium, new Insets(10,5,5,5));\n\t\tbuttonsPane.setMargin(hard, new Insets(10,5,5,5));\n\t\tbuttonsPane.setSpacing(20);\n\t\tbuttonsPane.setAlignment(Pos.CENTER);\n\t\tbuttonsPane.setStyle(\"-fx-background-color: gray;\");\n\t\teasy.setOnAction(new EasyHandler());\n\t\tmedium.setOnAction(new MediumHandler());\n\t\thard.setOnAction(new HardHandler());\n\t\tlabelsPane.getChildren().add(buttonsPane);\n\t}", "void createButtons(Container cp) {\r\n JPanel pn4 = new JPanel(); // create a panel\r\n pn4.setLayout(new FlowLayout(FlowLayout.LEFT)); // set the layout\r\n for (int i=0; i<strClEx.length; i++) {\r\n // repeat for the number of the buttons\r\n bt[i] = new JButton(strClEx[i]); // create a button\r\n bt[i].addActionListener(this); // add the action listener to the button\r\n pn4.add(bt[i]); // add the button to the panel\r\n }\r\n cp.add(pn4); // add the panel to the container\r\n }", "private JPanel initBtnPanel() {\n\t\tconvBtn = new JButton();\n\t\tconvBtn.addActionListener(new ConversionBtnListener());\n\t\tconvBtn.setFont(new AppFont());\n\n\t\t// A button to switch the input and output scales\n\t\tswitchBtn = new JButton();\n\t\tswitchBtn.addActionListener(new SwitchListener());\n\t\tswitchBtn.setFont(new AppFont());\n\n\t\t// The panel that displays the buttons\n\t\tJPanel btnPanel = new JPanel();\n\t\tbtnPanel.setLayout(new FlowLayout());\n\t\tbtnPanel.add(convBtn);\n\t\tbtnPanel.add(switchBtn);\n\n\t\treturn btnPanel;\n\t}", "@Override\n\tprotected void buildButton() {\n\t\t\n\t}", "public void MakePie() {\n\t\tPieButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(GetPieChartImage())));\n\t\tPieButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\tJPanel piecharts = new JPanel();\n\t\t\t\tpiecharts.setLayout(new WrapLayout());\n\t\t\t\tpiecharts.setSize(new Dimension(600,400));\n\t\t\t\tpiecharts.setBackground(Color.WHITE);\n\t\t\t\t\n\t\t\t\tif(GetHost().GetColumns().length == 1){\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\tpiecharts.add(new PieChart(GetHost().GetGraphData(), \n\t\t\t\t\t\t\"Pie Chart\", \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), 0));\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\tpiecharts.add(new PieChart(\n\t\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), 0));\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int i = 1; i<GetHost().GetColumns().length; i++){\n\t\t\t\t\t\t\tSetIncrement(i);\n\t\t\t\t\t\t\tpiecharts.add(new PieChart(\n\t\t\t\t\t\t\tGetHost().GetGraphData(), \"Pie Chart\", \n\t\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), i));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\tfor(int i=1;i<GetHost().GetColumns().length; i++){\n\t\t\t\t\t\t\t\tSetIncrement(i);\n\t\t\t\t\t\t\t\tpiecharts.add(new PieChart(\n\t\t\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), i));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\tHolder = new JScrollPane();\n\t\t\tHolder.setPreferredSize(new Dimension(800,450));\n\t\t\tHolder.setViewportView(piecharts);\n\t\t\tHolder.setVisible(true);\n\t\t\t\t\n\t\t\tGetHost().LeftPanelContent(Holder);\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(PieButton);\t\n\t}", "public void MakeLine() {\n\t\tLineButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetLineChartImage())));\n\t\tLineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Line Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(LineButton);\n\t}", "protected Panel createButtonPanel() {\n Panel panel = new Panel();\n panel.setLayout(new PaletteLayout(2, new Point(2,2), false));\n return panel;\n }", "private void generateButtonPanel() {\n buttonsPanel = new JPanel();\n playPauseButton = addButton(\"Play/Pause\");\n restartButton = addButton(\"Restart\");\n speedUpButton = addButton(\"Speed Up\");\n slowDownButton = addButton(\"Slow Down\");\n loopbackButton = addButton(\"Loopback\");\n keyCommandsButton = addButton(\"Key Commands\");\n textViewButton = addButton(\"Animation Text\");\n\n addShapeButton = addButton(\"Add Shape\");\n removeShapeButton = addButton(\"Remove Shape\");\n addKeyframeButton = addButton(\"Add Keyframe\");\n removeKeyframeButton = addButton(\"Remove Keyframe\");\n editKeyframeButton = addButton(\"Edit Keyframe\");\n clearAnimationButton = addButton(\"Clear Animation\");\n clearShapeButton = addButton(\"Clear Shape\");\n buttonsPanel.setLayout(new FlowLayout());\n\n mainPanel.add(buttonsPanel);\n }", "public void registerButtons()\n\t{\n\t\tplot.addActionListener(new ButtonListener());\n\t\tin.addActionListener(new ButtonListener(1));\n\t\tout.addActionListener(new ButtonListener(2));\n\t\t\n\t}", "private void initButtons() {\n HBox buttons = new HBox(50);\n yes = new Button(\"Yes!\");\n no = new Button(\"No!\");\n buttons.getChildren().addAll(yes,no);\n buttons.setAlignment(Pos.CENTER);\n root.getChildren().addAll(buttons);\n }", "public interface Buttons {\n\n\t/**\n\t * \n\t * @param btnText - the text that will be shown when looking at the button\n\t * @param tooltip - the text that will be shown when the user is mouseover the\n\t * button\n\t * @return Button - with the text btnText and a tooltip of tooltip, the rest of\n\t * the button is very basic\n\t */\n\tpublic default Button buttons(String btnText, String tooltip) {\n\t\tButton btn = new Button(btnText);\n\t\tTooltip btnTooltip = new Tooltip(tooltip);\n\t\tbtn.setTooltip(btnTooltip);\n\t\tbtn.setMinWidth(MinWidth());\n\t\tbtn.setPrefWidth(50.0);\n\t\tbtn.setMaxWidth(50.0);\n\t\tbtn.setFont(Font.font(\"Verdana\", 20));\n\t\tEventHandler<ActionEvent> buttonHandler = new EventHandler<ActionEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tactionButton(btnText);\n\t\t\t\tevent.consume();\n\t\t\t}\n\n\t\t};\n\t\tbtn.setOnAction(buttonHandler);\n\t\treturn btn;\n\n\t}\n\n\t/**\n\t * all the action that will happen when the button is pressed will be defined\n\t * here\n\t * \n\t * @param text - that is on the button. \n\t */\n\tpublic void actionButton(String text);\n\n\tpublic default double MinWidth() {\n\t\treturn 50.0;\n\t}\n}", "public Button(){\n id=1+nbrButton++;\n setBounds(((id-1)*getDimX())/(Data.getNbrLevelAviable()+1),((id-1)*getDimY())/(Data.getNbrLevelAviable()+1),getDimX()/(2*Data.getNbrLevelAviable()),getDimY()/(2*Data.getNbrLevelAviable()));\n setText(id+\"\");\n setFont(Data.getFont());\n addMouseListener(this);\n setVisible(true);\n }", "void createButton(Button main){\n\t\tActions handler = new Actions();\r\n\t\tmain.setOnAction(handler);\r\n\t\tmain.setFont(font);\r\n\t\t//sets button preference dimensions and label \r\n\t\tmain.setPrefWidth(100);\r\n\t\tmain.setPrefHeight(60);\r\n\t\tmain.setText(\"Close\");\r\n\t}", "private void createButtons() {\n\tTexture startGameTex = new Texture(\n\t\tGdx.files.internal(\"assets/data/menu/menu_start.png\"));\n\tTexture plane_p1_tex = new Texture(\n\t\tGdx.files.internal(\"assets/data/menu/menu_player1.png\"));\n\tTexture plane_p2_tex = new Texture(\n\t\tGdx.files.internal(\"assets/data/menu/menu_player2.png\"));\n\n\tplayButton = new Button(\"\", font, 0, 0, new TextureRegion(startGameTex,\n\t\t0, 0, 161, 20), new TextureRegion(startGameTex, 0, 0, 161, 20),\n\t\tnew ScreenSwitchHandler(Screen.GAME));\n\tplaneButton_p1 = new Button(\"\", font, 0, 0, new TextureRegion(\n\t\tplane_p1_tex, 0, 0, 161, 20), new TextureRegion(plane_p1_tex,\n\t\t0, 0, 161, 20), new ScreenSwitchHandler(Screen.PLANE_P1));\n\tplaneButton_p2 = new Button(\"\", font, 0, 0, new TextureRegion(\n\t\tplane_p2_tex, 0, 0, 161, 20), new TextureRegion(plane_p2_tex,\n\t\t0, 0, 161, 20), new ScreenSwitchHandler(Screen.PLANE_P2));\n\toptionsButton = new Button(\"Options\", font, new ScreenSwitchHandler(\n\t\tScreen.OPTIONS));\n\texitButton = new Button(\"Exit\", font, new ButtonHandler() {\n\t @Override\n\t public void onClick() {\n\t\tGdx.app.exit();\n\t }\n\n\t @Override\n\t public void onRelease() {\n\t\t// TODO Auto-generated method stub\n\n\t }\n\t});\n }", "public void MakeBar3D() {\n\t\tBarButton3D = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t\tGet3DBarChartImage())));\n\t\tBarButton3D.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\t\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart3D(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"3D Bar Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart3D(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\t\n\t\t\n\t\tChartTypeInterface.add(BarButton3D);\n\t}", "public void createInstructionButton() {\n \tEventHandler<MouseEvent> eventHandler = new EventHandler<MouseEvent>() {\n\t @Override public void handle(MouseEvent e) {\n\t \tshowInstructions();}\n };\n \tcreateGenericButton(2, 0, myResources.getString(\"guide\"), eventHandler);\n }", "private void createButtonComp() {\n GridData gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);\n Composite okBtnComp = new Composite(shell, SWT.NONE);\n GridLayout okBtnCompLayout = new GridLayout(2, true);\n okBtnComp.setLayout(okBtnCompLayout);\n okBtnComp.setLayoutData(gd);\n\n GridData bd = new GridData(110, 30);\n okBtn = new Button(okBtnComp, SWT.PUSH);\n okBtn.setText(\"OK\");\n okBtn.setLayoutData(bd);\n okBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n calculateDuration();\n shell.dispose();\n }\n });\n\n bd = new GridData(110, 30);\n cancelBtn = new Button(okBtnComp, SWT.PUSH);\n cancelBtn.setText(\"Close\");\n cancelBtn.setLayoutData(bd);\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n\n /*\n * (non-Javadoc)\n * \n * @see\n * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse\n * .swt.events.SelectionEvent)\n */\n @Override\n public void widgetSelected(SelectionEvent e) {\n setReturnValue(-1);\n close();\n }\n });\n }", "public void init() {\n setLayout(new GridLayout(n-1, n));\n setFont(new Font(\"SansSerif\", Font.BOLD, 24));\n \n // Baris 1\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"Bksp\",Color.red));\n add(makeButton(\"CE\",Color.red));\n add(makeButton(\"X\",Color.red));\n \n // Baris 2\n add(makeButton(\"MC\",Color.red));\n add(new Button(\"7\"));\n add(new Button(\"8\"));\n add(new Button(\"9\"));\n add(new Button(\"/\"));\n add(new Button(\"sqrt\"));\n \n // Baris 3\n add(makeButton(\"MR\",Color.red));\n add(new Button(\"4\"));\n add(new Button(\"5\"));\n add(new Button(\"6\"));\n add(new Button(\"x\"));\n add(new Button(\"%\"));\n \n // Baris 4\n add(makeButton(\"MR\",Color.red));\n add(new Button(\"1\"));\n add(new Button(\"2\"));\n add(new Button(\"3\"));\n add(new Button(\"-\"));\n add(new Button(\"1/x\"));\n\n // Baris 5\n add(makeButton(\"M+\",Color.red));\n add(new Button(\"0\"));\n add(new Button(\"+/-\"));\n add(new Button(\".\"));\n add(new Button(\"+\"));\n add(new Button(\"=\"));\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Speichern\",\n\t\t\t\tfalse);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\"Abbrechen\", false);\n\t\t\n\t}", "protected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(barComp, BUTTON_ADD_ID, Messages.btnAddParameter, true);\n\t\tcreateButton(barComp, BUTTON_EDIT_ID, Messages.btnEditParameter, true);\n\t\tcreateButton(barComp, BUTTON_DROP_ID, Messages.btnDropParameter, true);\n\t\tcreateButton(barComp, BUTTON_UP_ID, Messages.btnUpParameter, true);\n\t\tcreateButton(barComp, BUTTON_DOWN_ID, Messages.btnDownParameter, true);\n\t\tcreateButton(parent, IDialogConstants.OK_ID, com.cubrid.common.ui.common.Messages.btnOK, true);\n\n\t\tgetButton(BUTTON_EDIT_ID).setEnabled(false);\n\t\tgetButton(BUTTON_UP_ID).setEnabled(false);\n\t\tgetButton(BUTTON_DOWN_ID).setEnabled(false);\n\t\tgetButton(BUTTON_DROP_ID).setEnabled(false);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, com.cubrid.common.ui.common.Messages.btnCancel, false);\n\t}", "private void createContents()\n\t{\n\t\tGridLayout clayout = new GridLayout();\n\t\tclayout.marginHeight = 2;\n\t\tclayout.marginWidth = 2;\n\t\tclayout.marginTop = 2;\n\t\tclayout.marginBottom = 2;\n\t\tclayout.marginLeft = 2;\n\t\tclayout.marginRight = 2;\n\t\tclayout.numColumns = 1;\n\t\tsetLayout(clayout);\n\t\t\n\t\t\n\t\tm_executorsTable = new ExecutorsTable(this);\n\t\tGridData tableLayoutData = new GridData(GridData.FILL_BOTH);\n\t\ttableLayoutData.grabExcessHorizontalSpace = true;\n\t\ttableLayoutData.widthHint = 700;\n\t\ttableLayoutData.heightHint = 200;\n\t\tm_executorsTable.getGrid().setLayoutData(tableLayoutData);\n\t\tm_executorsTable.addDoubleClickListener(this);\n\t\tm_executorsTable.addSelectionChangedListener( new ISelectionChangedListener(){\n\n\t\t\t@Override\n public void selectionChanged(SelectionChangedEvent arg0)\n {\n\t\t\t\tupdateButtons();\n }\n\t\t\t\n\t\t});\n\n\t\tComposite buttonBar = new Composite(this, SWT.BORDER);\n\t\tbuttonBar.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\tbuttonBar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\t\n\t\tm_btnTakeControl = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnTakeControl.setText(BTN_TAKE_CONTROL);\n\t\tm_btnTakeControl.addSelectionListener(this);\n\t\t\n\t\tm_btnReleaseControl = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnReleaseControl.setText(BTN_RELEASE_CONTROL);\n\t\tm_btnReleaseControl.addSelectionListener(this);\n\t\t\n\t\tm_btnBackground = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnBackground.setText(BTN_BACKGROUND);\n\t\tm_btnBackground.addSelectionListener(this);\n\n\t\tm_btnStartMonitor = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnStartMonitor.setText(BTN_START_MONITOR);\n\t\tm_btnStartMonitor.addSelectionListener(this);\n\t\t\n\t\tm_btnStopMonitor = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnStopMonitor.setText(BTN_STOP_MONITOR);\n\t\tm_btnStopMonitor.addSelectionListener(this);\n\t\t\n\t\tm_btnStopExecutor = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnStopExecutor.setText(BTN_STOP_EXECUTOR);\n\t\tm_btnStopExecutor.addSelectionListener(this);\n\n\t\tm_btnKillExecutor = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnKillExecutor.setText(BTN_KILL_EXECUTOR);\n\t\tm_btnKillExecutor.addSelectionListener(this);\n\t\t\n\t\tm_btnRefresh = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnRefresh.setText(BTN_REFRESH);\n\t\tm_btnRefresh.addSelectionListener(this);\n\t\t\n\t\tapplyFonts();\n\t\tdisableButtons();\n\t}", "@Override\n public final void initButtons(int x, int y, int addy){\n \n String data = s_datapath;\n addButton(data + \"SM_NeuesSpiel\" + s_typ, x, y, 1);\n addButton(data + \"OM_SpielSpeichern\" + s_typ, x, y + addy, 2);\n addButton(data + \"SM_SpielLaden\" + s_typ, x, y + addy * 2, 3);\n //addButton(data,x, y + addy*3, 4);\n addButton(data + \"Menu_Element_Blank\" + s_typ, x,/*715*/ y + addy * 4, 5);\n addButton(data + \"SM_SpielBeenden\" + s_typ, x,/*845*/ y + addy * 5, 6);\n }", "public void MakeXYSpline() {\n\t\tXYSplineButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetXYSplineChartImage())));\n\t\tXYSplineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new XYSplineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"XYSpline Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new XYSplineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(XYSplineButton);\t\n\t}", "private void setButtons()\n\t{\n\t\tstartSim = new JButton(\"Start Sim\");\n\t\tstartSim.addActionListener(this);\n\t\tpauseSim = new JButton(\"Pause Sim\");\n\t\tpauseSim.addActionListener(this);\n\t\taddEat = new JButton(\"Add Eatery\");\n\t\taddEat.addActionListener(this);\n\t\tsubEat = new JButton(\"Subtract Eatery\");\n\t\tsubEat.addActionListener(this);\n\t\taddCash = new JButton(\"Add Cashier\");\n\t\taddCash.addActionListener(this);\n\t\tsubCash = new JButton(\"Subtract Cashier\");\n\t\tsubCash.addActionListener(this);\n\t}", "private void createButton() throws SlickException {\n int width = 25*getGameContainer().getWidth()/100;\n int height = 10*getGameContainer().getHeight()/100;\n\n Image login = new Image(getReaderXmlFile().read(\"buttonLogin\")).getScaledCopy(width, height);\n Coordinate posLogin = new Coordinate((getGameContainer().getWidth() - login.getWidth())/2,55*getGameContainer().getHeight()/100);\n loginButton = new Button(getGameContainer(), login, posLogin, IDStates.MENU_STATE, this);\n\n Image account = new Image(getReaderXmlFile().read(\"buttonAccount\")).getScaledCopy(width, height);\n Coordinate posAccount = new Coordinate((getGameContainer().getWidth() - account.getWidth())/2,70*getGameContainer().getHeight()/100);\n accountButton = new Button(getGameContainer(), account, posAccount, IDStates.MENU_STATE, this);\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button_1 = createButton(parent, CustomNo, \"No\", false);\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// \"No\" clicked\n\t\t\t\tclose();\n\t\t\t}\n\t\t});\n\t\tButton button = createButton(parent, CustomYes, \"Yes\",\n\t\t\t\ttrue);\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// \"Yes\" clicked\n\t\t\t\t\n\t\t FileDialog dlg = new FileDialog(getShell(), SWT.SAVE);\n\t\t dlg.setFilterNames(new String[]{\"All Files (*.*)\"});\n\t\t dlg.setFilterExtensions(new String[]{\"*.*\"});\n\t\t dlg.setOverwrite(true);\n\t\t dlg.setFileName(filename);\n\t\t String path = dlg.open();\n\t\t //Activator.getDefault().showDialogAsync(\"Filepath chosen\", path);\n\t\t filepath = path;\n\t\t if (path != null)\n\t\t \tclose();\n\t\t\t}\n\t\t});\n\t\tbutton.setSelection(true);\n\t}", "@Override\n protected void createButtonsForButtonBar(Composite parent) {\n createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n }", "protected void createSaveButtons() {\n Composite buttonComp = new Composite(shell, SWT.NONE);\n buttonComp.setLayout(new GridLayout(2, true));\n buttonComp.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true,\n false));\n\n int buttonWidth = 80;\n GridData gd = new GridData(SWT.RIGHT, SWT.DEFAULT, true, false);\n gd.widthHint = buttonWidth;\n Button saveBtn = new Button(buttonComp, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n handleSaveAction();\n }\n });\n\n gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);\n gd.widthHint = buttonWidth;\n Button cancelBtn = new Button(buttonComp, SWT.PUSH);\n cancelBtn.setText(\"Cancel\");\n cancelBtn.setLayoutData(gd);\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n setReturnValue(null);\n close();\n }\n });\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t\tm_bindingContext = initDataBindings();\n\t}", "public void MakeScatter() {\n\t\tScatterButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(\n\t\t\t\tGetScatterPlotChartImage())));\n\t\tScatterButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Scatter Plot Chart \", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(ScatterButton);\n\t}", "private void setupButtons() {\n\t\tsetupCreateCourse();\n\t\tsetupRemoveCourse();\n\t\tsetupCreateOffering();\n\t\tsetupRemoveOffering();\n\t\tsetupAddPreReq();\n\t\tsetupRemovePreReq();\n\t\tsetupBack();\n\t}", "public Box getButtonPanel() {\n\t\tBox buttonsPanel = new Box(BoxLayout.Y_AXIS);\n\t\tbuttonsPanel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n\t\tBox treeBox = new Box(BoxLayout.Y_AXIS);\n\t\ttreeBox.setBorder(new TitledBorder(\"Schema\"));\n\n\t\tBox associationBox = new Box(BoxLayout.Y_AXIS);\n\t\tassociationBox.setBorder(new TitledBorder(\"Association\"));\n\n\t\tBox outputBox = new Box(BoxLayout.Y_AXIS);\n\t\toutputBox.setBorder(new TitledBorder(\"Output\"));\n\n\t\tBox numerotationBox = new Box(BoxLayout.X_AXIS);\n\t\tnumerotationBox.setBorder(new TitledBorder(\"Numerotation\"));\n\t\t/* add a button for loading a XML Schema */\n\t\tJButton loadFileb = new JButton(\"Open schema\");\n\t\tUtils.setDefaultSize(loadFileb);\n\t\tloadFileb.addActionListener(new LoadSchemaListener());\n\n\t\t/*\n\t\t * add a button for associating the content of a node to a line in the\n\t\t * flat file\n\t\t */\n\t\tJButton selectLineNodeb = new JButton(\"Main node\");\n\t\tUtils.setDefaultSize(selectLineNodeb);\n\t\tselectLineNodeb.addActionListener(new SelectLineNodeListener());\n\n\t\tJButton selectNodeb = new JButton(\"Select\");\n\t\tUtils.setDefaultSize(selectNodeb);\n\t\tselectNodeb.addActionListener(new SelectNodeListener());\n\n\t\tJButton unselectNodeb = new JButton(\"Unselect\");\n\t\tUtils.setDefaultSize(unselectNodeb);\n\t\tunselectNodeb.addActionListener(new UnselectNodeListener());\n\n\t\tJButton nameb = new JButton(\"Name\");\n\t\tUtils.setDefaultSize(nameb);\n\t\tnameb.addActionListener(new associateNameListener());\n\n\t\tJButton filterb = new JButton(\"Filter\");\n\t\tUtils.setDefaultSize(filterb);\n\t\tfilterb.addActionListener(new AssociateFilterListener());\n\n\t\tJButton infosb = new JButton(\"About\");\n\t\tUtils.setDefaultSize(infosb);\n\t\tinfosb.addActionListener(new InfosListener());\n\n\t\tassociationBox.add(selectNodeb);\n\t\tassociationBox.add(unselectNodeb);\n\t\tassociationBox.add(nameb);\n\t\tassociationBox.add(filterb);\n\t\tfilter = new JLabel(\"no filter\");\n\t\tassociationBox.add(filter);\n\n\t\ttreeBox.add(loadFileb);\n\n\t\tassociationBox.add(infosb);\n\n\t\tJButton loadXmlFileb = new JButton(\"Open document (XML)\");\n\t\tUtils.setDefaultSize(loadXmlFileb);\n\t\tloadXmlFileb.addActionListener(new LoadDocumentListener());\n\n\t\tJButton setSeparatorb = new JButton(\"Separator\");\n\t\tUtils.setDefaultSize(setSeparatorb);\n\t\tsetSeparatorb.addActionListener(new SetSeparatorListener());\n\n\t\tJButton printTabFileb = new JButton(\"Print\");\n\t\tUtils.setDefaultSize(printTabFileb);\n\t\tprintTabFileb.addActionListener(new PrintFlatFileListener());\n\n\t\ttreeBox.add(loadXmlFileb);\n\t\ttreeBox.add(selectLineNodeb);\n\n\t\toutputBox.add(setSeparatorb);\n\t\toutputBox.add(printTabFileb);\n\n\t\tnumerotationButtons = new ButtonGroup();\n\n\t\tnumericb = new JRadioButton(\"1\");\n\t\thighAlphabeticb = new JRadioButton(\"A\");\n\t\tlowAlphabeticb = new JRadioButton(\"a\");\n\t\tnoneb = new JRadioButton(\"none\");\n\n\t\tnumericb.addActionListener(new NumerotationListener());\n\t\thighAlphabeticb.addActionListener(new NumerotationListener());\n\t\tlowAlphabeticb.addActionListener(new NumerotationListener());\n\t\tnumerotationBox.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\tnumerotationButtons.add(numericb);\n\t\tnumerotationButtons.add(highAlphabeticb);\n\t\tnumerotationButtons.add(lowAlphabeticb);\n\t\tnumerotationButtons.add(noneb);\n\n\t\tswitch (((XsdTreeStructImpl) xsdTree).numerotation_type) {\n\t\tcase XsdTreeStructImpl.HIGH_ALPHABETIC_NUMEROTATION:\n\t\t\thighAlphabeticb.setSelected(true);\n\t\t\tbreak;\n\t\tcase XsdTreeStructImpl.LOW_ALPHABETIC_NUMEROTATION:\n\t\t\tlowAlphabeticb.setSelected(true);\n\t\t\tbreak;\n\t\tcase XsdTreeStructImpl.NUMERIC_NUMEROTATION:\n\t\t\tnumericb.setSelected(true);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tnoneb.setSelected(true);\n\t\t\tbreak;\n\t\t}\n\n\t\tnumerotationBox.add(numericb);\n\t\tnumerotationBox.add(highAlphabeticb);\n\t\tnumerotationBox.add(lowAlphabeticb);\n\t\tnumerotationBox.add(noneb);\n\n\t\tbuttonsPanel.add(treeBox);\n\t\tbuttonsPanel.add(associationBox);\n\t\tbuttonsPanel.add(outputBox);\n\t\tbuttonsPanel.add(numerotationBox);\n\n\t\tdisplayExample = new JCheckBox(\"preview\");\n\t\tbuttonsPanel.add(displayExample);\n\t\tdisplayExample.addActionListener(new PreviewListener());\n\t\t\n\t\treturn buttonsPanel;\n\t}", "@AutoGenerated\n\tprivate HorizontalLayout buildLayoutButtons() {\n\t\tlayoutButtons = new HorizontalLayout();\n\t\tlayoutButtons.setImmediate(false);\n\t\tlayoutButtons.setWidth(\"-1px\");\n\t\tlayoutButtons.setHeight(\"-1px\");\n\t\tlayoutButtons.setMargin(false);\n\t\t\n\t\t// btnSave\n\t\tbtnSave = new Button();\n\t\tbtnSave.setCaption(\"Salvar\");\n\t\tbtnSave.setImmediate(true);\n\t\tbtnSave.setWidth(\"-1px\");\n\t\tbtnSave.setHeight(\"-1px\");\n\t\tlayoutButtons.addComponent(btnSave);\n\t\t\n\t\t// btnCancel\n\t\tbtnCancel = new Button();\n\t\tbtnCancel.setCaption(\"Cancelar\");\n\t\tbtnCancel.setImmediate(true);\n\t\tbtnCancel.setWidth(\"-1px\");\n\t\tbtnCancel.setHeight(\"-1px\");\n\t\tlayoutButtons.addComponent(btnCancel);\n\t\t\n\t\treturn layoutButtons;\n\t}", "private void createBottomActionButtons() {\n Composite actionControlComp = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(2, false);\n GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n actionControlComp.setLayout(gl);\n actionControlComp.setLayoutData(gd);\n\n Button okBtn = new Button(actionControlComp, SWT.PUSH);\n okBtn.setText(\" OK \");\n okBtn.addSelectionListener(new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (verifySelection()) {\n close();\n }\n }\n });\n\n Button cancelBtn = new Button(actionControlComp, SWT.PUSH);\n cancelBtn.setText(\" Cancel \");\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n close();\n }\n });\n }", "@Override\n protected void createButtonsForButtonBar(final Composite parent) {\n\n GridLayout layout = (GridLayout) parent.getLayout();\n layout.marginHeight = 0;\n }", "public ZeePanel(Spel spel) {\n this.spel = spel;\n buttons = new JButton[16][16];\n setLayout(new GridLayout(16,16,5,5));\n for (int rij=0;rij<16;rij++)\n {\n for (int kolom=0;kolom<16;kolom++)\n {\n buttons[rij][kolom] = new JButton();\n buttons[rij][kolom].setBackground(Color.CYAN);\n add(buttons[rij][kolom]);\n buttons[rij][kolom].addActionListener(this);\n buttons[rij][kolom].setActionCommand(rij + \",\" + kolom);\n }\n }\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Fermer\", true);\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Fermer\", true);\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\t \n\t\t for(int g = 0;g<i;g++){\n\t\t String s = String.valueOf(datas[1][g]);\n\t\t data.addValue(this.datas[2][g], this.name[g], s);\n\t\t }\n\t\t \n\t\t if(e.getSource() == button1){\n\t\t JFreeChart chart = ChartFactory.createLineChart(\"Import Volume\",\n\t\t \"Year\",\n\t\t \"Ton\",\n\t\t data,\n\t\t PlotOrientation.VERTICAL,\n\t\t true,\n\t\t false,\n\t\t false);\n\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t add(cpanel, BorderLayout.CENTER);\n\t\t setVisible(true);\n\t\t } else if(e.getSource() == button2){\n\t\t\t JFreeChart chart = ChartFactory.createBarChart(\"Import Volume\",\n \"Year\",\n \"Ton\",\n data,\n PlotOrientation.VERTICAL,\n true,\n false,\n false);\n\t\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t\t add(cpanel, BorderLayout.CENTER);\n\t\t\t setVisible(true);\n} \n\n\t\t\n\t}", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\r\n\t}", "private void createButton(int i){\n\t\tint x = 10, y = 120, width = 100, height = 20;\n\t\tint temp = 0;\n\t\t\n\t\tbuttons.add(new JButton(\"New Student\"));\n\t\tbuttons.get(i).addActionListener(this);\n\t\t\n\t\tfor (int a = 0; a<i; a++){\n\t\t\tx += 110;\n\t\t\ttemp++;\n\t\t\tif(temp >= Integer.parseInt(askColumns.getText())){\n\t\t\t\ty += 140;\n\t\t\t\tx = 10;\n\t\t\t\ttemp = 0;\n\t\t\t}\n\t\t\t\n\n\t\t}\n\t\t\n\t\t\n\t\tbuttons.get(i).setBounds(x, y, width, height);\n\t\tthis.add(buttons.get(i));\t\n\t\tbuttons.get(i).revalidate();\n\t\tbuttons.get(i).repaint();\n\t\t\n\t}", "public void addKeys() {\n\t\tbtnDot = new JButton(\".\");\n\t\tbtnDot.setBounds(42, 120, 40, 40);\n\t\tthis.add(btnDot); //Handle case\n\t\t\n\t\tbtn0 = new JButton(\"0\");\n\t\tbtn0.setBounds(81, 120, 40, 40);\n\t\tthis.add(btn0);\n\t\tnumberButtonList = new ArrayList<JButton>(10);\n\t\tnumberButtonList.add(btn0);\n\t\t\n\t\tbtnC = new JButton(\"C\");\n\t\tbtnC.setBounds(120, 120, 40, 40);\n\t\tthis.add(btnC);\n\t\t\n\t\tbtnStar = new JButton(\"*\");\n\t\tbtnStar.setBounds(159, 120, 40, 40);\n\t\tthis.add(btnStar);\n\t\toperationButtonList = new ArrayList<JButton>(10);\n\t\toperationButtonList.add(btnStar);\n\t\t\n\t\tbtnPi = new JButton(\"π\");\n\t\tbtnPi.setBounds(198, 120, 40, 40);\n\t\tthis.add(btnPi);\n\t\t//numberButtonList.add(btnPi); //Special case\n\t\tvalueButtons.add(btnPi);\n\t\t\n\t\tbtnLn = new JButton(\"ln\");\n\t\tbtnLn.setBounds(237, 120, 40, 40);\n\t\tthis.add(btnLn);\n\t\tresultOperations.add(btnLn);\n\t\t\n\t\t//Row 2\n\t\t\n\t\tbtn3 = new JButton(\"3\");\n\t\tbtn3.setBounds(42, 80, 40, 40);\n\t\tthis.add(btn3);\n\t\tnumberButtonList.add(btn3);\n\t\t\n\t\tbtn2 = new JButton(\"2\");\n\t\tbtn2.setBounds(81, 80, 40, 40);\n\t\tthis.add(btn2);\n\t\tnumberButtonList.add(btn2);\n\t\t\n\t\tbtn1 = new JButton(\"1\");\n\t\tbtn1.setBounds(120, 80, 40, 40);\n\t\tthis.add(btn1);\n\t\tnumberButtonList.add(btn1);\n\t\t\n\t\tbtnDivide = new JButton(\"/\");\n\t\tbtnDivide.setBounds(159, 80, 40, 40);\n\t\tthis.add(btnDivide);\n\t\toperationButtonList.add(btnDivide);\n\t\t\n\t\tbtnE = new JButton(\"e\");\n\t\tbtnE.setBounds(198, 80, 40, 40);\n\t\tthis.add(btnE);\n\t\tvalueButtons.add(btnE);\n\t\t//numberButtonList.add(btnE); //Special case\n\t\t\n\t\tbtnTan = new JButton(\"tan\");\n\t\tbtnTan.setBounds(237, 80, 40, 40);\n\t\tthis.add(btnTan);\n\t\tresultOperations.add(btnTan);\n\t\t\n\t\t//Row 3\n\t\t\n\t\tbtn6 = new JButton(\"6\");\n\t\tbtn6.setBounds(42, 40, 40, 40);\n\t\tthis.add(btn6);\n\t\tnumberButtonList.add(btn6);\n\t\t\n\t\tbtn5 = new JButton(\"5\");\n\t\tbtn5.setBounds(81, 40, 40, 40);\n\t\tthis.add(btn5);\n\t\tnumberButtonList.add(btn5);\n\t\t\n\t\tbtn4 = new JButton(\"4\");\n\t\tbtn4.setBounds(120, 40, 40, 40);\n\t\tthis.add(btn4);\n\t\tnumberButtonList.add(btn4);\n\t\t\n\t\tbtnMinus = new JButton(\"-\");\n\t\tbtnMinus.setBounds(159, 40, 40, 40);\n\t\tthis.add(btnMinus);\n\t\toperationButtonList.add(btnMinus);\n\t\t\n\t\tbtnSqRt = new JButton(\"√\");\n\t\tbtnSqRt.setBounds(198, 40, 40, 40);\n\t\tthis.add(btnSqRt);\n\t\tresultOperations.add(btnSqRt);\n\t\t\n\t\tbtnCos = new JButton(\"cos\");\n\t\tbtnCos.setBounds(237, 40, 40, 40);\n\t\tthis.add(btnCos);\n\t\tresultOperations.add(btnCos);\n\t\t\n\t\t//Row 4\n\t\t\n\t\tbtn9 = new JButton(\"9\");\n\t\tbtn9.setBounds(42, 0, 40, 40);\n\t\tthis.add(btn9);\n\t\tnumberButtonList.add(btn9);\n\t\t\n\t\tbtn8 = new JButton(\"8\");\n\t\tbtn8.setBounds(81, 0, 40, 40);\n\t\tthis.add(btn8);\n\t\tnumberButtonList.add(btn8);\n\t\t\n\t\tbtn7 = new JButton(\"7\");\n\t\tbtn7.setBounds(120, 0, 40, 40);\n\t\tthis.add(btn7);\n\t\tnumberButtonList.add(btn7);\n\t\t\n\t\tbtnPlus = new JButton(\"+\");\n\t\tbtnPlus.setBounds(159, 0, 40, 40);\n\t\tthis.add(btnPlus);\n\t\toperationButtonList.add(btnPlus);\n\t\t\n\t\tbtnPower = new JButton(\"^\");\n\t\tbtnPower.setBounds(198, 0, 40, 40);\n\t\tthis.add(btnPower);\n\t\toperationButtonList.add(btnPower);\n\t\t\n\t\tbtnSin = new JButton(\"sin\");\n\t\tbtnSin.setBounds(237, 0, 40, 40);\n\t\tthis.add(btnSin);\n\t\tresultOperations.add(btnSin);\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}", "private void configureButtons() {\n\n backToMenu = new JButton(\"Menu\");\n if(isWatching){\n backToMenu.setBounds(575, 270, 100, 50);\n }\n else{\n backToMenu.setBounds(30, 800, 100, 50);\n }\n backToMenu.setFont(new Font(\"Broadway\", Font.PLAIN, 20));\n backToMenu.setBackground(Color.RED);\n backToMenu.setFocusable(false);\n backToMenu.addActionListener(this);\n add(backToMenu);\n }", "private JButton getJButtonInto() {\r\n\t\tif (jButtonInto == null) {\r\n\t\t\tjButtonInto = new JButton();\r\n\t\t\tjButtonInto.setMargin(new Insets(2, 5, 2, 5));\r\n\t\t\tjButtonInto.setText(\"数据入库\");\r\n\t\t\tjButtonInto.setBounds(new Rectangle(512, 517, 70, 23));\r\n\t\t\tjButtonInto.addMouseListener(new MouseAdapter() {\r\n\t\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent e) {\r\n\t\t\t\t\tDataIntoGui.this.setVisible(false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonInto;\r\n\t}", "private void buttonPanel() {\n totalButton = new JButton(\"Calculate Total\");\r\n totalButton.setPreferredSize(new Dimension(150, 60));\r\n\r\n //add an action listener to the total.\r\n totalButton.addActionListener(new TotalButtonListener());\r\n\r\n //create a button to Submit Order.\r\n orderButton = new JButton(\"Submit Order\");\r\n orderButton.setPreferredSize(new Dimension(150, 60));\r\n orderButton.setEnabled(false);\r\n\r\n //add an action listener to the button.\r\n orderButton.addActionListener(new OrderButtonListener());\r\n\r\n //create a button to reset the checkboxes.\r\n resetButton = new JButton(\"Reset\");\r\n resetButton.setPreferredSize(new Dimension(150, 60));\r\n\r\n //add an action listener to the button.\r\n resetButton.addActionListener(new ResetButtonListener());\r\n\r\n //create a button to exit the application.\r\n exitButton = new JButton(\"Exit\");\r\n exitButton.setPreferredSize(new Dimension(150, 60));\r\n\r\n //add an action listener to the button.\r\n exitButton.addActionListener(new ExitButtonListener());\r\n\r\n //put the buttons in their own panel.\r\n buttonPanel = new JPanel();\r\n buttonPanel.setLayout(new GridLayout(1, 4));\r\n buttonPanel.add(totalButton);\r\n buttonPanel.add(orderButton);\r\n buttonPanel.add(resetButton);\r\n buttonPanel.add(exitButton);\r\n }", "public void createOrderBtn(){\n createOrderBtn = new Button(\"Create order\");\n createOrderBtn.setLayoutX(305);\n createOrderBtn.setLayoutY(710);\n createOrderBtn.setPrefWidth(480);\n createOrderBtn.setPrefHeight(50);\n createOrderBtn.setStyle(\"-fx-background-color: #34ffb9\");\n createOrderBtn.setFont(new Font(18));\n createOrderBtn.setOnAction(event -> createOrderInDB());\n\n root.getChildren().addAll(createOrderBtn);\n }", "@Override\n protected void createButtonsForButtonBar(Composite parent) {\n createButton(parent, IDialogConstants.CANCEL_ID, Messages.BaselineShowDialog_8, false);\n }", "private void setTableControlDataCompanyBalanceBankAccount() {\n ObservableList<Node> buttonControls = FXCollections.observableArrayList();\r\n JFXButton buttonControl;\r\n if (true) {\r\n buttonControl = new JFXButton();\r\n buttonControl.setText(\"Tambah\");\r\n buttonControl.setOnMouseClicked((e) -> {\r\n //listener add\r\n dataCompanyBalanceBankAccountCreateHandle();\r\n });\r\n buttonControls.add(buttonControl);\r\n }\r\n if (true) {\r\n buttonControl = new JFXButton();\r\n buttonControl.setText(\"Ubah\");\r\n buttonControl.setOnMouseClicked((e) -> {\r\n //listener update\r\n dataCompanyBalanceBankAccountUpdateHandle();\r\n });\r\n buttonControls.add(buttonControl);\r\n }\r\n if (true) {\r\n buttonControl = new JFXButton();\r\n buttonControl.setText(\"Hapus\");\r\n buttonControl.setOnMouseClicked((e) -> {\r\n //listener delete\r\n dataCompanyBalanceBankAccountDeleteHandle();\r\n });\r\n buttonControls.add(buttonControl);\r\n }\r\n if (true) {\r\n buttonControl = new JFXButton();\r\n buttonControl.setText(\"Tambah Dana\");\r\n buttonControl.setOnMouseClicked((e) -> {\r\n //listener add funds\r\n dataCompanyBalanceBankAccountAddFundHandle();\r\n });\r\n buttonControls.add(buttonControl);\r\n }\r\n tableDataCompanyBalanceBankAccount.addButtonControl(buttonControls);\r\n }", "ButtonPanel() {\n setLayout(new GridLayout(0,3));\n setPreferredSize(new Dimension(1000,100));\n setVisible(true);\n setMaximumSize(new Dimension(1000,250));\n reservationButton = new JButton(\"Reservation View\");\n bookingButton = new JButton(\"Booking View\");\n searchButton = new JButton(\"Search View\");\n add(reservationButton);\n add(bookingButton);\n add(searchButton);\n \n }", "private void configureButtons() {\n\n\t\t// Set button listeners\n\t\tfor(SLChannelControllerViews views : mChannelViews) {\n\t\t\tviews.getChannelButton().setOnTouchListener(new SLSeekBarOnTouchListener(views.getChannelSeekBar()));\n\t\t}\n\t}" ]
[ "0.7200193", "0.7118384", "0.7063847", "0.7019748", "0.699675", "0.6989553", "0.68983674", "0.6895093", "0.6847511", "0.68442804", "0.6812772", "0.6806347", "0.6803676", "0.676723", "0.67623204", "0.67517906", "0.6705942", "0.6689119", "0.6663125", "0.66571355", "0.66445535", "0.66149086", "0.66079366", "0.65779585", "0.65741694", "0.65647435", "0.6551814", "0.6535964", "0.6530799", "0.6517979", "0.6494853", "0.6494434", "0.64793205", "0.64643395", "0.6462644", "0.64594156", "0.64577335", "0.64525706", "0.64497787", "0.64488155", "0.6448799", "0.6446037", "0.6437201", "0.64223695", "0.6422205", "0.64198965", "0.6414259", "0.63894784", "0.6388105", "0.6387429", "0.638571", "0.6364638", "0.6357017", "0.6356691", "0.6354646", "0.6336425", "0.63357735", "0.63357556", "0.632898", "0.63225925", "0.6319129", "0.63146174", "0.62974894", "0.6297243", "0.6291611", "0.62888974", "0.6288454", "0.6281637", "0.62724864", "0.62696403", "0.6264115", "0.62525016", "0.6251942", "0.62510186", "0.624765", "0.624309", "0.6241472", "0.62282526", "0.62262493", "0.62201256", "0.62185127", "0.6213614", "0.6183918", "0.6183341", "0.6183341", "0.61792004", "0.6178602", "0.61766297", "0.617644", "0.61740416", "0.61740416", "0.61740416", "0.61740416", "0.6173422", "0.61630905", "0.6161698", "0.61593205", "0.6157906", "0.61487097", "0.61440706", "0.61440146" ]
0.0
-1
Makes the Bar Chart button
public void MakeBar() { BarButton = new JButton( new ImageIcon(getClass().getResource(GetBarChartImage()))); BarButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { GetHost().instructionText.setVisible(false); GetHost().ExportEnabled(); if(GetHost().GetTitle() == UNSET) { GetHost().LeftPanelContent(new BarChart( GetHost().GetGraphData(), "Bar chart", GetHost().GetColourScheme(),GetHost())); }else { GetHost().LeftPanelContent(new BarChart( GetHost().GetGraphData(), GetHost().GetTitle(), GetHost().GetColourScheme(),GetHost())); } } }); ChartTypeInterface.add(BarButton); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void MakeBar3D() {\n\t\tBarButton3D = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t\tGet3DBarChartImage())));\n\t\tBarButton3D.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\t\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart3D(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"3D Bar Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart3D(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\t\n\t\t\n\t\tChartTypeInterface.add(BarButton3D);\n\t}", "public void goToBarChart(ActionEvent event) throws SQLException {\n\t\tconn = MySqlConnection.ConnectDb();\n\n\t\tCategoryAxis xAxis = new CategoryAxis();\n\t\txAxis.setLabel(\"Category\");\n\t\tNumberAxis yAxis = new NumberAxis();\n\t\tyAxis.setLabel(\"Amount\");\n\n\t\tBarChart<String, Number> barChart = new BarChart<String, Number>(xAxis, yAxis);\n\n\t\tXYChart.Series<String, Number> xyChart = new XYChart.Series<String, Number>();\n\t\t\n\t\tString sql = \"select category, amount from Account order by amount asc\";\n\t\tps = conn.prepareStatement(sql);\n\t\trs = ps.executeQuery();\n\n\t for(Account acc: lists) {\n\t xyChart.getData().add(new XYChart.Data<String, Number>(acc.getCategory(), acc.getAmount()));\n\t }\n\n\t\tbarChart.getData().add(xyChart);\n\t\tbarChart.setLegendVisible(false);\n\n\t\tScene scene = new Scene(barChart, 500, 500);\n\t\tStage stage = new Stage();\n\t\tstage.setScene(scene);\n\t\tstage.show();\n\t}", "public void actionPerformed(ActionEvent ae)\n\t{\n\t\tif(ae.getSource()==ok)//ae.getActionCommand().equals(\" OK \")) // pie chart\n\t\t{\n\t\t\tif(!processTitles())\n\t\t\t\treturn;\n\t\t\tif(type==0)\n\t\t\t{\n\t\t\t\tvalues=ws.buildBarChart();\n\t\t\t\tif(values.length>15)\n\t\t\t\t{\n\t\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\t\tString checkRange1 = wordBundle.getString(\"checkRange1\");\n\t\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\t\tint select = map.showDialog(map,\"checkRange1\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tws.buildPieChart(titles,xvalues,map);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(type==1) // vertical bar chart\n\t\t\t{\n\t\t\t\tvalues=ws.buildBarChart();\n\t\t\t\tif(checkDataValidity(values))\n\t\t\t\t{\n\t\t\t\t\tif(values.length>10)\n\t\t\t\t\t{\n\t\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\t\tString checkRange = wordBundle.getString(\"checkRange\");\n\t\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\t\tint select = map.showDialog(map,\"checkRange\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tJFrame bcV =new barChartV(map,values,titles,xvalues);\n\t\t\t\t\t\tbcV.repaint();\n\t\t\t\t\t\tbcV.validate();\n\t\t\t\t\t\tbcV.show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"Chart can not be drawn\");\n\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\tString DataCheck = wordBundle.getString(\"DataCheck\");\n\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\tint select = map.showDialog(map,\"DataCheck\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(type==2)//horizontal bar chart\n\t\t\t{\n\t\t\t\tvalues=ws.buildBarChart();\n\t\t\t\t//arrValue av=new arrValue();\n\t\t\t\t//av.selValues=values;\n\t\t\t\tif(checkDataValidity(values))\n\t\t\t\t{\n\t\t\t\t\tif(values.length>10)\n\t\t\t\t\t{\n\t\t\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\t\t\tString checkRange = wordBundle.getString(\"checkRange\");\n\t\t\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\t\t\tint select = map.showDialog(map,\"checkRange\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tJFrame bcH =new barChartH(map,values,titles,xvalues);\n\t\t\t\t\t\tbcH.repaint();\n\t\t\t\t\t\tbcH.validate();\n\t\t\t\t\t\tbcH.show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\tString DataCheck = wordBundle.getString(\"DataCheck\");\n\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\tint select = map.showDialog(map,\"DataCheck\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tsetVisible(false);\n\t\t}\n\t\telse if(ae.getSource()==cancel)//getActionCommand().equals(\"CANCEL\"))\n\t\t\tsetVisible(false);\n\n\t}", "public SketchBarChart() {\n super(\"bar_sketch\");\n }", "public static void barChart(String title, int[] arr) \n {\n CategoryChartBuilder builder = new CategoryChartBuilder();\n builder.width(800);\n builder.height(600);\n builder.title(\"Int array values\");\n builder.xAxisTitle(\"Index\");\n builder.yAxisTitle(\"Number\");\n\n // Add data and title to the chart\n CategoryChart chart = builder.build();\n chart.addSeries(title, null, arr);\n\n // display the chart:\n new SwingWrapper(chart).displayChart();\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\t \n\t\t for(int g = 0;g<i;g++){\n\t\t String s = String.valueOf(datas[1][g]);\n\t\t data.addValue(this.datas[2][g], this.name[g], s);\n\t\t }\n\t\t \n\t\t if(e.getSource() == button1){\n\t\t JFreeChart chart = ChartFactory.createLineChart(\"Import Volume\",\n\t\t \"Year\",\n\t\t \"Ton\",\n\t\t data,\n\t\t PlotOrientation.VERTICAL,\n\t\t true,\n\t\t false,\n\t\t false);\n\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t add(cpanel, BorderLayout.CENTER);\n\t\t setVisible(true);\n\t\t } else if(e.getSource() == button2){\n\t\t\t JFreeChart chart = ChartFactory.createBarChart(\"Import Volume\",\n \"Year\",\n \"Ton\",\n data,\n PlotOrientation.VERTICAL,\n true,\n false,\n false);\n\t\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t\t add(cpanel, BorderLayout.CENTER);\n\t\t\t setVisible(true);\n} \n\n\t\t\n\t}", "private void initBarChart() {\n\t\tBarChart<String, Number> chartLinguagens = new BarChart<String, Number>(new CategoryAxis(), new NumberAxis());\n\t\t// define o espaçamento entre as barras.\n\t\tchartLinguagens.setCategoryGap(30);\n\t\t// inserindo o title do grafico\n\t\tchartLinguagens.setTitle(\"Ranking de Linguagens de Programação Mar/2013\");\n\t\t// seta nome e valor de cada linguagem apresentada no grafico\n\t\tXYChart.Data<String, Number> dataJava = new XYChart.Data<String, Number>(\"Java\", 18.156);\n\t\tXYChart.Data<String, Number> dataC = new XYChart.Data<String, Number>(\"C\", 17.141);\n\t\tXYChart.Data<String, Number> dataObjectiveC = new XYChart.Data<String, Number>(\"Objective-C\", 10.230);\n\t\tXYChart.Data<String, Number> dataCPlus = new XYChart.Data<String, Number>(\"C++\", 9.115);\n\t\tXYChart.Data<String, Number> dataCSharp = new XYChart.Data<String, Number>(\"C#\", 6.597);\n\t\tXYChart.Series<String, Number> seriesData = new XYChart.Series<String, Number>();\n\t\t// rodapé ???\n\t\tseriesData.setName(\"Porcentagem (%)\");\n\n\t\tseriesData.getData().addAll(dataJava, dataC, dataObjectiveC, dataCPlus, dataCSharp);\n\n\t\tchartLinguagens.getData().add(seriesData);\n\t\t/* Indicar o BarChart em um painel principal... */\n\t\tpane.getChildren().add(chartLinguagens);\n\t}", "public void showBarChart() {\r\n\r\n // Count classes\r\n int neutralCountPred = 0;\r\n int negativeCountPred = 0;\r\n int positiveCountPred = 0;\r\n\r\n int neutralCountAnsw = 0;\r\n int negativeCountAnsw = 0;\r\n int positiveCountAnsw = 0;\r\n\r\n for(Integer pred : predictions.values()) {\r\n switch (pred.intValue()) {\r\n case 0:\r\n negativeCountPred++;\r\n break;\r\n case 1:\r\n neutralCountPred++;\r\n break;\r\n case 2:\r\n positiveCountPred++;\r\n break;\r\n default:\r\n System.err.println(\"Illegal class index\");\r\n break;\r\n }\r\n }\r\n System.out.printf(\"PREDICTED \\nnegativeCountPred = %d, neutralCountPred = %d, positiveCountPred = %d\", negativeCountPred,\r\n neutralCountPred, positiveCountPred);\r\n\r\n for(Integer answer : rightAnswers.values()) {\r\n switch (answer.intValue()) {\r\n case 0:\r\n negativeCountAnsw++;\r\n break;\r\n case 1:\r\n neutralCountAnsw++;\r\n break;\r\n case 2:\r\n positiveCountAnsw++;\r\n break;\r\n default:\r\n System.err.println(\"Illegal class index\");\r\n break;\r\n }\r\n }\r\n System.out.printf(\"\\nRIGHT ANSWERS \\nnegativeCountAnsw = %d, neutralCountAnsw = %d, positiveCountAnsw = %d\", negativeCountAnsw,\r\n neutralCountAnsw, positiveCountAnsw);\r\n\r\n // Predicted classes\r\n XYChart.Series<String, Number> dataSeries1 = new XYChart.Series();\r\n dataSeries1.setName(\"Predicted\");\r\n dataSeries1.getData().add(new XYChart.Data(\"Neutral\", neutralCountPred));\r\n dataSeries1.getData().add(new XYChart.Data(\"Positive\", positiveCountPred));\r\n dataSeries1.getData().add(new XYChart.Data(\"Negative\", negativeCountPred));\r\n resultChart.getData().add(dataSeries1);\r\n\r\n // Predicted classes\r\n XYChart.Series<String, Number> dataSeries2 = new XYChart.Series();\r\n dataSeries2.setName(\"Right answers\");\r\n dataSeries2.getData().add(new XYChart.Data(\"Neutral\", neutralCountAnsw));\r\n dataSeries2.getData().add(new XYChart.Data(\"Positive\", positiveCountAnsw));\r\n dataSeries2.getData().add(new XYChart.Data(\"Negative\", negativeCountAnsw));\r\n resultChart.getData().add(dataSeries2);\r\n\r\n }", "public void MakeStacked() {\n\t\tStackedButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetStackedAreaChartImage())));\n\t\tStackedButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Stacked Area Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(StackedButton);\n\t}", "private void setupBarChart() {\n mBarChart.setOnChartValueSelectedListener(this);\n mBarChart.getDescription().setEnabled(false);\n mBarChart.setDrawBorders(true);\n mBarChart.setBorderWidth(1.f);\n mBarChart.setBorderColor(Color.parseColor(\"#616161\"));\n mBarChart.setPinchZoom(true);\n mBarChart.setDrawBarShadow(false);\n mBarChart.setDrawGridBackground(false);\n mBarChart.setTouchEnabled(true);\n mBarChart.setDoubleTapToZoomEnabled(false);\n\n Legend l = mBarChart.getLegend();\n l.setVerticalAlignment(Legend.LegendVerticalAlignment.TOP);\n l.setHorizontalAlignment(Legend.LegendHorizontalAlignment.RIGHT);\n l.setOrientation(Legend.LegendOrientation.VERTICAL);\n l.setDrawInside(true);\n l.setYOffset(0f);\n l.setXOffset(10f);\n l.setYEntrySpace(0f);\n l.setTextSize(8f);\n\n// List<String> list = new ArrayList<String>();\n// for(Report report: mReportList){\n// list.add(report.monthYear);\n// }\n// final String[] stringMonthYear = list.toArray(new String[0]);\n\n XAxis xAxis = mBarChart.getXAxis();\n xAxis.setGranularity(1f);\n xAxis.setPosition(XAxis.XAxisPosition.TOP);\n xAxis.setCenterAxisLabels(true);\n xAxis.setValueFormatter(new IAxisValueFormatter() {\n @Override\n public String getFormattedValue(float value, AxisBase axis) {\n int n = (int) value;\n switch (n) {\n case 0:\n if(mReportList.size()<1){\n break;\n }\n return mReportList.get(0).monthYear;\n case 1:\n if(mReportList.size()<2){\n break;\n }\n return mReportList.get(1).monthYear;\n case 2:\n if(mReportList.size()<3){\n break;\n }\n return mReportList.get(2).monthYear;\n case 3:\n if(mReportList.size()<4){\n break;\n }\n return mReportList.get(3).monthYear;\n }\n if (n < 0) {\n return \"Tháng\";\n } else{\n return \"Tháng\";\n }\n }\n });\n\n YAxis leftAxis = mBarChart.getAxisLeft();\n leftAxis.setValueFormatter(new LargeValueFormatter());\n leftAxis.setDrawGridLines(false);\n leftAxis.setSpaceTop(35f);\n leftAxis.setAxisMinimum(0f); // this replaces setStartAtZero(true)\n\n mBarChart.getAxisRight().setEnabled(false);\n\n float groupSpace = 0.04f;\n float barSpace = 0.03f; // x2 dataset\n float barWidth = 0.45f; // x2 dataset\n // (0.45 + 0.03) * 2 + 0.04 = 1.00 -> interval per \"group\"\n\n int startMonth = 0;\n\n ArrayList<BarEntry> yValsThu = new ArrayList<BarEntry>();\n ArrayList<BarEntry> yValsChi = new ArrayList<BarEntry>();\n\n int i = 0;\n for (Report report : mReportList) {\n yValsThu.add(new BarEntry(i, (float) report.incomeTotal));\n yValsChi.add(new BarEntry(i, (float) report.expenseTotal));\n i++;\n }\n\n BarDataSet setThu, setChi;\n\n if (mBarChart.getData() != null && mBarChart.getData().getDataSetCount() > 0) {\n\n setThu = (BarDataSet) mBarChart.getData().getDataSetByIndex(0);\n setChi = (BarDataSet) mBarChart.getData().getDataSetByIndex(1);\n setThu.setValues(yValsThu);\n setChi.setValues(yValsChi);\n mBarChart.getData().notifyDataChanged();\n mBarChart.notifyDataSetChanged();\n\n } else {\n // create 4 DataSets\n setThu = new BarDataSet(yValsThu, \"Thu\");\n setThu.setColor(Color.parseColor(\"#64dd17\"));\n setChi = new BarDataSet(yValsChi, \"Chi\");\n setChi.setColor(Color.parseColor(\"#2196f3\"));\n\n BarData data = new BarData(setThu, setChi);\n data.setValueFormatter(new LargeValueFormatter());\n\n mBarChart.setData(data);\n }\n\n // specify the width each bar should have\n mBarChart.getBarData().setBarWidth(barWidth);\n\n // restrict the x-axis range\n mBarChart.getXAxis().setAxisMinimum(startMonth);\n\n // barData.getGroupWith(...) is a helper that calculates the width each group needs based on the provided parameters\n mBarChart.getXAxis().setAxisMaximum(startMonth + mBarChart.getBarData().getGroupWidth(groupSpace, barSpace) * mReportList.size());\n mBarChart.groupBars(startMonth, groupSpace, barSpace);\n for (IBarDataSet set : mBarChart.getData().getDataSets()) {\n ((BarDataSet) set).setBarBorderWidth(1.f);\n ((BarDataSet) set).setBarBorderColor(Color.parseColor(\"#616161\"));\n }\n mBarChart.invalidate();\n mBarChart.animateY(800);\n\n //[END Setup Bar Char]\n }", "public static String exampleBarChart2() {\n final int MAX_MEDALS = 51;\n Data goldData= DataUtil.scaleWithinRange(0, MAX_MEDALS, Arrays.asList(MAX_MEDALS, 36, 23, 19, 16));\n Data silverData= DataUtil.scaleWithinRange(0, MAX_MEDALS, Arrays.asList(21, 38, 21, 13, 10));\n Data bronzeData= DataUtil.scaleWithinRange(0, MAX_MEDALS, Arrays.asList(28, 36, 28, 15, 15));\n BarChartPlot gold = Plots.newBarChartPlot(goldData, GOLD, \"Gold\");\n BarChartPlot silver = Plots.newBarChartPlot(silverData, SILVER, \"Silver\");\n BarChartPlot bronze = Plots.newBarChartPlot(bronzeData, Color.BROWN, \"Bronze\");\n BarChart chart = GCharts.newBarChart(gold, silver, bronze);\n\n // Defining axis info and styles\n AxisStyle axisStyle = AxisStyle.newAxisStyle(BLACK, 13, AxisTextAlignment.CENTER);\n AxisLabels country = AxisLabelsFactory.newAxisLabels(\"Country\", 50.0);\n country.setAxisStyle(axisStyle);\n AxisLabels countries = AxisLabelsFactory.newAxisLabels(\"Germany\", \"United Kingdom\", \"Russia\", \"USA\", \"China\");\n countries.setAxisStyle(axisStyle);\n AxisLabels medals = AxisLabelsFactory.newAxisLabels(\"Medals\", 50.0);\n medals.setAxisStyle(axisStyle);\n AxisLabels medalCount = AxisLabelsFactory.newNumericRangeAxisLabels(0, MAX_MEDALS);\n medalCount.setAxisStyle(axisStyle);\n\n\n // Adding axis info to chart.\n chart.addXAxisLabels(medalCount);\n chart.addXAxisLabels(medals);\n chart.addYAxisLabels(countries);\n chart.addYAxisLabels(country);\n chart.addTopAxisLabels(medalCount);\n chart.setHorizontal(true);\n chart.setSize(450, 650);\n chart.setSpaceBetweenGroupsOfBars(30);\n\n chart.setTitle(\"2008 Beijing Olympics Medal Count\", BLACK, 16);\n ///51 is the max number of medals.\n chart.setGrid((50.0/MAX_MEDALS)*20, 600, 3, 2);\n chart.setBackgroundFill(Fills.newSolidFill(LIGHTGREY));\n LinearGradientFill fill = Fills.newLinearGradientFill(0, Color.newColor(\"E37600\"), 100);\n fill.addColorAndOffset(Color.newColor(\"DC4800\"), 0);\n chart.setAreaFill(fill);\n String url = chart.toURLString();\n return url;\n }", "public LecturerBarChart() {\n initComponents();\n }", "public void generateBarChart(float[] act, float[] act1)\n {\n\n HorizontalBarChart barChart= (HorizontalBarChart) findViewById(R.id.chart);\n /*\n ArrayList<BarEntry> entries = new ArrayList<>();\n entries.add(new BarEntry(4f, 0));\n entries.add(new BarEntry(8f, 1));\n entries.add(new BarEntry(6f, 2));\n entries.add(new BarEntry(12f, 3));\n entries.add(new BarEntry(18f, 4));\n entries.add(new BarEntry(10f, 6));\n entries.add(new BarEntry(14f, 7));\n entries.add(new BarEntry(2f, 5));\n\n BarDataSet dataset1 = new BarDataSet(entries, \"# of Calls\");\n */\n\n ArrayList<String> labels = new ArrayList<String>();\n labels.add(\"Food\");\n labels.add(\"Cloth\");\n labels.add(\"Travelling\");\n labels.add(\"Stationary\");\n labels.add(\"Furniture\");\n labels.add(\"Medicine\");\n labels.add(\"Bill\");\n labels.add(\"Utensils\");\n\n\n /* for create Grouped Bar chart*/\n ArrayList<BarEntry> group1 = new ArrayList<>();\n group1.add(new BarEntry(act1[0], 0));\n group1.add(new BarEntry(act1[1], 1));\n group1.add(new BarEntry(act1[2], 2));\n group1.add(new BarEntry(act1[3], 3));\n group1.add(new BarEntry(act1[4], 4));\n group1.add(new BarEntry(act1[5], 5));\n group1.add(new BarEntry(act1[6], 6));\n group1.add(new BarEntry(act1[7], 7));\n\n ArrayList<BarEntry> group2 = new ArrayList<>();\n group2.add(new BarEntry(act[0], 0));\n group2.add(new BarEntry(act[1], 1));\n group2.add(new BarEntry(act[2], 2));\n group2.add(new BarEntry(act[3], 3));\n group2.add(new BarEntry(act[4], 4));\n group2.add(new BarEntry(act[5], 5));\n group2.add(new BarEntry(act[6], 6));\n group2.add(new BarEntry(act[7], 7));\n\n BarDataSet barDataSet1 = new BarDataSet(group1, \"Planned Amount\");\n //barDataSet1.setColor(Color.rgb(0, 155, 0));\n barDataSet1.setColor(getResources().getColor(R.color.darkgreen));\n\n BarDataSet barDataSet2 = new BarDataSet(group2, \"Actual Amount\");\n barDataSet2.setColor(getResources().getColor(R.color.purered));\n\n\n ArrayList<IBarDataSet> dataset = new ArrayList<>();\n dataset.add(barDataSet1);\n dataset.add(barDataSet2);\n /**/\n\n BarData data = new BarData(labels,dataset);\n// // dataset.setColors(ColorTemplate.COLORFUL_COLORS); //\n barChart.setData(data);\n barChart.animateY(5000);\n barChart.setDescription(\"Expense Graph\");\n barChart.setDescriptionPosition(2f, 2f);\n\n }", "public void MakeBubble() {\n\t\tBubbleButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetBubbleChartImage())));\n\t\tBubbleButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetColumns().length >= 3){\n\t\t\t\t\t\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\tGetHost().LeftPanelContent(new BubbleChart(\n\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\"Bubble Chart\", \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost()));\n\t\t\t\t\t}else {\n\t\t\t\t\t\tGetHost().LeftPanelContent(new BubbleChart(\n\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost()));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"You must have three columns selected to use this chart\", \n\t\t\t\t\t\"Bubble Chart Format\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BubbleButton);\n\t}", "public BookItemMenu setBarButton ( int index , Item button ) {\n\t\tthis.buttonsRangeCheck ( index , index );\n\t\tthis.bar_buttons[ index ] = button;\n\t\treturn this;\n\t}", "public Parent createBarGraph(ObservableList<HappinessReport> data) {\n xAxis = new CategoryAxis();\n xAxis.setLabel(\"Country\");\n //Yaxis Creation\n yAxis = new NumberAxis();\n yAxis.setLabel(\"Score\");\n //Chart Creation\n barchart = new BarChart<>(xAxis, yAxis);\n barchart.setTitle(\"Horizontal Bar Chart Example\");\n //Country and Score Data load into chart\n for (int intx = 0; intx < data.size(); intx++) {\n XYChart.Series barChartSeries = new XYChart.Series<>();\n barChartSeries.getData().add(new XYChart.Data(String.valueOf(data.get(intx).getCountry()), data.get(intx).getScore()));\n barchart.getData().add(barChartSeries);\n }\n barchart.setTitle(\"Horizontal Bar Chart Example\");\n barchart.setLegendVisible(false);\n return barchart;\n }", "private BarData generateDataBar() {\n\n ArrayList<BarEntry> entries = new ArrayList<>();\n\n for (int i = 0; i < 12; i++) {\n entries.add(new BarEntry(i, (int) (Math.random() * 70) + 30));\n }\n\n BarDataSet d = new BarDataSet(entries, \"New DataSet 1\");\n // 设置相邻的柱状图之间的距离\n d.setColors(ColorTemplate.VORDIPLOM_COLORS);\n // 设置高亮的透明度\n d.setHighLightAlpha(255);\n\n BarData cd = new BarData(d);\n cd.setBarWidth(0.9f);\n return cd;\n }", "public static String exampleBarChart() {\n BarChartPlot team1 = Plots.newBarChartPlot(Data.newData(25, 43, 12, 30), Color.BLUEVIOLET, \"Team A\");\n BarChartPlot team2 = Plots.newBarChartPlot(Data.newData(8, 35, 11, 5), Color.ORANGERED, \"Team B\");\n BarChartPlot team3 = Plots.newBarChartPlot(Data.newData(10, 20, 30, 30), Color.LIMEGREEN, \"Team C\");\n\n // Instantiating chart.\n BarChart chart = GCharts.newBarChart(team1, team2, team3);\n\n // Defining axis info and styles\n AxisStyle axisStyle = AxisStyle.newAxisStyle(Color.BLACK, 13, AxisTextAlignment.CENTER);\n AxisLabels score = AxisLabelsFactory.newAxisLabels(\"Score\", 50.0);\n score.setAxisStyle(axisStyle);\n AxisLabels year = AxisLabelsFactory.newAxisLabels(\"Year\", 50.0);\n year.setAxisStyle(axisStyle);\n\n // Adding axis info to chart.\n chart.addXAxisLabels(AxisLabelsFactory.newAxisLabels(\"2002\", \"2003\", \"2004\", \"2005\"));\n chart.addYAxisLabels(AxisLabelsFactory.newNumericRangeAxisLabels(0, 100));\n chart.addYAxisLabels(score);\n chart.addXAxisLabels(year);\n\n chart.setSize(600, 450);\n chart.setBarWidth(100);\n chart.setSpaceWithinGroupsOfBars(20);\n chart.setDataStacked(true);\n chart.setTitle(\"Team Scores\", Color.BLACK, 16);\n chart.setGrid(100, 10, 3, 2);\n chart.setBackgroundFill(Fills.newSolidFill(Color.ALICEBLUE));\n LinearGradientFill fill = Fills.newLinearGradientFill(0, Color.LAVENDER, 100);\n fill.addColorAndOffset(Color.WHITE, 0);\n chart.setAreaFill(fill);\n String url = chart.toURLString();\n return url;\n }", "public BarChartPanel(String chartTitle, String xAxis, String yAxis, CategoryDataset dataset) {\n\t\t// Plotting a new chart object with, graph title, x-axis title, y-axis title, and dataset which is provided\n\t\tchart = ChartFactory.createBarChart(chartTitle, xAxis, yAxis, dataset, PlotOrientation.VERTICAL, true, true, false);\n\t\t\t\t\n\t\t// Styling the chart\t\n\t\tStandardChartTheme theme = (StandardChartTheme) org.jfree.chart.StandardChartTheme.createJFreeTheme();\n\t\ttheme.setTitlePaint(UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\ttheme.setExtraLargeFont(UI.APPLICATION_THEME_FONT_18_PLAIN); // title\n\t\ttheme.setLargeFont(UI.APPLICATION_THEME_FONT_17_PLAIN); // axis-title\n\t\ttheme.setRegularFont(UI.APPLICATION_THEME_FONT_15_PLAIN);\n\t\ttheme.setRangeGridlinePaint(UI.APPLICATION_THEME_TERTIARY_COLOR);\n\t\ttheme.setPlotOutlinePaint((Paint)UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\ttheme.setPlotBackgroundPaint(UI.APPLICATION_THEME_TERTIARY_COLOR);\n\t\ttheme.setChartBackgroundPaint(UI.APPLICATION_THEME_TERTIARY_COLOR);\n\t\ttheme.setDomainGridlinePaint(UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\ttheme.setAxisOffset(new RectangleInsets(0, 0, 0, 0));\n\t\ttheme.setBarPainter(new StandardBarPainter());\n\t\ttheme.setAxisLabelPaint(UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\ttheme.apply(chart);\n\t\tchart.getCategoryPlot().setOutlineVisible(false);\n\t\tchart.getCategoryPlot().getRangeAxis().setAxisLineVisible(false);\n\t\tchart.getCategoryPlot().getRangeAxis().setTickMarksVisible(false);\n\t\tchart.getCategoryPlot().setRangeGridlineStroke(new BasicStroke());\n\t\tchart.getCategoryPlot().getRangeAxis().setTickLabelPaint(UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\tchart.getCategoryPlot().getDomainAxis().setTickLabelPaint(UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\tValueAxis yAxisRange = chart.getCategoryPlot().getRangeAxis();\n\t\tyAxisRange.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n\t\tchart.setTextAntiAlias(true);\n\t\tchart.setAntiAlias(true);\n\t\tchart.getCategoryPlot().getRenderer().setSeriesPaint(0, UI.APPLICATION_THEME_PRIMARY_COLOR);\n\t\tBarRenderer rend = (BarRenderer) chart.getCategoryPlot().getRenderer();\n\t\trend.setShadowVisible(true);\n\t\trend.setShadowXOffset(2);\n\t\trend.setShadowYOffset(0);\n\t\trend.setShadowPaint(UI.APPLICATION_THEME_QUATERNARY_COLOR);\n\t\trend.setMaximumBarWidth(0.1);\n\t\tchart.removeLegend();\n\t}", "public static void graph(){\n\t\t double[][] valuepairs = new double[2][];\n\t\t valuepairs[0] = mutTotal; //x values\n\t\t valuepairs[1] = frequency; //y values\n\t\t DefaultXYDataset set = new DefaultXYDataset();\n\t\t set.addSeries(\"Occurances\",valuepairs); \n\t\t XYBarDataset barset = new XYBarDataset(set, .8);\n\t\t JFreeChart chart = ChartFactory.createXYBarChart(\n\t\t \"Mutation Analysis\",\"Number of Mutations\",false,\"Frequency\",\n\t\t barset,PlotOrientation.VERTICAL,true, true, false);\n\t\t JFrame frame = new JFrame(\"Mutation Analysis\");\n\t\t frame.setContentPane(new ChartPanel(chart));\n\t\t frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t frame.pack();\n\t\t frame.setVisible(true);\n\t\t }", "private BarData generateDataBar() {\n String year = year_txt.getText().toString();\n String month1 =Utilities.getMonth(months,month_txt.getText().toString());\n ArrayList<BarEntry> entries = new ArrayList<>();\n ArrayList<TransactionBeans> transactionBeans = transactionDB.getTransactionRecordsMonth(month1,year);\n for (int i = 0; i < transactionBeans.size(); i++) {\n TransactionBeans beans = transactionBeans.get(i);\n entries.add(new BarEntry(i, (int) (Double.parseDouble(beans.getIncome()))));\n }\n\n BarDataSet d = new BarDataSet(entries, \"\");\n d.setColors(ColorTemplate.VORDIPLOM_COLORS);\n d.setHighLightAlpha(255);\n\n BarData cd = new BarData(d);\n cd.setBarWidth(0.9f);\n cd.setDrawValues(false);\n return cd;\n }", "private void createGenerateButton(final ToolBar bar) {\r\n // image's source:\r\n // http://pixabay.com/de/w%C3%BCrfel-sechs-gesichter-rollen-35637/\r\n createButton(bar, \"images/dice-35637_640.png\", \"Generate\",\r\n new GenerateButtonListener(this));\r\n }", "public BarChart() {\n\n\t\t//set the initial size of the store for curve data\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tcvV.add(new CurveData());\n\t\t}\n\n\t\tbarChartPanel.add(GP, BorderLayout.CENTER);\n\n\t\tBorder etchedBorder = BorderFactory.createEtchedBorder();\n\t\tborder = BorderFactory.createTitledBorder(etchedBorder, \"Title\");\n\t\tborder.setTitleColor(Color.blue);\n\t\tbarChartPanel.setBorder(border);\n\n\t\tMarkerFormat = new MarkerFormat(barColumns);\n\n\t\tGP.setSmartGL(false);\n\t\tGP.setNumberFormatX(MarkerFormat);\n\n\t\tGP.addHorLimitsListener(\n\t\t\t\t\t\t\t\tnew ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tint nClmns = barColumns.size();\n\t\t\t\tint nMaxLines = 0;\n\t\t\t\tjava.util.Iterator<BarColumn> itr = barColumns.iterator();\n\t\t\t\twhile (itr.hasNext()) {\n\t\t\t\t\tBarColumn bc = itr.next();\n\t\t\t\t\tif (nMaxLines < bc.size()) {\n\t\t\t\t\t\tnMaxLines = bc.size();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (nClmns > 0 && nMaxLines > 0) {\n\t\t\t\t\t//int iMin = GP.getScreenX(GP.getCurrentMinX());\n\t\t\t\t\t//int iMax = GP.getScreenX(GP.getCurrentMaxX());\n\t\t\t\t\tint iMin = GP.getScreenX(GP.getInnerMinX());\n\t\t\t\t\tint iMax = GP.getScreenX(GP.getInnerMaxX());\n\n\t\t\t\t\twidth = (int) ((iMax - iMin) / (1.9 * nMaxLines * nClmns));\n\t\t\t\t\tif (width < 1) {\n\t\t\t\t\t\twidth = 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (int i = 1, n = Math.min(nClmns * nMaxLines + 1, cvV.size()); i < n; i++) {\n\t\t\t\t\t\tCurveData cd = cvV.get(i);\n\t\t\t\t\t\tcd.setLineWidth(width);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tRunnable runRefresh =\n\t\t\t\tnew Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tGP.refreshGraphJPanel();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tThread mThread = new Thread(runRefresh);\n\t\t\t\tmThread.start();\n\t\t\t}\n\t\t});\n\n\t\t//operations with clicked point object\n\t\tJLabel infoLabel = new JLabel(\" Clicked Point Info: \", JLabel.CENTER);\n\n\t\tFunctionGraphsJPanel.ClickedPoint cpObj = GP.getClickedPointObject();\n\t\tcpObj.xValueLabel = new JLabel(\"X-Marker=\", JLabel.RIGHT);\n\t\tcpObj.xValueFormat = MarkerFormat;\n\t\tcpObj.xValueText = new JTextField(10);\n\t\tcpObj.xValueText.setHorizontalAlignment(JTextField.CENTER);\n\t\tcpObj.xValueText.setForeground(Color.blue);\n\n\t\tcpObj.yValueLabel = new JLabel(\" Value=\", JLabel.RIGHT);\n\t\tcpObj.yValueFormat = fortranFrmt;\n\t\tcpObj.yValueText = new JTextField(12);\n\t\tcpObj.yValueText.setHorizontalAlignment(JTextField.CENTER);\n\t\tcpObj.yValueText.setForeground(Color.blue);\n\n\t\tJPanel infoPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 4, 0));\n\t\tinfoPanel.add(infoLabel);\n\t\tinfoPanel.add(cpObj.xValueLabel);\n\t\tinfoPanel.add(cpObj.xValueText);\n\t\tinfoPanel.add(cpObj.yValueLabel);\n\t\tinfoPanel.add(cpObj.yValueText);\n\n\t\tbarChartPanel.add(infoPanel, BorderLayout.SOUTH);\n\t}", "private void nastavGraf() {\n barChart = (BarChart) findViewById(R.id.bargraph);\n\n ArrayList<BarEntry> barEntries = new ArrayList<>();\n ArrayList<String> theDates = new ArrayList<>();\n\n // ziskame zaznamy z tabuľky Steps a naplnime graf\n List<HashMap<String, String>> zoznam = mDatabaseHelper.getSteps();\n HashMap<String, String> mapa = new HashMap<>();\n for (int i = 0; i < zoznam.size(); i++) {\n if (i == 3) break;\n mapa = zoznam.get(i);\n theDates.add(mapa.get(\"datum\"));\n barEntries.add(new BarEntry(Float.parseFloat(mapa.get(\"kroky\")), i));\n }\n\n BarDataSet barDataSet = new BarDataSet(barEntries, \"Steps\");\n int redColorValue = Color.parseColor(\"#ff1744\");\n barDataSet.setColor(redColorValue);\n BarData theData = new BarData(theDates, barDataSet);\n\n barChart.setData(theData);\n barChart.getLegend().setEnabled(false);\n barChart.setDescription(null);\n }", "private JFreeChart getBarChart()\n {\n loadData();\n \n // Create the vertical bar chart\n final JFreeChart chart = ChartFactory.createBarChart(getTitle(), \"\", \"\", getCategoryDataset(),\n PlotOrientation.HORIZONTAL, false, true, false);\n final CategoryPlot categoryplot = (CategoryPlot) chart.getPlot();\n categoryplot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT);\n categoryplot.setRangePannable(true);\n categoryplot.setNoDataMessage(\"No data available\");\n \n final BarRenderer barrenderer = (BarRenderer) categoryplot.getRenderer();\n barrenderer.setItemLabelAnchorOffset(9D);\n barrenderer.setBaseItemLabelsVisible(true);\n barrenderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator());\n // barrenderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator(\"{1} = {2}\", new DecimalFormat(\"0\")));\n final CategoryAxis categoryaxis = categoryplot.getDomainAxis();\n categoryaxis.setCategoryMargin(0.25D);\n \n categoryaxis.setUpperMargin(0.02D);\n categoryaxis.setLowerMargin(0.02D);\n final NumberAxis numberaxis = (NumberAxis) categoryplot.getRangeAxis();\n numberaxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n numberaxis.setUpperMargin(0.10000000000000001D);\n ChartUtilities.applyCurrentTheme(chart);\n \n// if (useLegend())\n// {\n// // pieplot.setLegendLabelGenerator(new StandardPieSectionLabelGenerator(\"{0} ({1})\"));\n// chart.getLegend().setPosition(RectangleEdge.RIGHT);\n// // pieplot.setLegendLabelToolTipGenerator(new StandardPieSectionLabelGenerator(\"{0}: {2}%\"));\n// }\n \n return chart;\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n btn_stat.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent event) {\r\n ReclamationService rs=new ReclamationService();\r\n int a=0;int b=0;int c=0;\r\n try {\r\n a=rs.getNombre(\"traitee\");\r\n b= rs.getNombre(\" en cours \");\r\n // c= rs.getNombre(\"En maintenance\");\r\n } catch (SQLException ex) {\r\n Logger.getLogger(StatisquereclamationController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n DefaultCategoryDataset dataset=new DefaultCategoryDataset();\r\n dataset.setValue(a, \"statut\", \"traitee\");\r\n dataset.setValue(b, \"statut\", \" en cours\");\r\n // dataset.setValue(c, \"equipements\", \"en maintenance\");\r\n JFreeChart chart=ChartFactory.createBarChart3D(\"statut de reclamation \", \"etat\", \"nombres\", dataset);\r\n chart.setBackgroundPaint(Color.YELLOW);\r\n chart.getTitle().setPaint(Color.red);\r\n CategoryPlot p=chart.getCategoryPlot();\r\n p.setRangeGridlinePaint(Color.BLUE);\r\n ChartFrame frame=new ChartFrame(\"bar de reclamation\",chart);\r\n frame.setVisible(true);\r\n frame.setSize(450, 350);\r\n System.out.println(a);\r\n System.out.println(b);\r\n\r\n }\r\n });\r\n btn_stat1.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent event) {\r\n ReclamationService rs=new ReclamationService();\r\n int a=0;int b=0;int c =0;\r\n try {\r\n \r\n a=rs.Afficher_listcat(Integer.parseInt(tx_id_patissier.getText()));\r\n b=rs.NombreRec();\r\n c=a/b;\r\n // c= rs.getNombre(\"En maintenance\");tx_id_patissier.getText()\r\n } catch (SQLException ex) {\r\n Logger.getLogger(StatisquereclamationController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n DefaultCategoryDataset dataset=new DefaultCategoryDataset();\r\n dataset.setValue(a, \"taux de reclamation\", \"Patissier n°\"+tx_id_patissier.getText());\r\n \r\n // dataset.setValue(c, \"equipements\", \"en maintenance\");\r\n JFreeChart chart=ChartFactory.createBarChart3D(\"Statistique de patissier\", \"patissier\", \"nombres\", dataset);\r\n chart.setBackgroundPaint(Color.YELLOW);\r\n chart.getTitle().setPaint(Color.red);\r\n CategoryPlot p=chart.getCategoryPlot();\r\n p.setRangeGridlinePaint(Color.BLUE);\r\n ChartFrame frame=new ChartFrame(\"bar de reclamation\",chart);\r\n frame.setVisible(true);\r\n frame.setSize(450, 350);\r\n System.out.println(a);\r\n \r\n }\r\n });\r\n\r\n }", "protected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \" 设 置 \",\n\t\t\t\ttrue);//IDialogConstants.CANCEL_LABEL\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\" 取 消 \", false);//IDialogConstants.CANCEL_LABEL\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n panelChart = new javax.swing.JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jButton1.setText(\"Balansas\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n panelChart.setBackground(new java.awt.Color(255, 255, 255));\n panelChart.setLayout(new java.awt.BorderLayout());\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelChart, javax.swing.GroupLayout.DEFAULT_SIZE, 686, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGap(306, 306, 306)\n .addComponent(jButton1)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(panelChart, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addContainerGap())\n );\n\n pack();\n }", "private void setupBarChart(final GregorianCalendar period, boolean isMonth) {\n if (isMonth) {\n setupBarChartMonth(period);\n } else setupBarChartWeek(period);\n\n //disabling chart description\n Description description = new Description();\n description.setEnabled(false);\n barChart.setDescription(description);\n barChart.getBarData().setDrawValues(false);\n\n //creates a bit of empty space on the sides of the chart\n barChart.setFitBars(true);\n\n //disabling background grid\n barChart.getXAxis().setDrawGridLines(false);\n barChart.getAxisLeft().setDrawGridLines(false);\n// barChart.getAxisRight().setDrawGridLines(false);\n\n //working with legend. It is set of colors below a chart\n Legend legend = barChart.getLegend();\n legend.setEnabled(false);\n\n XAxis xaxis = barChart.getXAxis();\n if (isMonth) {\n xaxis.setLabelCount(15);\n } else {\n xaxis.setLabelCount(6);\n }\n xaxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n\n YAxis yLAxis = barChart.getAxisLeft();\n yLAxis.setAxisMaximum(1.4f);\n yLAxis.setAxisMinimum(0.0f);\n yLAxis.setLabelCount(4);\n yLAxis.setDrawZeroLine(true);\n yLAxis.setGranularityEnabled(true);\n yLAxis.setGranularity(0.25f);\n\n YAxis yRAxis = barChart.getAxisRight();\n yRAxis.setAxisMaximum(1.4f);\n yRAxis.setAxisMinimum(0.0f);\n yRAxis.setLabelCount(4);\n yRAxis.setDrawZeroLine(true);\n yRAxis.setGranularityEnabled(true);\n yRAxis.setGranularity(0.25f);\n\n yLAxis.setValueFormatter(new IAxisValueFormatter() {\n @Override\n public String getFormattedValue(float value, AxisBase axis) {\n return Float.toString(value / 1.2f);\n }\n });\n yRAxis.setValueFormatter(new IAxisValueFormatter() {\n @Override\n public String getFormattedValue(float value, AxisBase axis) {\n return Float.toString(value / 1.2f);\n }\n });\n\n barChart.setScaleEnabled(false);\n barChart.setTouchEnabled(false);\n\n //updating chart\n barChart.invalidate();\n }", "private void setData() {\n BarDataSet set = new BarDataSet(getEntries(), \"Monthly Report\");\n set.setColors(new int[]{R.color.md_blue_700, R.color.md_deep_purple_300}, this);\n mData = new BarData(set);\n mChart.setData(mData);\n mData.setValueFormatter(new LargeValueFormatter());\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_analysis,container,false);\n\n cases_bar = view.findViewById(R.id.cases_bar);\n //Appearance of Bar chart\n cases_bar.getDescription().setEnabled(false);\n cases_bar.setDrawValueAboveBar(false);\n cases_bar.animateY(5000);\n cases_bar.animateX(5000);\n\n XAxis xAxis = cases_bar.getXAxis();\n xAxis.setValueFormatter(new ValueFormatter() {\n @Override\n public String getFormattedValue(float value) {\n return YEARS[(int) value];\n }\n });\n\n YAxis axisLeft = cases_bar.getAxisLeft();\n axisLeft.setGranularity(100f);\n axisLeft.setAxisMinimum(0);\n\n YAxis axisRight = cases_bar.getAxisRight();\n axisLeft.setGranularity(100f);\n axisLeft.setAxisMinimum(0);\n\n\n ArrayList <BarEntry> cases = new ArrayList<>();\n cases.add(new BarEntry(0,2144));\n cases.add(new BarEntry(1,2230));\n cases.add(new BarEntry(2,1480));\n cases.add(new BarEntry(3,1131));\n cases.add(new BarEntry(4,1089));\n\n\n\n BarDataSet bardataset = new BarDataSet(cases, \"Cases\");\n\n ArrayList<IBarDataSet> labels = new ArrayList<>();\n labels.add(bardataset);\n\n BarData data = new BarData( labels);\n cases_bar.setData(data); // set the data and list of labels\n data.setValueTextSize(12f);\n bardataset.setColors(ColorTemplate.COLORFUL_COLORS);\n\n return view;\n }", "public void addButtonToCoolBar(JButton button) {\n\t\t_coolBar.addButton(button);\n\t}", "public void BarChartForViolationFines() {\n\t\t\n\t\t// Dataset Generation\t\t\n\n\t\tDefaultCategoryDataset dataset = new DefaultCategoryDataset();\t\t\t\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tString key = sortedKeysByVioDesc.get(i);\n\t\t\tdataset.addValue(ticketByVioFine.get(key), \"Violation Fine\", key);\n\t\t}\t\t\t\n\t\tCategoryDataset plotDataset = dataset;\n\n\t\t// JFreeChart Call for BarChart and passing formats\n\t\tJFreeChart barChart2 = ChartFactory.createBarChart(\n\t\t\t\t\"Parking Tickets by Violation Fee\", \n\t\t\t\t\"Ticket Description\", \n\t\t\t\t\"Ticket Fee ($)\", \n\t\t\t\tplotDataset, \n\t\t\t\tPlotOrientation.VERTICAL, \n\t\t\t\tfalse, //legend\n\t\t\t\ttrue, //tool tip\n\t\t\t\tfalse // use to generate URL\n\t\t\t\t);\t\n\n\t\t// Turing label by 45 degree to show full label\n\t\tCategoryPlot cplot2 = barChart2.getCategoryPlot();\n\t\tCategoryAxis xAxis = (CategoryAxis)cplot2.getDomainAxis();\n\t\txAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_45);\n\t\t\n\t\t//Chart panel generation\n ChartPanel chartPanel2 = new ChartPanel(barChart2);\n chartPanel2.setBorder(BorderFactory.createEmptyBorder(15, 15, 15, 15));\n chartPanel2.setBackground(Color.white);\n add(chartPanel2);\n pack();\n setLocationRelativeTo(null);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setVisible(true);\n try {\n \tfinal ChartRenderingInfo chartInfo2 = new ChartRenderingInfo(new StandardEntityCollection());\n \tfinal File file4 = new File(\"BarChartForViolationFee.png\");\n ChartUtilities.saveChartAsPNG(file4, barChart2, 800, 800, chartInfo2);\n }\n catch (Exception e) {\n }\n\t}", "@FXML\n public void addBar() {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingBar(0, 0));\n }", "public static JFreeChart createBarChart (String xAxisTitle,\n String yAxisTitle,\n CategoryDataset ds)\n {\n JFreeChart chart = ChartFactory.createBarChart (null,\n xAxisTitle,\n yAxisTitle,\n ds,\n PlotOrientation.VERTICAL,\n true,\n true,\n true);\n\n chart.setBackgroundPaint(Color.white);\n\n // get a reference to the plot for further customisation...\n final CategoryPlot plot = chart.getCategoryPlot();\n plot.setBackgroundPaint (UIUtils.getComponentColor ());\n plot.setDomainGridlinePaint (UIUtils.getBorderColor ());\n plot.setRangeGridlinePaint (UIUtils.getBorderColor ());\n /*\n plot.setAxisOffset (new RectangleInsets (5D,\n 5D,\n 5D,\n 5D));\n*/\n plot.setDomainCrosshairVisible (true);\n plot.setRangeCrosshairVisible (true);\n plot.setDomainGridlinePaint (UIUtils.getColor (\"#cfcfcf\"));\n plot.setRangeGridlinePaint (UIUtils.getColor (\"#cfcfcf\"));\n\n // set the range axis to display integers only...\n final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();\n rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n rangeAxis.setNumberFormatOverride (Environment.getNumberFormatter ());\n\n // disable bar outlines...\n final BarRenderer renderer = (BarRenderer) plot.getRenderer();\n renderer.setDrawBarOutline(false);\n renderer.setItemMargin (0);\n /*\n // set up gradient paints for series...\n final GradientPaint gp0 = new GradientPaint(\n 0.0f, 0.0f, Color.blue,\n 0.0f, 0.0f, Color.lightGray\n );\n final GradientPaint gp1 = new GradientPaint(\n 0.0f, 0.0f, Color.green,\n 0.0f, 0.0f, Color.lightGray\n );\n final GradientPaint gp2 = new GradientPaint(\n 0.0f, 0.0f, Color.red,\n 0.0f, 0.0f, Color.lightGray\n );\n renderer.setSeriesPaint(0, gp0);\n renderer.setSeriesPaint(1, gp1);\n renderer.setSeriesPaint(2, gp2);\n*/\n final CategoryAxis domainAxis = plot.getDomainAxis();\n domainAxis.setCategoryLabelPositions(\n CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / -0.6)\n );\n\n return chart;\n\n }", "public static void main(String[] args) {\r\n\r\n // create a chart\r\n double[][] data = new double[][] {\r\n {56.0, -12.0, 34.0, 76.0, 56.0, 100.0, 67.0, 45.0},\r\n {37.0, 45.0, 67.0, 25.0, 34.0, 34.0, 100.0, 53.0},\r\n {43.0, 54.0, 34.0, 34.0, 87.0, 64.0, 73.0, 12.0}};\r\n CategoryDataset dataset = DatasetUtilities.createCategoryDataset(\r\n \"Series \", \"Type \", data);\r\n\r\n JFreeChart chart = null;\r\n boolean drilldown = true;\r\n\r\n if (drilldown) {\r\n CategoryAxis categoryAxis = new CategoryAxis(\"Category\");\r\n ValueAxis valueAxis = new NumberAxis(\"Value\");\r\n BarRenderer renderer = new BarRenderer();\r\n renderer.setBaseToolTipGenerator(\r\n new StandardCategoryToolTipGenerator());\r\n renderer.setBaseItemURLGenerator(new StandardCategoryURLGenerator(\r\n \"bar_chart_detail.jsp\"));\r\n \r\n // add URLs to the series names in the legend...\r\n renderer.setLegendItemURLGenerator(new CategorySeriesLabelGenerator() \r\n {\r\n public String generateLabel(CategoryDataset dataset, int series) {\r\n return \"series.html?series=\" + (series + 1);\r\n }\r\n \r\n });\r\n \r\n // add tool tips to the series names in the legend...\r\n renderer.setLegendItemToolTipGenerator(new CategorySeriesLabelGenerator() \r\n {\r\n public String generateLabel(CategoryDataset dataset, int series) {\r\n return \"Tool tip for series \" + (series + 1);\r\n }\r\n \r\n });\r\n CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, \r\n valueAxis, renderer);\r\n plot.setOrientation(PlotOrientation.VERTICAL);\r\n chart = new JFreeChart(\"Bar Chart\", JFreeChart.DEFAULT_TITLE_FONT,\r\n plot, true);\r\n }\r\n else {\r\n chart = ChartFactory.createBarChart(\r\n \"Vertical Bar Chart\", // chart title\r\n \"Category\", // domain axis label\r\n \"Value\", // range axis label\r\n dataset, // data\r\n PlotOrientation.VERTICAL,\r\n true, // include legend\r\n true,\r\n false\r\n );\r\n }\r\n chart.setBackgroundPaint(java.awt.Color.white);\r\n \r\n // save it to an image\r\n try {\r\n ChartRenderingInfo info = new ChartRenderingInfo(\r\n new StandardEntityCollection());\r\n File file1 = new File(\"barchart100.png\");\r\n ChartUtilities.saveChartAsPNG(file1, chart, 600, 400, info);\r\n\r\n // write an HTML page incorporating the image with an image map\r\n File file2 = new File(\"barchart100.html\");\r\n OutputStream out = new BufferedOutputStream(\r\n new FileOutputStream(file2));\r\n PrintWriter writer = new PrintWriter(out);\r\n writer.println(\"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\"\");\r\n writer.println(\"\\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\\">\");\r\n writer.println(\"<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" lang=\\\"en\\\" xml:lang=\\\"en\\\">\");\r\n writer.println(\"<head><title>JFreeChart Image Map Demo</title></head>\");\r\n writer.println(\"<body><p>\");\r\n ImageMapUtilities.writeImageMap(writer, \"chart\", info);\r\n writer.println(\"<img src=\\\"barchart100.png\\\" \"\r\n + \"width=\\\"600\\\" height=\\\"400\\\" usemap=\\\"#chart\\\" alt=\\\"barchart100.png\\\"/>\");\r\n writer.println(\"</p></body>\");\r\n writer.println(\"</html>\");\r\n writer.close();\r\n\r\n }\r\n catch (IOException e) {\r\n System.out.println(e.toString());\r\n }\r\n\r\n }", "public void init() {\n setLayout(new GridLayout(n-1, n));\n setFont(new Font(\"SansSerif\", Font.BOLD, 24));\n \n // Baris 1\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"Bksp\",Color.red));\n add(makeButton(\"CE\",Color.red));\n add(makeButton(\"X\",Color.red));\n \n // Baris 2\n add(makeButton(\"MC\",Color.red));\n add(new Button(\"7\"));\n add(new Button(\"8\"));\n add(new Button(\"9\"));\n add(new Button(\"/\"));\n add(new Button(\"sqrt\"));\n \n // Baris 3\n add(makeButton(\"MR\",Color.red));\n add(new Button(\"4\"));\n add(new Button(\"5\"));\n add(new Button(\"6\"));\n add(new Button(\"x\"));\n add(new Button(\"%\"));\n \n // Baris 4\n add(makeButton(\"MR\",Color.red));\n add(new Button(\"1\"));\n add(new Button(\"2\"));\n add(new Button(\"3\"));\n add(new Button(\"-\"));\n add(new Button(\"1/x\"));\n\n // Baris 5\n add(makeButton(\"M+\",Color.red));\n add(new Button(\"0\"));\n add(new Button(\"+/-\"));\n add(new Button(\".\"));\n add(new Button(\"+\"));\n add(new Button(\"=\"));\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button_1 = createButton(parent, CustomNo, \"No\", false);\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// \"No\" clicked\n\t\t\t\tclose();\n\t\t\t}\n\t\t});\n\t\tButton button = createButton(parent, CustomYes, \"Yes\",\n\t\t\t\ttrue);\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// \"Yes\" clicked\n\t\t\t\t\n\t\t FileDialog dlg = new FileDialog(getShell(), SWT.SAVE);\n\t\t dlg.setFilterNames(new String[]{\"All Files (*.*)\"});\n\t\t dlg.setFilterExtensions(new String[]{\"*.*\"});\n\t\t dlg.setOverwrite(true);\n\t\t dlg.setFileName(filename);\n\t\t String path = dlg.open();\n\t\t //Activator.getDefault().showDialogAsync(\"Filepath chosen\", path);\n\t\t filepath = path;\n\t\t if (path != null)\n\t\t \tclose();\n\t\t\t}\n\t\t});\n\t\tbutton.setSelection(true);\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource() == button1){\n\t\t\tint id,number;\n\t\t\tString year;\n\t\t\tResultSet rs;\n\t\t\tMySQL mysql = new MySQL();\n\t\t\trs = mysql.selectAll();\n\t\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\twhile(rs.next()){\n\t\t\t\tid = rs.getInt(\"id\");\n\t\t\t\tyear = rs.getString(\"year\");\n\t\t\t number = rs.getInt(\"number\");\n\t\t\t data.addValue(number,\"出生数\",year); \n\t \t\t\tpanelA.add(new Label(\"id:\"+id+\" / year\"+year+\" / number\"+number)); \n\t\t\t\t}\n\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\t JFreeChart chart = \n\t\t\t ChartFactory.createLineChart(\"出生率\",\n\t\t\t \"年度\",\n\t\t\t \"万(人)\",\n\t\t\t data,\n\t\t\t PlotOrientation.VERTICAL,\n\t\t\t true,\n\t\t\t false,\n\t\t\t false);\n\n\t\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t\t panelA.add(cpanel);\n\t\t\t cardlayout.next(this);\n\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n background = new javax.swing.JPanel();\n barChart = new javax.swing.JPanel();\n barChartMonth = new javax.swing.JPanel();\n inputSearch = new javax.swing.JTextField();\n statisBtn = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n yearLabel = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n barChart.setBackground(new java.awt.Color(255, 255, 255));\n barChart.setLayout(new java.awt.BorderLayout());\n\n barChartMonth.setBackground(new java.awt.Color(255, 255, 255));\n barChartMonth.setLayout(new java.awt.BorderLayout());\n\n inputSearch.setFont(new java.awt.Font(\"Times New Roman\", 0, 24)); // NOI18N\n\n statisBtn.setBackground(new java.awt.Color(255, 255, 255));\n statisBtn.setFont(new java.awt.Font(\"Times New Roman\", 0, 24)); // NOI18N\n statisBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icon/area_chart_48px.png\"))); // NOI18N\n statisBtn.setText(\"Thống kê\");\n\n jLabel1.setFont(new java.awt.Font(\"Times New Roman\", 1, 16)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(51, 51, 255));\n jLabel1.setText(\"Năm thống kê\");\n\n yearLabel.setFont(new java.awt.Font(\"Times New Roman\", 0, 36)); // NOI18N\n yearLabel.setForeground(new java.awt.Color(51, 51, 255));\n yearLabel.setText(\"Năm\");\n\n javax.swing.GroupLayout backgroundLayout = new javax.swing.GroupLayout(background);\n background.setLayout(backgroundLayout);\n backgroundLayout.setHorizontalGroup(\n backgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(barChart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(barChartMonth, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, backgroundLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(yearLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 533, Short.MAX_VALUE)\n .addGroup(backgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addGroup(backgroundLayout.createSequentialGroup()\n .addComponent(inputSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 345, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26)\n .addComponent(statisBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(27, 27, 27))\n );\n backgroundLayout.setVerticalGroup(\n backgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(backgroundLayout.createSequentialGroup()\n .addGroup(backgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(yearLabel)\n .addGroup(backgroundLayout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(backgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(inputSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(statisBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(barChart, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(barChartMonth, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(background, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(background, javax.swing.GroupLayout.PREFERRED_SIZE, 683, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }", "private void createSolveButton(final ToolBar bar) {\r\n // image's source:\r\n // http://pixabay.com/de/puzzle-st%C3%BCck-stichs%C3%A4ge-konzept-308908/\r\n createButton(bar, \"images/puzzle-308908_640.png\", \"Solve\",\r\n new SolveSelectionListener());\r\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tif (v.getId() == R.id.demo_bar_view_animate_button) {\n\t\t\t\tmStandardBar.startBarAnimation();\n\t\t\t\tmDividedBar.startBarAnimation();\n\t\t\t\tmStandardBarReversed.startBarAnimation();\n\t\t\t\tmDividedBarReversed.startBarAnimation();\n\t\t\t\t\n\t\t\t// If this is the reset button, interpret the current state of the UI and customize the BarView\n\t\t\t} else if (v.getId() == R.id.demo_bar_view_reset_button) {\n\t\t\t\t\n\t\t\t\t// First do visibility and orientation updates\n\t\t\t\tmCustomizableBar.setDividerVisibility(mDividerCheckbox.isChecked());\n\t\t\t\tmCustomizableBar.setVertical(mVerticalCheckbox.isChecked());\n\t\t\t\tmCustomizableBar.setReversed(mReversedCheckbox.isChecked());\n\t\t\t\tmCustomizableBar.setBarPercentage((float)mPercentagePicker.getValue() / 100f);\n\t\t\t\t\n\t\t\t\t// Then update colors\n\t\t\t\tmCustomizableBar.setPrimaryBarColor(Color.parseColor(\n\t\t\t\t\t\tmPrimaryPicker.getDisplayedValues()[mPrimaryPicker.getValue()]));\n\t\t\t\tmCustomizableBar.setSecondaryBarColor(Color.parseColor(\n\t\t\t\t\t\tmSecondaryPicker.getDisplayedValues()[mSecondaryPicker.getValue()]));\n\t\t\t\t\n\t\t\t\t// Animate the bar if requested, else invalidate it to force a re-draw\n\t\t\t\tif (mAnimateCheckbox.isChecked()) {\n\t\t\t\t\tmCustomizableBar.startBarAnimation();\n\t\t\t\t} else {\n\t\t\t\t\tmCustomizableBar.invalidate();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public boolean addBarButton ( Item... buttons ) {\n\t\tfor ( int i = 0; i < buttons.length; i++ ) {\n\t\t\tfor ( int j = 0; j < this.getButtonsBarSize ( ).getSize ( ); j++ ) {\n\t\t\t\tif ( this.bar_buttons[ j ] == null ) {\n\t\t\t\t\tthis.bar_buttons[ j ] = buttons[ i ];\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private void setupButtonListeners() {\r\n final SharedPreferences sharedPref = getSharedPreferences(getString(R.string.pref_file_key),\r\n Context.MODE_PRIVATE);\r\n final String accessToken = sharedPref.getString(getString(R.string.access_token_key), null);\r\n\r\n final BarChart chart = findViewById(R.id.chart);\r\n\r\n final Button btnNext = findViewById(R.id.btn_next);\r\n btnNext.setVisibility(View.GONE); // current week is displayed on create, so no next week\r\n btnNext.setOnClickListener(new View.OnClickListener() {\r\n\r\n public void onClick(View v) {\r\n // Clear old data\r\n chart.invalidate();\r\n chart.clear();\r\n\r\n offsetFromToday--;\r\n\r\n // Calculate new endDate used to keep track of which day or week is displayed\r\n // and update the date heading\r\n if(dataType.equals(\"NON-SED\")) {\r\n endDate.add(Calendar.DATE, 1);\r\n updateDateHeading(null);\r\n } else {\r\n Calendar startDate = endDate;\r\n startDate.add(Calendar.DATE, 1);\r\n endDate = calcEndDateFromStart(startDate);\r\n updateDateHeading(startDate);\r\n }\r\n\r\n // Request new data\r\n getActivityData(accessToken, false);\r\n }\r\n });\r\n\r\n final Button btnPrev = findViewById(R.id.btn_prev);\r\n btnPrev.setOnClickListener(new View.OnClickListener() {\r\n\r\n public void onClick(View v) {\r\n // Clear old data\r\n chart.invalidate();\r\n chart.clear();\r\n\r\n offsetFromToday++;\r\n\r\n // Calculate new endDate used to keep track of which day or week is displayed\r\n // and update the date heading\r\n if(dataType.equals(\"NON-SED\")) {\r\n endDate.add(Calendar.DATE, -1);\r\n updateDateHeading(null);\r\n } else {\r\n endDate = calcPrevEndDate(endDate);\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n updateDateHeading(startDate);\r\n }\r\n\r\n // Request new data\r\n getActivityData(accessToken, false);\r\n }\r\n });\r\n }", "private void initialize() {\r\n\t\t//frame = new JFrame();\r\n\t\tframe.setSize(725, 482);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t//frame.getContentPane().setLayout(null);\r\n\t\t\r\n\t\t\r\n\t\tDefaultCategoryDataset dataset= new DefaultCategoryDataset();\r\n\t\t//JOptionPane.showMessageDialog(null, \"BUTTON CLICKED!!!\");\r\n\t\t//LableMessage.setText(\"BUTTON CLICKED!!!\");\r\n\t\t\r\n\t\t//Pain, Drowsiness, Nausea, Anxiety, and Depression\r\n\t\tdataset.setValue(2, \"day1\",\"Pain\");\r\n\t\tdataset.setValue(5, \"day2\",\"Pain\");\r\n\t\tdataset.setValue(4, \"day3\",\"Pain\");\r\n\t\tdataset.setValue(6, \"day1\", \"Drowsiness\");\r\n\t\tdataset.setValue(10, \"day2\", \"Drowsiness\");\r\n\t\tdataset.setValue(8, \"day3\", \"Drowsiness\");\r\n\t\tdataset.setValue(1, \"day1\", \"Nausea\");\r\n\t\tdataset.setValue(7, \"day2\", \"Nausea\");\r\n\t\tdataset.setValue(5, \"day3\", \"Nausea\");\r\n\t\tdataset.setValue(3,\"day1\",\"Anxiety\");\t\r\n\t\tdataset.setValue(8,\"day2\",\"Anxiety\");\r\n\t\tdataset.setValue(9,\"day3\",\"Anxiety\");\r\n\t\tdataset.setValue(8, \"day1\", \"Depression\");\r\n\t\tdataset.setValue(7, \"day2\", \"Depression\");\r\n\t\tdataset.setValue(9, \"day3\", \"Depression\");\r\n\t\tint test[] = new int[7];\r\n\t\tfor (int i=0;i<7; i++)\r\n\t\t{\r\n\t\t\ttest[i]=5;\r\n\t\t}\r\n\t\tDefaultCategoryDataset dataset2= new DefaultCategoryDataset();\r\n\t\t//dataset2 = dataSetInit(P1.getEnterSymptomLevel(),P1.getPreviousSymptomLevel1(),P1.getPreviousSymptomLevel2());\r\n\t\tdataset2 = dataSetInit(test,test,test);\r\n\t\t//P1.getEnter\r\n\t\t//DefaultCategoryDataset dataset2= new DefaultCategoryDataset();\r\n\r\n\t\t//JFreeChart chart= ChartFactory.createBarChart(P1.firstName+\" \"+P1.lastName,\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\r\n\t\tJFreeChart chart= ChartFactory.createBarChart3D(\"Symptom Report\",\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,true,true,true);\r\n\t\t//JFreeChart chart2= ChartFactory.createBarChart(\"Symptom Report\",\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\t\tchart.setBackgroundPaint(Color.lightGray);\r\n\t\t//JFreeChart chart2= ChartFactory.createBarChart(\"Grade Report\",\"Student Name\", \"Marks\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\t\t\r\n\t\tChartPanel chartPanel = new ChartPanel(chart);\r\n\t\tchartPanel.setPreferredSize(new Dimension(700,350));\r\n\t\tPan.add(chartPanel);\r\n\t\t\r\n\t\tframe.getContentPane().add(Pan);\r\n\t\tCategoryPlot p=chart.getCategoryPlot();\r\n\t\tp.setRangeGridlinePaint(Color.red);\r\n\t\tp.setBackgroundPaint(Color.WHITE);\r\n\t\tframe.setVisible(true);\r\n//\t\tChartFrame frame= new ChartFrame(\"Bar Graph Test\",chart,false);\r\n//\t\t\r\n//\t\tframe.setVisible(true);\r\n//\t\tframe.setSize(700,350);\r\n//\t\tframe.setResizable(false);\r\n\t\t//frame2 =new JFrame()\r\n\t}", "public void setGraph(ActionEvent event)\n {\n theLineGraph.getData().clear();\n double temporary=0;\n theLineGraph.getXAxis().setLabel(\"Days\");\n\n XYChart.Series<String, Number> theGraph = new XYChart.Series<String, Number>();\n\n for (int i=0; i<Driver.save.getLog().size();i++)\n {\n String myI=i+\"\";\n\n if (event.getSource()==caloriesButton)\n {\n temporary=Driver.save.getDayCalories(i);\n theLineGraph.getYAxis().setLabel(\"Calories\");\n\n } else if(event.getSource()==protienButton)\n {\n temporary=Driver.save.getDayProtein(i);\n theLineGraph.getYAxis().setLabel(\"protien\");\n }\n else if (event.getSource()==carbsButton)\n {\n temporary=Driver.save.getDayCarbo(i);\n theLineGraph.getYAxis().setLabel(\"Carbs\");\n }\n else if (event.getSource()==fatsButton)\n {\n temporary=Driver.save.getDayFats(i);\n theLineGraph.getYAxis().setLabel(\"Fats\");\n }\n else if (event.getSource()==bevButton)\n {\n temporary=Driver.save.getDayBevarage(i);\n theLineGraph.getYAxis().setLabel(\"Drinks in ml\");\n }\n\n theGraph.getData().add(new XYChart.Data<String, Number>(myI ,temporary));\n }\n theLineGraph.getData().addAll(theGraph);\n\n }", "void setBarchart(Map<Integer, Integer> data, String year) {\r\n\r\n\t\tbc.getData().clear();\r\n\t\t// bc.setLegendVisible(false);\r\n\r\n\t\tXYChart.Series series1 = new XYChart.Series();\r\n\t\tseries1.setName(\"\" + year);\r\n\t\tseries1.getData().add(new XYChart.Data(\"Jan\", data.get(0)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Feb\", data.get(1)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Mar\", data.get(2)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Apr\", data.get(3)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"May\", data.get(4)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Jun\", data.get(5)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Jal\", data.get(6)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Aug\", data.get(7)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Sep\", data.get(8)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Oct\", data.get(9)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Nav\", data.get(10)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Dec\", data.get(11)));\r\n\r\n\t\tbc.getData().addAll(series1);\r\n\t}", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Rechercher\", true);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, \"Annuler\", false);\r\n\t}", "private void addGraphButton() {\n\t\tgraphButton = new JButton(\"Graph\");\n\t\tadd (graphButton, SOUTH);\n\t\tgraphButton.addActionListener(this);\n\t}", "@Override\n\tprotected final JFreeChart createChart() {\n\t\tJFreeChart jFreeChart=null;\n\t\tIntervalXYDataset dataset=createDataset();\n\t\t\n\t\tjFreeChart=ChartFactory.createXYBarChart(title,xalabel, dateAxis, yalabel,dataset, por, legend, tooltips, urls);\n\t\t\n\t\tXYPlot plot=(XYPlot)jFreeChart.getPlot();\n\t\tpreRender(plot);\n\t\treturn jFreeChart; \n\t}", "public void chartMouseClicked(ChartMouseEvent event) {\n }", "@Override\n public int getNumGuiBars() {\n return 1;\n }", "@Override\n\tprotected void draw() {\n\t\tif (values == null || values.isEmpty()) {\n\t\t\tif (field != null) {field.removeFromParent();}\n\t\t\tfield = null;\n\t\t}\n\t\telse if (field == null) {VisualizationUtils.loadVisualizationApi(onLoadCallback, BarChart.PACKAGE);}\n\t\telse {field.draw(getDataTable(), getOptions());}\n\t}", "private void createBarChart(FoodEmissions emissions, Context context) {\n ArrayList<BarEntry> barEntries = new ArrayList<>();\n ArrayList<String> labelNames = new ArrayList<>();\n labelNames.add(\"Meat\");\n labelNames.add(\"Dairy\");\n labelNames.add(\"Plant\");\n labelNames.add(\"Total\");\n barEntries.add(new BarEntry(0, Float.parseFloat(emissions.getMeat())));\n barEntries.add(new BarEntry(1, Float.parseFloat(emissions.getDairy())));\n barEntries.add(new BarEntry(2, Float.parseFloat(emissions.getPlant())));\n barEntries.add(new BarEntry(3, Float.parseFloat(emissions.getTotal())));\n LayoutInflater li = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n RelativeLayout relativeLayout = (RelativeLayout) li.inflate(R.layout.emission_chart_layout, null);\n BarChart chart = relativeLayout.findViewById(R.id.bar_chart);\n //Customization to the BarCharts look\n BarDataSet set = new BarDataSet(barEntries, \"CO2 Emissions (in Kg)\");\n set.setColors(ColorTemplate.COLORFUL_COLORS);\n set.setValueTextSize(20f);\n Description description = new Description();\n description.setText(\"\");\n chart.setDescription(description);\n BarData data = new BarData(set);\n chart.setData(data);\n Legend legend = chart.getLegend();\n legend.setTextSize(15f);\n XAxis xAxis = chart.getXAxis();\n xAxis.setValueFormatter(new IndexAxisValueFormatter(labelNames));\n xAxis.setPosition(XAxis.XAxisPosition.TOP);\n xAxis.setDrawGridLines(false);\n xAxis.setGranularity(1f);\n xAxis.setLabelCount(labelNames.size());\n AlertDialog builder = new AlertDialog.Builder(context)\n .setNegativeButton(\"Close\", null)\n .setView(relativeLayout)\n .setCancelable(false)\n .create();\n builder.show();\n }", "public SketchBarChart(String colour, String outlineColour, Integer offset) {\n super(\"bar_sketch\");\n setColour(colour);\n setOutlineColour(outlineColour);\n setOffset(offset);\n }", "private void initBarChartConfiguration(final Activity activity, BarChart barChart) {\n barChart.setDrawBarShadow(false);\n barChart.setDrawValueAboveBar(true);\n barChart.setDescription(\"\");\n barChart.setMaxVisibleValueCount(50);\n barChart.setPinchZoom(false);\n barChart.setDrawGridBackground(false);\n\n // xAxis\n XAxis xl = barChart.getXAxis();\n xl.setGranularity(1f);\n xl.setCenterAxisLabels(true);\n xl.setValueFormatter(new AxisValueFormatter() {\n @Override\n public String getFormattedValue(float value, AxisBase axis) {\n if (activity != null) {\n if (value == 0)\n return activity.getResources().getString(R.string.pre_operation);\n if (value == 1)\n return activity.getResources().getString(R.string.in_operation);\n if (value == 2)\n return activity.getResources().getString(R.string.post_operation);\n }\n return \"-\";\n }\n\n @Override\n public int getDecimalDigits() {\n return 0;\n }\n });\n\n // yAxis\n YAxis leftAxis = barChart.getAxisLeft();\n leftAxis.setValueFormatter(new AxisValueFormatter() {\n @Override\n public String getFormattedValue(float value, AxisBase axis) {\n return String.valueOf((int) value);\n }\n\n @Override\n public int getDecimalDigits() {\n return 0;\n }\n });\n leftAxis.setDrawGridLines(false);\n leftAxis.setSpaceTop(30f);\n leftAxis.setAxisMinValue(0f); // this replaces setStartAtZero(true\n barChart.getAxisRight().setEnabled(false);\n barChart.getAxisLeft().setEnabled(false);\n }", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Add\",\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\r\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent)\n\t{\n\t\tButton button_1 = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tbutton_1.setText(\"Ja\");\n\t\tButton button = createButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t\tbutton.setText(\"Nein\");\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Fermer\", true);\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Fermer\", true);\n\t}", "private void updateBars() {\n \n // get the number of bars to draw\n bars = ( getWidth()-5 - textAreaLenght ) / barLenght;\n \n }", "@Override\r\n protected final Control createButtonBar(Composite parent) {\n return null;\r\n }", "private BarData generateBarData() {\n ArrayList<BarEntry> entries2 = new ArrayList<BarEntry>();\n\n /*\n for (int index = 0; index < itemcount; index++) {\n entries1.add(new BarEntry(0, 25));\n\n // stacked\n entries2.add(new BarEntry(0, new float[]{13, 13}));\n }*/\n entries2.add(new BarEntry(0, 3f));\n\n\n// BarDataSet set1 = new BarDataSet(entries1, \"Bar 1\");\n// set1.setColor(Color.rgb(60, 220, 78));\n// set1.setValueTextColor(Color.rgb(60, 220, 78));\n// set1.setValueTextSize(10f);\n// set1.setAxisDependency(YAxis.AxisDependency.LEFT);\n\n BarDataSet set2 = new BarDataSet(entries2, \"\");\n// set2.setStackLabels(new String[]{\"Stack 1\", \"Stack 2\"});\n// set2.setColors(new int[]{Color.rgb(61, 165, 255), Color.rgb(23, 197, 255)});\n set2.setColor(getResources().getColor(R.color.chart_red));\n set2.setValueTextColor(Color.rgb(61, 165, 255));\n\n set2.setValueTextSize(10f);\n set2.setHighlightEnabled(false);\n\n set2.setAxisDependency(YAxis.AxisDependency.LEFT);\n\n float barWidth = (hoursArray.size() + 1) * 2f; // x2 dataset\n // (0.45 + 0.02) * 2 + 0.06 = 1.00 -> interval per \"group\"\n\n BarData d = new BarData(set2);\n d.setBarWidth(barWidth);\n d.setValueTextSize(0f);\n\n // make this BarData object grouped\n// d.groupBars(0, groupSpace, barSpace); // start at x = 0\n\n return d;\n }", "private void createOpenButton(final ToolBar bar) {\r\n // image's source:\r\n // https://openclipart.org/detail/119905/load-cedric-bosdonnat-01-by-anonymous\r\n createButton(bar, \"images/load_cedric_bosdonnat_01.png\", \"Open\",\r\n new SelectionOpenListener());\r\n }", "public void addBar(String title, int bars, int color) {\n\t\t// More that 4 bars are not allowed at the moment\n\t\t// TODO: Allow more bars\n\t\tif(totalBars > 4) return; \n\t\t\n\t\t// TODO: Allow user to decide which image to use as a bar count\n\t\tbarTitle[totalBars] = title;\n\t\t\n\t\t// Bars are stored in two variables in the following way\n\t\t// [ title 1, title 2 ]\n\t\t// [bar#, barColor, bar#, barColor]\n\t\t\t\n\t\tbarData[totalBars * 2] = bars;\n\t\tbarData[(totalBars * 2) + 1] = color;\n\t\t\n\t\t++totalBars;\n\t}", "public interface BarGraphsApi {\n\n void loadVisualizationApi(Runnable callback);\n\n Widget createBarGraph(\n String title, String[] labels, Float[] values, Float maxValue);\n}", "@Override\r\n public void chartMouseClicked(ChartMouseEvent cme) {\n }", "public JQPlotMultiBar(String title){\n this();\n this.title = title;\n }", "public void updateOnlineOfflineBarChart() {\n UserOperations userOps = new UserOperations();\n ObservableList<String> columns = FXCollections.observableArrayList(\"Online\", \"Offline\");\n onlineOfflineBarChartXAxis.setCategories(columns);\n XYChart.Series<String, Integer> series = new XYChart.Series<>();\n series.getData().add(new XYChart.Data<>(columns.get(0), userOps.getNumberOfOnlineUsers()));\n series.getData().add(new XYChart.Data<>(columns.get(1), userOps.getNumberOfOfflineUsers()));\n\n //barChart.setBarGap(1.0);\n Platform.runLater(() -> {\n barChartOnlineOfflineUsers.setCategoryGap(1);\n barChartOnlineOfflineUsers.setMaxHeight(100);\n barChartOnlineOfflineUsers.setTitle(\"Online / Offline Users\");\n barChartOnlineOfflineUsers.getData().add(series);\n });\n\n }", "private void showBars() {\n graph.removeAllSeries();\n Log.d(\"ShowGraph \", \"started\");\n Log.d(\"Tuples length \", tuples.size() + \"\");\n ArrayList<Double> vkupno = new ArrayList<Double>();\n //vo vkupno, sekoj element, e vkupnata vrednost za nutrientot pod toj broj\n int brNutrienti = values.size();\n Log.d(\"Values length\", brNutrienti + \"\");\n for (int i = 0; i < brNutrienti; i++) {\n vkupno.add(i, 0.0);\n }\n Iterator<String> it = values.iterator();\n String currentNutrient = null;\n double dodadi = 0;\n for (int j = 0; j < brNutrienti; j++) {\n currentNutrient = it.next();\n for (int i = 0; i < tuples.size(); i++) {\n Tuple currentTuple = tuples.get(i);\n if (currentNutrient.equals(\"Protein\")) {\n dodadi = (currentTuple.getProtein()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Total lipid (fat)\")) {\n dodadi = (currentTuple.getLipid()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Carbohydrate\")) {\n dodadi = (currentTuple.getCarbohydrate()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Glucose\")) {\n dodadi = (currentTuple.getGlucose()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Calcium\")) {\n dodadi = (currentTuple.getCalcium()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Iron\")) {\n dodadi = (currentTuple.getIron()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Magnesium\")) {\n dodadi = (currentTuple.getMagnesium()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Zinc\")) {\n dodadi = (currentTuple.getZinc()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Vitamin C\")) {\n dodadi = (currentTuple.getVitaminC()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Thiamin\")) {\n dodadi = (currentTuple.getThiamin()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Riboflavin\")) {\n dodadi = (currentTuple.getRibofavin()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Niacin\")) {\n dodadi = (currentTuple.getNiacin()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Vitamin B6\")) {\n dodadi = (currentTuple.getVitaminB6()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Vitamin B12\")) {\n dodadi = (currentTuple.getVitaminB12()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"VitaminA\")) {\n dodadi = (currentTuple.getVitaminA()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Vitamin D\")) {\n dodadi = (currentTuple.getVitaminD()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Vitamin E\")) {\n dodadi = (currentTuple.getVitaminE()) * currentTuple.getQuantity() / 100;\n }\n dodadi = dodadi + vkupno.get(j);\n vkupno.set(j, dodadi);\n dodadi = 0;\n }\n }\n Log.d(\"Posle polenje na vkupno\", \"sfsfsdf\");\n //posle ova vo vkupno se sodrzhat y vrednostite za grafikot\n DataPoint[] dpArray = new DataPoint[vkupno.size()];\n for (int i = 0; i < vkupno.size(); i++) {\n dpArray[i] = new DataPoint(i + 1, vkupno.get(i));\n intake.add(vkupno.get(i));\n Log.d(\"y(\" + i + \")=\", vkupno.get(i) + \"\");\n }\n BarGraphSeries<DataPoint> series = new BarGraphSeries<DataPoint>(dpArray);\n graph.addSeries(series);\n // styling\n series.setValueDependentColor(new ValueDependentColor<DataPoint>() {\n @Override\n public int get(DataPoint data) {\n return Color.rgb((int) data.getX() * 255 / 4, (int) Math.abs(data.getY() * 255 / 6), 100);\n }\n });\n series.setSpacing(1);\n series.setDataWidth(0.2);\n // draw values on top\n series.setDrawValuesOnTop(true);\n series.setValuesOnTopColor(Color.BLACK);\n /* StaticLabelsFormatter staticLabelsFormatter = new StaticLabelsFormatter(graph);\n staticLabelsFormatter.setHorizontalLabels(new String[] {\"CH\", \"F\", \"Pr\",\"Mi\"});\n graph.getGridLabelRenderer().setLabelFormatter(staticLabelsFormatter);\n */\n //graph.getLegendRenderer().setVisible(true);\n graph.getLegendRenderer().setAlign(LegendRenderer.LegendAlign.TOP);\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Speichern\",\n\t\t\t\tfalse);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\"Abbrechen\", false);\n\t\t\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button = createButton(parent, IDialogConstants.OK_ID,\n\t\t\t\tIDialogConstants.OK_LABEL, true);\n\t\tbutton.setText(\"关闭\");\n\t}", "private void setBarValues() {\n\t\t// Get highest value\n\t\tint iMax = 0;\n\t\tdouble dMax = 0;\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tif (dMax < a[i]) {\n\t\t\t\tiMax = i;\n\t\t\t\tdMax = a[i];\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\t// Highlight leading alternative\n\t\t\tif (i == iMax)\n\t\t\t\talternativeBarComponents[i].doUpdate(a[i], SWT.NORMAL);\n\t\t\telse\n\t\t\t\talternativeBarComponents[i].doUpdate(a[i], SWT.PAUSED);\n\t\t}\n\t}", "private void createButton(final ToolBar bar, final String imagePath,\r\n final String text, final SelectionListener listener) {\r\n final Image icon = getIcon(imagePath);\r\n\r\n final ToolItem toolItem = new ToolItem(bar, SWT.PUSH);\r\n toolItem.setImage(resize(icon, DEFAULT_ICON_SIZE, DEFAULT_ICON_SIZE));\r\n toolItem.setText(text);\r\n\r\n toolItem.addSelectionListener(listener);\r\n }", "@Override\n\tprotected void buildButton() {\n\t\t\n\t}", "private BarData getBarData(ArrayList<Column> columns, String Label){\n\n ArrayList<BarEntry> valueSet = new ArrayList<>();\n\n for(int i = 0; i < columns.size(); i++){\n valueSet.add(new BarEntry(i, columns.get(i).getColVal()));\n }\n\n BarDataSet barDataSet = new BarDataSet(valueSet, Label);\n barDataSet.setColors(ColorTemplate.COLORFUL_COLORS);\n barDataSet.setValueFormatter(new IValueFormatter() {\n @Override\n public String getFormattedValue(float value, Entry entry, int dataSetIndex, ViewPortHandler viewPortHandler) {\n if (value == 0f)\n return \"\";\n return String.valueOf((int)value);\n }\n });\n\n\n return new BarData(barDataSet);\n }", "public T caseBarChart(BarChart object)\n {\n return null;\n }", "private void createSaveButton(final ToolBar bar) {\n createButton(bar, \"images/1328102005_Save.png\", \"Save\",\r\n new SelectionAdapter() {\r\n @Override\r\n public void widgetSelected(SelectionEvent arg0) {\r\n final FileDialog fileDialog = new FileDialog(SHELL,\r\n SWT.SAVE);\r\n fileDialog.setText(\"Save Arena\");\r\n final String filename = fileDialog.open();\r\n if (filename != null) {\r\n fireSave(filename);\r\n }\r\n }\r\n });\r\n }", "public abstract void executeBagButton();", "public GUIVerbrauchsdiagramm(String title, EnergyData energyData) {\n super(title);\n this.energyData = energyData;\n setExtendedState(JFrame.MAXIMIZED_BOTH);\n ChartPanel chartPanel = (ChartPanel) createPanel(energyData);\n\n buttonGroup.add(verbrauchDiagramm);\n buttonGroup.add(zaehlerDiagramm);\n pRadiobuttons.add(verbrauchDiagramm);\n pRadiobuttons.add(zaehlerDiagramm);\n pRadiobuttons.setBorder(new EmptyBorder(0, 20, 0, 0));\n verbrauchDiagramm.setSelected(true);\n tDate.setForeground(Color.gray);\n\n pSkipDay.setLayout(new GridLayout(1, 7, 5, 0));\n pSkipDay.add(bBackwardsM);\n pSkipDay.add(bBackwardsW);\n pSkipDay.add(bBackwards);\n pSkipDay.add(tDate);\n pSkipDay.add(bForwards);\n pSkipDay.add(bForwardsW);\n pSkipDay.add(bForwardsM);\n\n pDate.add(lCurrentDate);\n pDate.add(lEmpty2);\n pDate.add(pSkipDay);\n\n\n pCsv.add(bExportCSV);\n pCsv.add(lEmpty);\n pCsv.add(bExportJSON);\n\n\n pHeader.add(pRadiobuttons);\n pHeader.add(pDate);\n pHeader.add(pCsv);\n\n this.add(chartPanel, BorderLayout.CENTER);\n this.add(pHeader, BorderLayout.NORTH);\n\n //Actionlistener\n ActionListener actionListenerDiagramm = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (verbrauchDiagramm.isSelected()) {\n System.out.println(\"Verbrauchsdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetVerbrauchsdiagramm(energyData);\n chart.setTitle(\"Stromzählerübersicht\");\n }\n if (zaehlerDiagramm.isSelected()) {\n System.out.println(\"Zählerdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetZaehlerdiagramm(energyData);\n chart.setTitle(\"Zählerstand\");\n }\n }\n };\n\n bExportCSV.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n try {\n JFileChooser fileChooser = new JFileChooser(\"./CSV\");\n fileChooser.setDialogTitle(\"CSV-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.csv\",\"csv\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".csv\")){\n path = path +\".csv\";\n }\n FileHandler.writeCSV(map,path);\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden in ein CSV-File exportiert\");\n }\n });\n\n bExportJSON.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n FileHandler.saveJSON(map);\n\n try {\n JFileChooser fileChooser = new JFileChooser(\"./JSON\");\n fileChooser.setDialogTitle(\"JSON-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.json\",\"json\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".json\")){\n path = path +\".json\";\n }\n FileWriter fileWriter = new FileWriter(path);\n fileWriter.write(FileHandler.saveJSON(map));\n fileWriter.flush();\n fileWriter.close();\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden zum JSON exportiert \\n\" + \"https://api.npoint.io/0dc854da1619aca3be45\");\n }\n });\n\n bForwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, true);\n }\n });\n\n bBackwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, false);\n }\n });\n bBackwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, false);\n }\n });\n bForwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, true);\n }\n });\n bBackwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, false);\n }\n });\n bForwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, true);\n }\n });\n\n /*chart.getXYPlot().addChangeListener(new PlotChangeListener() {\n @Override\n public void plotChanged(PlotChangeEvent plotChangeEvent) {\n XYPlot plot = plotChangeEvent.getPlot().getChart().getXYPlot();\n PlotChangeListener plotChangeListener = this;\n\n plot.removeChangeListener(plotChangeListener);\n long upperBound = (long) plot.getDomainAxis().getUpperBound();\n long lowerBound = (long) plot.getDomainAxis().getLowerBound();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(upperBound / 900000 * 900000);\n upperBound = calendar.getTimeInMillis();\n\n calendar.setTimeInMillis(lowerBound / 900000 * 900000);\n lowerBound = calendar.getTimeInMillis();\n System.out.println(new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\").format(new Date(lowerBound)));\n\n System.out.println(getEnergyData().getSdatData().containsKey(lowerBound));\n\n double highestValue = 0;\n if (getEnergyData().getSdatData().containsKey(lowerBound)) {\n for (long i = lowerBound; i < upperBound; i = i + 86400000) {\n if (getEnergyData().getSdatData().get(i).getRelativBezug() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getRelativBezug();\n\n }\n if (getEnergyData().getSdatData().get(i).getRelativeEinspeisung() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getZaehlerstandEinspeisung();\n }\n }\n\n System.out.println(highestValue);\n System.out.println(highestValue + 1);\n\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(highestValue + 1);\n }else {\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(plot.getRangeAxis().getUpperBound());\n }\n plot.addChangeListener(plotChangeListener);\n\n }\n\n });\n */\n\n tDate.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent e) {\n checkDate(e);\n }\n\n @Override\n public void keyPressed(KeyEvent e) {\n\n }\n\n @Override\n public void keyReleased(KeyEvent e) {\n\n }\n });\n\n tDate.addFocusListener(new FocusListener() {\n @Override\n public void focusGained(FocusEvent e) {\n if (tDate.getText().equals(\"Datum:\")) {\n tDate.setText(\"\");\n tDate.setForeground(Color.BLACK);\n }\n }\n\n @Override\n public void focusLost(FocusEvent e) {\n if (tDate.getText().isEmpty()) {\n tDate.setForeground(Color.GRAY);\n tDate.setText(\"Datum:\");\n }\n }\n });\n\n\n verbrauchDiagramm.addActionListener(actionListenerDiagramm);\n zaehlerDiagramm.addActionListener(actionListenerDiagramm);\n }", "@Override\n\tprotected void createCompButtons() {\n\t\tbtnExcelReport = new Button(getCompButtons(), SWT.NONE);\n\t\tbtnExcelReport.setText(\"Excel Report\");\n\t\tbtnExcelReport.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tbtnExcelReport\n\t\t.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(\n\t\t\t\t\torg.eclipse.swt.events.SelectionEvent e) {\n\t\t\t\tcmdExcelReportWidgetSelected();\n\t\t\t}\n\t\t});\n\t}", "void setupBars() {\n\n // ID, Horiz, Left\n bars.add(new LedBar(0, false, true));\n bars.add(new LedBar(1, true, true));\n bars.add(new LedBar(2, false, false));\n bars.add(new LedBar(3, false, true));\n bars.add(new LedBar(4, true, true));\n bars.add(new LedBar(5, true, false));\n bars.add(new LedBar(6, true, false));\n bars.add(new LedBar(7, true, false));\n bars.add(new LedBar(8, true, false));\n bars.add(new LedBar(9, true, true));\n bars.add(new LedBar(10, false, true));\n bars.add(new LedBar(11, false, false));\n bars.add(new LedBar(12, true, true));\n bars.add(new LedBar(13, false, false));\n bars.add(new LedBar(14, false, true));\n\n // hnext, hprev, vbro\n bars.get(0).setLinks(null, null, bars.get(4));\n bars.get(1).setLinks(bars.get(4), bars.get(8), bars.get(3));\n bars.get(2).setLinks(null, null, bars.get(5));\n bars.get(3).setLinks(null, null, bars.get(1));\n bars.get(4).setLinks(bars.get(9), bars.get(1), bars.get(0));\n bars.get(5).setLinks(bars.get(6), bars.get(12), bars.get(2));\n bars.get(6).setLinks(bars.get(7), bars.get(5), bars.get(11));\n bars.get(7).setLinks(bars.get(8), bars.get(6), bars.get(13));\n bars.get(8).setLinks(bars.get(1), bars.get(7), null); //Only one that hasn't got a vertical 'brother'\n bars.get(9).setLinks(bars.get(12), bars.get(4), bars.get(14));\n bars.get(10).setLinks(null, null, bars.get(12));\n bars.get(11).setLinks(null, null, bars.get(6));\n bars.get(12).setLinks(bars.get(5), bars.get(9), bars.get(10));\n bars.get(13).setLinks(null, null, bars.get(7));\n bars.get(14).setLinks(null, null, bars.get(9));\n\n verticals.add(0);\n verticals.add(2);\n verticals.add(3);\n verticals.add(10);\n verticals.add(11);\n verticals.add(13);\n verticals.add(14);\n }", "private void setBar(){\n lastBarHitId = beats.get(lastBeatHitId).getContainedIn();\n }", "protected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(barComp, BUTTON_ADD_ID, Messages.btnAddParameter, true);\n\t\tcreateButton(barComp, BUTTON_EDIT_ID, Messages.btnEditParameter, true);\n\t\tcreateButton(barComp, BUTTON_DROP_ID, Messages.btnDropParameter, true);\n\t\tcreateButton(barComp, BUTTON_UP_ID, Messages.btnUpParameter, true);\n\t\tcreateButton(barComp, BUTTON_DOWN_ID, Messages.btnDownParameter, true);\n\t\tcreateButton(parent, IDialogConstants.OK_ID, com.cubrid.common.ui.common.Messages.btnOK, true);\n\n\t\tgetButton(BUTTON_EDIT_ID).setEnabled(false);\n\t\tgetButton(BUTTON_UP_ID).setEnabled(false);\n\t\tgetButton(BUTTON_DOWN_ID).setEnabled(false);\n\t\tgetButton(BUTTON_DROP_ID).setEnabled(false);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, com.cubrid.common.ui.common.Messages.btnCancel, false);\n\t}", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, Messages.BTN_ADD,\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tMessages.BTN_FINISH, false);\r\n\t\tinitDataBindings();\r\n\t}", "public void getRegionalDistrictData(final String mRegion,final String mWeek){\n mSTKCStockOutBarRegional = new STKCStockOutBarRegional() {\n @Override\n protected void onPostExecute(String results) {\n //dialog.dismiss();\n if (!results.equalsIgnoreCase(\"error\")) {\n try {\n JSONObject obj = new JSONObject(results);\n if(obj.getString(\"status\").equalsIgnoreCase(\"ok\")) {\n\n Log.e(\"District GraphData\", \"\"+results);\n\n JSONArray res = obj.getJSONArray(\"results\");\n\n String[] drugs = new String[res.length()];\n\n for(int i= 0; i< res.length();i++){\n JSONArray array = res.getJSONArray(i);\n barEntries.add(new BarEntry(i+1, (float) array.getDouble(2)));\n barEntries1.add(new BarEntry(i+1, (float) array.getDouble(1)));\n drugs[i] = array.getString(3);\n }\n // [\"UcOzqLVFJVo\",0,0,\"Kyotera District\"]\n\n BarDataSet barDataSet = new BarDataSet(barEntries,\"Stockouts\");\n barDataSet.setColor(Color.parseColor(\"#7CB5EC\"));\n Collections.sort(barEntries, new EntryXComparator());\n BarDataSet barDataSet1 = new BarDataSet(barEntries1,\"Clients at risk(*100) -Paediatrics\");\n barDataSet1.setColors(Color.parseColor(\"#000000\"));\n Collections.sort(barEntries1, new EntryXComparator());\n\n\n BarData data = new BarData(barDataSet,barDataSet1);\n barChart.setData(data);\n\n barProg.setVisibility(View.GONE);\n\n XAxis xAxisB = barChart.getXAxis();\n xAxisB.setValueFormatter(new IndexAxisValueFormatter(drugs));\n barChart.getAxisLeft().setAxisMinimum(0);\n xAxisB.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxisB.setGranularity(1);\n xAxisB.setLabelRotationAngle(45);\n xAxisB.setCenterAxisLabels(true);\n xAxisB.setGranularityEnabled(true);\n\n barChart.setFitBars(true);\n\n float barSpace = 0.01f;\n float groupSpace = 0.1f;\n int groupCount = 12;\n\n //IMPORTANT *****\n data.setBarWidth(0.15f);\n barChart.getXAxis().setAxisMinimum(0);\n barChart.getXAxis().setAxisMaximum(0 + barChart.getBarData().getGroupWidth(groupSpace, barSpace) * groupCount);\n barChart.groupBars(0, groupSpace, barSpace); // perform the \"explicit\" grouping\n //***** IMPORTANT\n\n Log.e(\"here GraphData 2\", \"\"+res.length());\n\n\n\n }else{\n Toast.makeText(getActivity(), \"message failed!\", Toast.LENGTH_SHORT).show();\n if(dialog.isShowing()){\n dialog.dismiss();\n }\n }\n } catch (JSONException localJSONException) {\n Log.e(\"gettingjson\", localJSONException.toString());\n localJSONException.printStackTrace();\n if(dialog.isShowing()){\n dialog.dismiss();\n }\n }\n }\n }\n @Override\n protected void onPreExecute()\n {\n //dialog = ProgressDialog.show(getActivity(), \"\", \"Loading Data...\", true);\n //dialog.setCancelable(true);\n }\n\n };\n mSTKCStockOutBarRegional.execute(mRegion, mWeek);\n\n }", "public JFreeChart createChart(IntervalXYDataset paramIntervalXYDataset) {\n\n\n JFreeChart jfreechart = ChartFactory.createXYBarChart(\n \"Spread Example\", //title\n \"Resource\", //xAxisLabel\n false, //dateAxis\n \"Timing\", //yAxisLabel\n paramIntervalXYDataset, //dataset\n PlotOrientation.VERTICAL, //orientation\n true, //legend\n true, //tooltips\n false); //urls\n\n\n\n XYPlot xyplot = (XYPlot) jfreechart.getPlot();\n\n xyplot.setBackgroundPaint(Color.white);\n xyplot.setRangeGridlinePaint(Color.darkGray);//vertical\n xyplot.setDomainGridlinePaint(Color.LIGHT_GRAY);//horizontal\n\n// xyplot.setDomainAxis(createTimeAxis());\n xyplot.setDomainAxis(createSymbolAxis());\n\n xyplot.setFixedLegendItems(createLegend());\n\n MyXYBarRenderer xyBarRenderer = new MyXYBarRenderer();\n xyBarRenderer.setUseYInterval(true);\n\n xyBarRenderer.setShadowVisible(false);\n\n xyBarRenderer.setDrawBarOutline(true);\n xyBarRenderer.setBaseOutlinePaint(Color.DARK_GRAY);\n\n xyBarRenderer.setBaseItemLabelFont(new Font(\"Arial\", Font.PLAIN, 10));\n\n xyBarRenderer.setMargin(0.2);\n xyplot.setRenderer(0, xyBarRenderer, true);\n\n//xyBarRenderer.\n\n\n MyXYBarPainter barPainter = new MyXYBarPainter((XYTaskDataset) paramIntervalXYDataset);\n barPainter.setPainterType(MyXYBarPainter.PainterType.GRADIENT);\n xyBarRenderer.setBarPainter(barPainter);\n\n\n\n //Item-Label:\n xyBarRenderer.setBaseItemLabelsVisible(true);\n xyBarRenderer.setBaseItemLabelGenerator(createItemLabelGenerator());\n xyBarRenderer.setBasePositiveItemLabelPosition(createItemLabelPosition());\n\n\n\n xyBarRenderer.setBaseToolTipGenerator(createTooltipGenerator());\n\n\n\n//PeriodAxis xaxis= new PeriodAxis(\"kk\");\n\n xyplot.setRangeAxis(createTimeAxis());\n// xyplot.setRangeAxis(createSymbolAxis());\n\n\n\n// DateAxis xaxis = new DateAxis();\n// xaxis.setVerticalTickLabels(true);\n// xyplot.setRangeAxis(xaxis);\n xyplot.setRangeAxisLocation(AxisLocation.TOP_OR_LEFT);\n\n// ChartUtilities.applyCurrentTheme(jfreechart);\n\n return jfreechart;\n }", "private void createButton() {\n this.setIcon(images.getImageIcon(fileName + \"-button\"));\n this.setActionCommand(command);\n this.setPreferredSize(new Dimension(width, height));\n this.setMaximumSize(new Dimension(width, height));\n }", "public void generateBar(String path,List<Object[]> list) {\r\n\t\t\r\n\t\t//create DataSet using list\r\n\t\tDefaultCategoryDataset dataset=new DefaultCategoryDataset();\r\n\t\tfor(Object[] ob : list) {\r\n\t\t//order value, key label text\r\n\t\tdataset.setValue(new Double(ob[1].toString()), ob[0].toString(), \"UomType Details\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//2.convert to JFreeChart using chartFactory\r\n\t\tJFreeChart chart=ChartFactory.createBarChart(\"UomType\", \"uomTypes\", \"count\", dataset);\r\n\t\t\r\n\t\t//3.save as Image using charts\r\n\t\ttry {\r\n\t\t\tChartUtils.saveChartAsJPEG(new File(path+\"/resources/images/UomTypetBar.jpg\"), chart, 300, 300);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tint month;\n\t\tdouble maxtempereture,monthlytempereture,mintempereture;\n\t\tResultSet rs;\n\t\tlib.MySQL mysql = new lib.MySQL();\n\t\trs = mysql.selectAll();\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\ttry{\n\t\t\twhile(rs.next()){\n\t\t\t\tmonth = rs.getInt(\"Month\");\n\t\t\t\tmaxtempereture = rs.getDouble(\"MaxTempereture\");\n\t\t\t\tmonthlytempereture = rs.getDouble(\"MonthkyTempereture\");\n\t\t\t\tmintempereture = rs.getDouble(\"MinTempereture\");\n System.out.println(\"月:\" + month);\n System.out.println(\"最高気温:\" + maxtempereture);\n System.out.println(\"月間平均気温:\" + monthlytempereture);\n System.out.println(\"最低気温:\" + mintempereture);\n data.addValue(maxtempereture,\"MaxTempereture\",month+\"\");\n data.addValue(monthlytempereture,\"MonthlyTempereture\",month+\"\");\n data.addValue(mintempereture,\"MinTempereture\",month+\"\");\n\t\t }\n\t\t}catch(SQLException et){}\n\t\t JFreeChart chart = \n\t\t\t ChartFactory.createLineChart(\"TOKYO TEMPERETURE\",\n\t\t\t \"month\",\n\t\t\t \"tempereture\",\n\t\t\t data,\n\t\t\t PlotOrientation.VERTICAL,\n\t\t\t true,\n\t\t\t false,\n\t\t\t false);\n \n\n ChartPanel cpanel = new ChartPanel(chart);\n panel1.add(cpanel);\n cardlayout.next(this);\n\t}", "private void setupDailyBarChart() {\r\n BarChart chart = findViewById(R.id.chart);\r\n chart.getDescription().setEnabled(false);\r\n chart.setExtraOffsets(0, 0, 0, 10);\r\n chart.setNoDataText(getResources().getString(R.string.loading_graph));\r\n chart.getPaint(Chart.PAINT_INFO).setTextSize(Utils.convertDpToPixel(16f));\r\n chart.getLegend().setEnabled(false);\r\n\r\n // Show time on x-axis at three hour intervals\r\n XAxis xAxis = chart.getXAxis();\r\n xAxis.setValueFormatter(new IAxisValueFormatter() {\r\n @Override\r\n public String getFormattedValue(float value, AxisBase axis) {\r\n int valueInt = (int) value;\r\n if(valueInt == 0) {\r\n return \"12am\";\r\n } else if(valueInt > 0 && valueInt < 12) {\r\n return valueInt + \"am\";\r\n } else if(valueInt == 12) {\r\n return \"12pm\";\r\n } else {\r\n return (valueInt - 12) + \"pm\";\r\n }\r\n }\r\n });\r\n\r\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\r\n xAxis.setDrawGridLines(false);\r\n xAxis.setTextSize(14f);\r\n // show label for every three hours\r\n xAxis.setGranularity(3.0f);\r\n xAxis.setLabelCount(8);\r\n xAxis.setGranularityEnabled(true);\r\n\r\n // Show non-sedentary hours on left y-axis\r\n YAxis yAxisLeft = chart.getAxisLeft();\r\n yAxisLeft.setAxisMinimum(0f);\r\n yAxisLeft.setTextSize(14f);\r\n yAxisLeft.setGranularity(1.0f); // show integer values on y axis\r\n yAxisLeft.setGranularityEnabled(true);\r\n\r\n YAxis yAxisRight = chart.getAxisRight();\r\n yAxisRight.setEnabled(false);\r\n }", "@FXML\n\tprivate void handleSenButtonCH0(){\n\t\tif(senButtonCH0.isSelected()){\n\t\t\t//draw the chart\n\t\t\tchartDrawer.drawSin();\n\t\t\tdutyFieldCH0.setDisable(false);\n\t\t\tdutyLabelCH0.setText(\"Fase\");\n\t\t\tdutyUnitLabelCH0.setText(\"Grau\");\n\t\t}\n\t\telse{\n\t\t\tchartDrawer.clear();\n\t\t}\n\t}", "private BarChart.Options getOptions() {\n\t\tBarChart.Options options = BarChart.Options.create();\n\t\toptions.set3D(raised);\n\t\tif (label != null){options.setTitle(label);}\n\t\treturn options;\n\t}", "public void SetBarChartImage(String bar) {\n\t\tboolean test = true;\n\t\t\n\t\tif((bar.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"SetBarChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((bar.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"SetBarChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"SetBarChartImage():: chosen image is set to: \" \n\t\t \t+ bar);\n\t\t}\n\t\tm_BarChartImage = bar;\n\t}", "private void createBottomButtons() {\n // Create a composite that will contain the control buttons.\n Composite bottonBtnComposite = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(3, true);\n gl.horizontalSpacing = 10;\n bottonBtnComposite.setLayout(gl);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n bottonBtnComposite.setLayoutData(gd);\n\n // Create the Interpolate button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n interpolateBtn = new Button(bottonBtnComposite, SWT.PUSH);\n interpolateBtn.setText(\"Interpolate\");\n interpolateBtn.setLayoutData(gd);\n interpolateBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorData upperColorData = upperColorWheel.getColorData();\n ColorData lowerColorData = lowerColorWheel.getColorData();\n\n colorBar.interpolate(upperColorData, lowerColorData, rgbRdo\n .getSelection());\n undoBtn.setEnabled(true);\n updateColorMap();\n }\n });\n\n // Create the Undo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n undoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n undoBtn.setText(\"Undo\");\n undoBtn.setEnabled(false);\n undoBtn.setLayoutData(gd);\n undoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n undoBtn.setEnabled(colorBar.undoColorBar());\n updateColorMap();\n redoBtn.setEnabled(true);\n }\n });\n\n // Create the Redo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n redoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n redoBtn.setText(\"Redo\");\n redoBtn.setEnabled(false);\n redoBtn.setLayoutData(gd);\n redoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n redoBtn.setEnabled(colorBar.redoColorBar());\n updateColorMap();\n undoBtn.setEnabled(true);\n }\n });\n\n // Create the Revert button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n revertBtn = new Button(bottonBtnComposite, SWT.PUSH);\n revertBtn.setText(\"Revert\");\n revertBtn.setLayoutData(gd);\n revertBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n colorBar.revertColorBar();\n updateColorMap();\n undoBtn.setEnabled(false);\n redoBtn.setEnabled(false);\n }\n });\n\n // Create the Save button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n saveBtn = new Button(bottonBtnComposite, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n if( seldCmapName == null ) {\n saveBtn.setEnabled(false);\n }\n \n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorMap cm = (ColorMap) cmapParams.getColorMap();\n seldCmapName = selCmapCombo.getText();\n \n// int sepIndx = seldCmapName.indexOf(File.separator);\n// String cmapCat = seldCmapName.substring(0,seldCmapName.indexOf(File.separator));\n// String cmapName = seldCmapName.substring( seldCmapName.indexOf(File.separator));\n if (lockedCmaps != null && lockedCmaps.isLocked(seldCmapName)) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists and is locked.\\n\\n\" +\n \t\t\t\"You cannot overwrite it.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tconfirmDlg.open();\n \tcolorBar.undoColorBar();\n updateColorMap();\n \treturn;\n } \n else if( ColorMapUtil.colorMapExists( seldCmapCat, seldCmapName ) ) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists.\\n\\n\" +\n \t\t\t\"Do you want to overwrite it?\",\n \t\t\tMessageDialog.QUESTION, new String[]{\"Yes\", \"No\"}, 0);\n \tconfirmDlg.open();\n\n \tif( confirmDlg.getReturnCode() == MessageDialog.CANCEL ) {\n \t\treturn;\n \t}\n }\n\n try {\n ColorMapUtil.saveColorMap( cm, seldCmapCat, seldCmapName );\n \n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Colormap Saved\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" Saved.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n } catch (VizException e) {\n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Error\", null, \n \t\t\t\"Error Saving Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\"\\n\"+e.getMessage(),\n \t\t\tMessageDialog.ERROR, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n }\n\n completeSave();\n }\n });\n\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.grabExcessHorizontalSpace = false;\n deleteBtn = new Button(bottonBtnComposite, SWT.PUSH);\n deleteBtn.setText(\"Delete\");\n deleteBtn.setLayoutData(gd);\n deleteBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tdeleteColormap();\n }\n });\n Label sep = new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n sep.setLayoutData(gd);\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.HORIZONTAL_ALIGN_END);\n Button closeBtn = new Button(shell, SWT.PUSH);\n closeBtn.setText(\" Close \");\n closeBtn.setLayoutData(gd);\n closeBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tshell.dispose();\n }\n });\n }", "@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)\n @Override\n public void onResponse(String response) {\n Log.d(\"Response\",response);\n\n if(!response.matches(\"\")){\n\n try {\n JSONObject jsonObject=new JSONObject(response.trim());\n if(jsonObject.has(\"open_observence\")){\n JSONArray jsonArray=new JSONArray();\n jsonArray=jsonObject.getJSONArray(\"open_observence\");\n for(int i=0;i<jsonArray.length();i++){\n JSONObject openstatisticsObject=jsonArray.getJSONObject(i);\n openStatistics=openstatisticsObject.getString(\"open_observence\");\n\n }\n }\n if(jsonObject.has(\"closed_observence\")){\n JSONArray jsonArrayClosedStatistics=new JSONArray();\n jsonArrayClosedStatistics=jsonObject.getJSONArray(\"closed_observence\");\n for(int i=0;i<jsonArrayClosedStatistics.length();i++){\n JSONObject closedstatisticsObject=jsonArrayClosedStatistics.getJSONObject(i);\n closedStatistics=closedstatisticsObject.getString(\"open_observence\");\n\n }\n }\n\n typeOfObservation=new ArrayList();\n noOfObservations=new ArrayList();\n\n /* tv_open_observations.setText(openStatistics);\n tv_closed_observations.setText(closedStatistics);*/\n int totalOpeservation=Integer.parseInt(openStatistics)+Integer.parseInt(closedStatistics);\n noOfObservations.add(new BarEntry(Float.valueOf(openStatistics), 0));\n noOfObservations.add(new BarEntry(Float.valueOf(closedStatistics), 1));\n noOfObservations.add(new BarEntry(Float.valueOf(totalOpeservation), 2));\n typeOfObservation.add(\"Opened\");\n typeOfObservation.add(\"Closed\");\n typeOfObservation.add(\"Total\");\n\n BarDataSet bardataset = new BarDataSet(noOfObservations, \"\");\n chart.animateY(5000);\n chart.getLegend().setEnabled(false);\n chart.setDescription(\"\");\n BarData data1 = new BarData(typeOfObservation, bardataset);\n bardataset.setColors(COLORFUL_COLORS);\n chart.setData(data1);\n\n tv_totl_observations.setText(String.valueOf(totalOpeservation));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }else {\n\n openStatistics=\"0\";\n closedStatistics=\"0\";\n\n\n }\n\n layout_progress.setVisibility(View.GONE);\n\n }", "@Override\r\n public boolean isBar ()\r\n {\r\n return ShapeSet.Barlines.contains(getShape());\r\n }", "private static JFreeChart createChart(CategoryDataset dataset) {\n\t\t//the title of the chart depending of the attributes chosen by the user\n\t\tif (queryNumber==0) {domainLabel=\"Per day\";}\n\t\telse if (queryNumber==1) {domainLabel=\"Per hour\";}\n\t\telse if (queryNumber==2) {domainLabel=\"Per minute\";}\n\t\t\n\t\t// setting the title \n\t\tString rangeLabel=\"Average (ms)\";\n\t\t// create the chart...\n\t\tJFreeChart chart = ChartFactory.createBarChart(\n\t\t\t\t\"Static\", // chart title\n\t\t\t\tdomainLabel, // domain axis label\n\t\t\t\trangeLabel, // range axis label\n\t\t\t\tdataset, // data\n\t\t\t\tPlotOrientation.VERTICAL, // orientation\n\t\t\t\tfalse, // include legend\n\t\t\t\ttrue, // tooltips\n\t\t\t\tfalse // URLs\n\t\t\t\t);\n\t\t\n\t\t//setting the title preferences and format\n\t\tchart.getTitle().setFont(fontStatic);\n\t\tchart.getTitle().setPaint(Color.red);\n\t\tchart.setBackgroundPaint(Color.white);\n\t\tCategoryPlot plot = chart.getCategoryPlot();\n\t\tplot.setBackgroundPaint(Color.lightGray);\n\t\tplot.setDomainGridlinePaint(Color.white);\n\t\tplot.setDomainGridlinesVisible(true);\n\t\tplot.setRangeGridlinePaint(Color.white);\n\t\tfinal NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();\n\t\tchart.getCategoryPlot().getRangeAxis().setLabelPaint(Color.RED);\n\t\tchart.getCategoryPlot().getDomainAxis().setLabelPaint(Color.RED);\n\t\trangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n\t\tBarRenderer renderer = (BarRenderer) plot.getRenderer();\n\t\trenderer.setDrawBarOutline(false);\n\t\tfor (int i =0;i<25;i++) renderer.setSeriesPaint(i, Color.BLUE);\n\t\treturn chart;\n\t}", "protected void addActivePathToolbarButton ()\n {\n\n }", "public void buttonPressed(){\r\n\t\tsetBorder(new BevelBorder(10));\r\n\t}" ]
[ "0.7226075", "0.6733233", "0.6721418", "0.66860205", "0.66304135", "0.6577667", "0.6477899", "0.64545876", "0.64145184", "0.6371027", "0.62964815", "0.6255156", "0.6230372", "0.61813056", "0.6139216", "0.6131611", "0.6104353", "0.60926944", "0.60852545", "0.60384303", "0.60349214", "0.6026596", "0.5999442", "0.5999081", "0.5998289", "0.59798914", "0.59515285", "0.5938984", "0.5905038", "0.5878985", "0.58556765", "0.5839595", "0.5835813", "0.57972306", "0.5793021", "0.57891476", "0.5771876", "0.5760858", "0.573762", "0.571283", "0.5706041", "0.5704827", "0.56973654", "0.56856245", "0.56803286", "0.5675263", "0.56676316", "0.5652152", "0.56516683", "0.5638671", "0.5637699", "0.5636244", "0.5629866", "0.5624424", "0.5610771", "0.5598563", "0.5598511", "0.55941975", "0.55940664", "0.55940664", "0.55936754", "0.5572762", "0.5559759", "0.55505174", "0.554801", "0.55432105", "0.5539543", "0.5523115", "0.55185914", "0.5505537", "0.5505443", "0.55050784", "0.5501232", "0.5491494", "0.54844195", "0.54802203", "0.5463826", "0.546008", "0.5450679", "0.54495144", "0.5449348", "0.5446908", "0.5444847", "0.5439605", "0.5430517", "0.54268295", "0.542465", "0.5423726", "0.54229003", "0.5422579", "0.54193586", "0.54177624", "0.5414264", "0.5411975", "0.54113865", "0.54017013", "0.53969985", "0.53913987", "0.53874385", "0.5385779" ]
0.8019132
0
Makes the 3D Bar Chart button
public void MakeBar3D() { BarButton3D = new JButton( new ImageIcon(getClass().getResource( Get3DBarChartImage()))); BarButton3D.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { GetHost().instructionText.setVisible(false); GetHost().ExportEnabled(); if(GetHost().GetTitle() == UNSET) { GetHost().LeftPanelContent(new BarChart3D( GetHost().GetGraphData(), "3D Bar Chart", GetHost().GetColourScheme(),GetHost())); }else { GetHost().LeftPanelContent(new BarChart3D( GetHost().GetGraphData(), GetHost().GetTitle(), GetHost().GetColourScheme(),GetHost())); } } }); ChartTypeInterface.add(BarButton3D); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void MakeBar() {\n\t\tBarButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(GetBarChartImage())));\t\n\t\tBarButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Bar chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BarButton);\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\t \n\t\t for(int g = 0;g<i;g++){\n\t\t String s = String.valueOf(datas[1][g]);\n\t\t data.addValue(this.datas[2][g], this.name[g], s);\n\t\t }\n\t\t \n\t\t if(e.getSource() == button1){\n\t\t JFreeChart chart = ChartFactory.createLineChart(\"Import Volume\",\n\t\t \"Year\",\n\t\t \"Ton\",\n\t\t data,\n\t\t PlotOrientation.VERTICAL,\n\t\t true,\n\t\t false,\n\t\t false);\n\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t add(cpanel, BorderLayout.CENTER);\n\t\t setVisible(true);\n\t\t } else if(e.getSource() == button2){\n\t\t\t JFreeChart chart = ChartFactory.createBarChart(\"Import Volume\",\n \"Year\",\n \"Ton\",\n data,\n PlotOrientation.VERTICAL,\n true,\n false,\n false);\n\t\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t\t add(cpanel, BorderLayout.CENTER);\n\t\t\t setVisible(true);\n} \n\n\t\t\n\t}", "public Scene createBarChart3DScene(List<Series<Number,Number>> data) {\n\t\tGroup group = new Group();\n\t\tScene scene = new Scene(group, sceneWidth, sceneHeight, true, SceneAntialiasing.BALANCED);\n\t\tscene.setFill(Color.WHITE);\n\t\tCamera camera = createCamera();\n\t\tscene.setCamera(camera);\n\n\t\tgroup.getChildren().add(createChildren(data));\n\n\t\tscene.addEventHandler(MouseEvent.ANY, event -> {\n\t\t\tmouseHandler(group, event);\n\t\t});\n\t\taddMouseWheelControl(scene, group);\n\t\treturn scene;\n\t}", "public void MakeBubble() {\n\t\tBubbleButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetBubbleChartImage())));\n\t\tBubbleButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetColumns().length >= 3){\n\t\t\t\t\t\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\tGetHost().LeftPanelContent(new BubbleChart(\n\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\"Bubble Chart\", \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost()));\n\t\t\t\t\t}else {\n\t\t\t\t\t\tGetHost().LeftPanelContent(new BubbleChart(\n\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost()));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"You must have three columns selected to use this chart\", \n\t\t\t\t\t\"Bubble Chart Format\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BubbleButton);\n\t}", "private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n\n JTable curTable = jTable1;\n Curpan = jPanel3;\n\n if (jCheckBox1.isSelected()) {\n int succ = curTable.getRowCount();\n Cloud cloud = new Cloud();\n JPanel panel = new JPanel();\n panel.setLayout(new MigLayout(\"wrap 7\"));\n for (int i = 0; i < succ; i++) {\n for (int j = 0; j < Integer.parseInt(curTable.getModel().getValueAt(i, 1).toString()); j++) {\n cloud.addTag(curTable.getModel().getValueAt(i, 0).toString());\n }\n }\n for (Tag tag : cloud.tags()) {\n final JLabel label = new JLabel(tag.getName());\n label.setOpaque(false);\n label.setFont(label.getFont().deriveFont((float) tag.getWeight() * 10));\n panel.add(label);\n }\n // panel.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\n Curpan.removeAll();\n Curpan.revalidate();\n panel.setSize(300, 300);\n Curpan.setLayout(new BorderLayout());\n Curpan.add(panel, BorderLayout.CENTER);\n Curpan.revalidate();\n panel.setVisible(true);\n Curpan.setVisible(true);\n\n } else {\n int succ = curTable.getRowCount();\n final DefaultCategoryDataset dataset = new DefaultCategoryDataset();\n for (int i = 0; i < succ; i++) {\n dataset.addValue(i, curTable.getModel().getValueAt(i, 0).toString(), curTable.getModel().getValueAt(i, 1).toString());\n }\n JFreeChart barChart = ChartFactory.createBarChart(\n \"\",\n \"frequency\",\n \"count\",\n dataset,\n PlotOrientation.VERTICAL,\n true, true, false);\n ChartPanel chartPanel = new ChartPanel(barChart);\n chartPanel.setPreferredSize(new java.awt.Dimension(300, 300));\n\n Curpan.removeAll();\n Curpan.revalidate();\n Curpan.setLayout(new BorderLayout());\n Curpan.add(chartPanel, BorderLayout.CENTER);\n Curpan.revalidate();\n chartPanel.setVisible(true);\n Curpan.setVisible(true);\n\n }\n }", "public void MakeStacked() {\n\t\tStackedButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetStackedAreaChartImage())));\n\t\tStackedButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Stacked Area Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(StackedButton);\n\t}", "public void actionPerformed(ActionEvent ae)\n\t{\n\t\tif(ae.getSource()==ok)//ae.getActionCommand().equals(\" OK \")) // pie chart\n\t\t{\n\t\t\tif(!processTitles())\n\t\t\t\treturn;\n\t\t\tif(type==0)\n\t\t\t{\n\t\t\t\tvalues=ws.buildBarChart();\n\t\t\t\tif(values.length>15)\n\t\t\t\t{\n\t\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\t\tString checkRange1 = wordBundle.getString(\"checkRange1\");\n\t\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\t\tint select = map.showDialog(map,\"checkRange1\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tws.buildPieChart(titles,xvalues,map);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(type==1) // vertical bar chart\n\t\t\t{\n\t\t\t\tvalues=ws.buildBarChart();\n\t\t\t\tif(checkDataValidity(values))\n\t\t\t\t{\n\t\t\t\t\tif(values.length>10)\n\t\t\t\t\t{\n\t\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\t\tString checkRange = wordBundle.getString(\"checkRange\");\n\t\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\t\tint select = map.showDialog(map,\"checkRange\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tJFrame bcV =new barChartV(map,values,titles,xvalues);\n\t\t\t\t\t\tbcV.repaint();\n\t\t\t\t\t\tbcV.validate();\n\t\t\t\t\t\tbcV.show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"Chart can not be drawn\");\n\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\tString DataCheck = wordBundle.getString(\"DataCheck\");\n\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\tint select = map.showDialog(map,\"DataCheck\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(type==2)//horizontal bar chart\n\t\t\t{\n\t\t\t\tvalues=ws.buildBarChart();\n\t\t\t\t//arrValue av=new arrValue();\n\t\t\t\t//av.selValues=values;\n\t\t\t\tif(checkDataValidity(values))\n\t\t\t\t{\n\t\t\t\t\tif(values.length>10)\n\t\t\t\t\t{\n\t\t\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\t\t\tString checkRange = wordBundle.getString(\"checkRange\");\n\t\t\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\t\t\tint select = map.showDialog(map,\"checkRange\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tJFrame bcH =new barChartH(map,values,titles,xvalues);\n\t\t\t\t\t\tbcH.repaint();\n\t\t\t\t\t\tbcH.validate();\n\t\t\t\t\t\tbcH.show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\tString DataCheck = wordBundle.getString(\"DataCheck\");\n\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\tint select = map.showDialog(map,\"DataCheck\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tsetVisible(false);\n\t\t}\n\t\telse if(ae.getSource()==cancel)//getActionCommand().equals(\"CANCEL\"))\n\t\t\tsetVisible(false);\n\n\t}", "public SketchBarChart() {\n super(\"bar_sketch\");\n }", "@Override\n public void init() throws Exception {\n Mapper mapper = new Mapper() {\n public double f(double x, double y) {\n try {\n return i3d.evaluate(x, y);\n } catch (InterpolationException e) {\n e.printStackTrace();\n return 0;\n }\n }\n };\n \n // Define range and precision for the function to plot\n Range rangeX = new Range((float)i3d.lowerA(), (float)i3d.upperA());\n int stepsX = 100;\n Range rangeY = new Range((float)i3d.lowerB(), (float)i3d.upperB());\n int stepsY = 100;\n \n AbstractDrawable drawable;\n // Create the object to represent the surface\n final Shape surface = Builder.buildOrthonormal(new OrthonormalGrid(rangeX, stepsX, rangeY, stepsY), mapper);\n surface.setColorMapper(new ColorMapper(new ColorMapRainbow(),\n surface.getBounds().getZmin(), surface.getBounds().getZmax(), COLOR_BASE));\n surface.setWireframeDisplayed(true);\n surface.setWireframeWidth(1);\n surface.setWireframeColor(COLOR_WIRE);\n surface.setFaceDisplayed(true);\n drawable = surface;\n \n // Create a chart\n chart = AWTChartComponentFactory.chart(Quality.Advanced);\n chart.getAxeLayout().setXTickRenderer(new FixedDecimalTickRenderer(1));\n chart.getAxeLayout().setYTickRenderer(new FixedDecimalTickRenderer(1));\n chart.getAxeLayout().setZTickRenderer(new FixedDecimalTickRenderer(1));\n chart.getAxeLayout().setFaceDisplayed(false);\n chart.getAxeLayout().setMainColor(COLOR_MAIN);\n chart.getView().setBackgroundColor(COLOR_BG);\n chart.getScene().getGraph().add(drawable);\n \n chart.getAxeLayout().setXAxeLabel(\"Length\");\n chart.getAxeLayout().setYAxeLabel(\"Time\");\n chart.getAxeLayout().setZAxeLabel(\"Temperature\");\n }", "public void init() {\n setLayout(new GridLayout(n-1, n));\n setFont(new Font(\"SansSerif\", Font.BOLD, 24));\n \n // Baris 1\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"Bksp\",Color.red));\n add(makeButton(\"CE\",Color.red));\n add(makeButton(\"X\",Color.red));\n \n // Baris 2\n add(makeButton(\"MC\",Color.red));\n add(new Button(\"7\"));\n add(new Button(\"8\"));\n add(new Button(\"9\"));\n add(new Button(\"/\"));\n add(new Button(\"sqrt\"));\n \n // Baris 3\n add(makeButton(\"MR\",Color.red));\n add(new Button(\"4\"));\n add(new Button(\"5\"));\n add(new Button(\"6\"));\n add(new Button(\"x\"));\n add(new Button(\"%\"));\n \n // Baris 4\n add(makeButton(\"MR\",Color.red));\n add(new Button(\"1\"));\n add(new Button(\"2\"));\n add(new Button(\"3\"));\n add(new Button(\"-\"));\n add(new Button(\"1/x\"));\n\n // Baris 5\n add(makeButton(\"M+\",Color.red));\n add(new Button(\"0\"));\n add(new Button(\"+/-\"));\n add(new Button(\".\"));\n add(new Button(\"+\"));\n add(new Button(\"=\"));\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n btn_stat.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent event) {\r\n ReclamationService rs=new ReclamationService();\r\n int a=0;int b=0;int c=0;\r\n try {\r\n a=rs.getNombre(\"traitee\");\r\n b= rs.getNombre(\" en cours \");\r\n // c= rs.getNombre(\"En maintenance\");\r\n } catch (SQLException ex) {\r\n Logger.getLogger(StatisquereclamationController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n DefaultCategoryDataset dataset=new DefaultCategoryDataset();\r\n dataset.setValue(a, \"statut\", \"traitee\");\r\n dataset.setValue(b, \"statut\", \" en cours\");\r\n // dataset.setValue(c, \"equipements\", \"en maintenance\");\r\n JFreeChart chart=ChartFactory.createBarChart3D(\"statut de reclamation \", \"etat\", \"nombres\", dataset);\r\n chart.setBackgroundPaint(Color.YELLOW);\r\n chart.getTitle().setPaint(Color.red);\r\n CategoryPlot p=chart.getCategoryPlot();\r\n p.setRangeGridlinePaint(Color.BLUE);\r\n ChartFrame frame=new ChartFrame(\"bar de reclamation\",chart);\r\n frame.setVisible(true);\r\n frame.setSize(450, 350);\r\n System.out.println(a);\r\n System.out.println(b);\r\n\r\n }\r\n });\r\n btn_stat1.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent event) {\r\n ReclamationService rs=new ReclamationService();\r\n int a=0;int b=0;int c =0;\r\n try {\r\n \r\n a=rs.Afficher_listcat(Integer.parseInt(tx_id_patissier.getText()));\r\n b=rs.NombreRec();\r\n c=a/b;\r\n // c= rs.getNombre(\"En maintenance\");tx_id_patissier.getText()\r\n } catch (SQLException ex) {\r\n Logger.getLogger(StatisquereclamationController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n DefaultCategoryDataset dataset=new DefaultCategoryDataset();\r\n dataset.setValue(a, \"taux de reclamation\", \"Patissier n°\"+tx_id_patissier.getText());\r\n \r\n // dataset.setValue(c, \"equipements\", \"en maintenance\");\r\n JFreeChart chart=ChartFactory.createBarChart3D(\"Statistique de patissier\", \"patissier\", \"nombres\", dataset);\r\n chart.setBackgroundPaint(Color.YELLOW);\r\n chart.getTitle().setPaint(Color.red);\r\n CategoryPlot p=chart.getCategoryPlot();\r\n p.setRangeGridlinePaint(Color.BLUE);\r\n ChartFrame frame=new ChartFrame(\"bar de reclamation\",chart);\r\n frame.setVisible(true);\r\n frame.setSize(450, 350);\r\n System.out.println(a);\r\n \r\n }\r\n });\r\n\r\n }", "private void createSolveButton(final ToolBar bar) {\r\n // image's source:\r\n // http://pixabay.com/de/puzzle-st%C3%BCck-stichs%C3%A4ge-konzept-308908/\r\n createButton(bar, \"images/puzzle-308908_640.png\", \"Solve\",\r\n new SolveSelectionListener());\r\n }", "JFreeChart generateBox();", "private void initialize() {\r\n\t\t//frame = new JFrame();\r\n\t\tframe.setSize(725, 482);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t//frame.getContentPane().setLayout(null);\r\n\t\t\r\n\t\t\r\n\t\tDefaultCategoryDataset dataset= new DefaultCategoryDataset();\r\n\t\t//JOptionPane.showMessageDialog(null, \"BUTTON CLICKED!!!\");\r\n\t\t//LableMessage.setText(\"BUTTON CLICKED!!!\");\r\n\t\t\r\n\t\t//Pain, Drowsiness, Nausea, Anxiety, and Depression\r\n\t\tdataset.setValue(2, \"day1\",\"Pain\");\r\n\t\tdataset.setValue(5, \"day2\",\"Pain\");\r\n\t\tdataset.setValue(4, \"day3\",\"Pain\");\r\n\t\tdataset.setValue(6, \"day1\", \"Drowsiness\");\r\n\t\tdataset.setValue(10, \"day2\", \"Drowsiness\");\r\n\t\tdataset.setValue(8, \"day3\", \"Drowsiness\");\r\n\t\tdataset.setValue(1, \"day1\", \"Nausea\");\r\n\t\tdataset.setValue(7, \"day2\", \"Nausea\");\r\n\t\tdataset.setValue(5, \"day3\", \"Nausea\");\r\n\t\tdataset.setValue(3,\"day1\",\"Anxiety\");\t\r\n\t\tdataset.setValue(8,\"day2\",\"Anxiety\");\r\n\t\tdataset.setValue(9,\"day3\",\"Anxiety\");\r\n\t\tdataset.setValue(8, \"day1\", \"Depression\");\r\n\t\tdataset.setValue(7, \"day2\", \"Depression\");\r\n\t\tdataset.setValue(9, \"day3\", \"Depression\");\r\n\t\tint test[] = new int[7];\r\n\t\tfor (int i=0;i<7; i++)\r\n\t\t{\r\n\t\t\ttest[i]=5;\r\n\t\t}\r\n\t\tDefaultCategoryDataset dataset2= new DefaultCategoryDataset();\r\n\t\t//dataset2 = dataSetInit(P1.getEnterSymptomLevel(),P1.getPreviousSymptomLevel1(),P1.getPreviousSymptomLevel2());\r\n\t\tdataset2 = dataSetInit(test,test,test);\r\n\t\t//P1.getEnter\r\n\t\t//DefaultCategoryDataset dataset2= new DefaultCategoryDataset();\r\n\r\n\t\t//JFreeChart chart= ChartFactory.createBarChart(P1.firstName+\" \"+P1.lastName,\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\r\n\t\tJFreeChart chart= ChartFactory.createBarChart3D(\"Symptom Report\",\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,true,true,true);\r\n\t\t//JFreeChart chart2= ChartFactory.createBarChart(\"Symptom Report\",\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\t\tchart.setBackgroundPaint(Color.lightGray);\r\n\t\t//JFreeChart chart2= ChartFactory.createBarChart(\"Grade Report\",\"Student Name\", \"Marks\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\t\t\r\n\t\tChartPanel chartPanel = new ChartPanel(chart);\r\n\t\tchartPanel.setPreferredSize(new Dimension(700,350));\r\n\t\tPan.add(chartPanel);\r\n\t\t\r\n\t\tframe.getContentPane().add(Pan);\r\n\t\tCategoryPlot p=chart.getCategoryPlot();\r\n\t\tp.setRangeGridlinePaint(Color.red);\r\n\t\tp.setBackgroundPaint(Color.WHITE);\r\n\t\tframe.setVisible(true);\r\n//\t\tChartFrame frame= new ChartFrame(\"Bar Graph Test\",chart,false);\r\n//\t\t\r\n//\t\tframe.setVisible(true);\r\n//\t\tframe.setSize(700,350);\r\n//\t\tframe.setResizable(false);\r\n\t\t//frame2 =new JFrame()\r\n\t}", "public TransparencyDemo() {\r\n super();\r\n view3DButton.addItemListener(this);\r\n drawBehindButton.addItemListener(this);\r\n transparencySlider.addChangeListener(this);\r\n }", "public LecturerBarChart() {\n initComponents();\n }", "public void showBarChart() {\r\n\r\n // Count classes\r\n int neutralCountPred = 0;\r\n int negativeCountPred = 0;\r\n int positiveCountPred = 0;\r\n\r\n int neutralCountAnsw = 0;\r\n int negativeCountAnsw = 0;\r\n int positiveCountAnsw = 0;\r\n\r\n for(Integer pred : predictions.values()) {\r\n switch (pred.intValue()) {\r\n case 0:\r\n negativeCountPred++;\r\n break;\r\n case 1:\r\n neutralCountPred++;\r\n break;\r\n case 2:\r\n positiveCountPred++;\r\n break;\r\n default:\r\n System.err.println(\"Illegal class index\");\r\n break;\r\n }\r\n }\r\n System.out.printf(\"PREDICTED \\nnegativeCountPred = %d, neutralCountPred = %d, positiveCountPred = %d\", negativeCountPred,\r\n neutralCountPred, positiveCountPred);\r\n\r\n for(Integer answer : rightAnswers.values()) {\r\n switch (answer.intValue()) {\r\n case 0:\r\n negativeCountAnsw++;\r\n break;\r\n case 1:\r\n neutralCountAnsw++;\r\n break;\r\n case 2:\r\n positiveCountAnsw++;\r\n break;\r\n default:\r\n System.err.println(\"Illegal class index\");\r\n break;\r\n }\r\n }\r\n System.out.printf(\"\\nRIGHT ANSWERS \\nnegativeCountAnsw = %d, neutralCountAnsw = %d, positiveCountAnsw = %d\", negativeCountAnsw,\r\n neutralCountAnsw, positiveCountAnsw);\r\n\r\n // Predicted classes\r\n XYChart.Series<String, Number> dataSeries1 = new XYChart.Series();\r\n dataSeries1.setName(\"Predicted\");\r\n dataSeries1.getData().add(new XYChart.Data(\"Neutral\", neutralCountPred));\r\n dataSeries1.getData().add(new XYChart.Data(\"Positive\", positiveCountPred));\r\n dataSeries1.getData().add(new XYChart.Data(\"Negative\", negativeCountPred));\r\n resultChart.getData().add(dataSeries1);\r\n\r\n // Predicted classes\r\n XYChart.Series<String, Number> dataSeries2 = new XYChart.Series();\r\n dataSeries2.setName(\"Right answers\");\r\n dataSeries2.getData().add(new XYChart.Data(\"Neutral\", neutralCountAnsw));\r\n dataSeries2.getData().add(new XYChart.Data(\"Positive\", positiveCountAnsw));\r\n dataSeries2.getData().add(new XYChart.Data(\"Negative\", negativeCountAnsw));\r\n resultChart.getData().add(dataSeries2);\r\n\r\n }", "public void button3Pushed(ActionEvent event)\r\n {\n GraphicsContext gc = canvas.getGraphicsContext2D();\r\n \r\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n \r\n \r\n }", "private void createBottomButtons() {\n // Create a composite that will contain the control buttons.\n Composite bottonBtnComposite = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(3, true);\n gl.horizontalSpacing = 10;\n bottonBtnComposite.setLayout(gl);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n bottonBtnComposite.setLayoutData(gd);\n\n // Create the Interpolate button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n interpolateBtn = new Button(bottonBtnComposite, SWT.PUSH);\n interpolateBtn.setText(\"Interpolate\");\n interpolateBtn.setLayoutData(gd);\n interpolateBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorData upperColorData = upperColorWheel.getColorData();\n ColorData lowerColorData = lowerColorWheel.getColorData();\n\n colorBar.interpolate(upperColorData, lowerColorData, rgbRdo\n .getSelection());\n undoBtn.setEnabled(true);\n updateColorMap();\n }\n });\n\n // Create the Undo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n undoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n undoBtn.setText(\"Undo\");\n undoBtn.setEnabled(false);\n undoBtn.setLayoutData(gd);\n undoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n undoBtn.setEnabled(colorBar.undoColorBar());\n updateColorMap();\n redoBtn.setEnabled(true);\n }\n });\n\n // Create the Redo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n redoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n redoBtn.setText(\"Redo\");\n redoBtn.setEnabled(false);\n redoBtn.setLayoutData(gd);\n redoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n redoBtn.setEnabled(colorBar.redoColorBar());\n updateColorMap();\n undoBtn.setEnabled(true);\n }\n });\n\n // Create the Revert button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n revertBtn = new Button(bottonBtnComposite, SWT.PUSH);\n revertBtn.setText(\"Revert\");\n revertBtn.setLayoutData(gd);\n revertBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n colorBar.revertColorBar();\n updateColorMap();\n undoBtn.setEnabled(false);\n redoBtn.setEnabled(false);\n }\n });\n\n // Create the Save button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n saveBtn = new Button(bottonBtnComposite, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n if( seldCmapName == null ) {\n saveBtn.setEnabled(false);\n }\n \n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorMap cm = (ColorMap) cmapParams.getColorMap();\n seldCmapName = selCmapCombo.getText();\n \n// int sepIndx = seldCmapName.indexOf(File.separator);\n// String cmapCat = seldCmapName.substring(0,seldCmapName.indexOf(File.separator));\n// String cmapName = seldCmapName.substring( seldCmapName.indexOf(File.separator));\n if (lockedCmaps != null && lockedCmaps.isLocked(seldCmapName)) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists and is locked.\\n\\n\" +\n \t\t\t\"You cannot overwrite it.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tconfirmDlg.open();\n \tcolorBar.undoColorBar();\n updateColorMap();\n \treturn;\n } \n else if( ColorMapUtil.colorMapExists( seldCmapCat, seldCmapName ) ) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists.\\n\\n\" +\n \t\t\t\"Do you want to overwrite it?\",\n \t\t\tMessageDialog.QUESTION, new String[]{\"Yes\", \"No\"}, 0);\n \tconfirmDlg.open();\n\n \tif( confirmDlg.getReturnCode() == MessageDialog.CANCEL ) {\n \t\treturn;\n \t}\n }\n\n try {\n ColorMapUtil.saveColorMap( cm, seldCmapCat, seldCmapName );\n \n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Colormap Saved\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" Saved.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n } catch (VizException e) {\n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Error\", null, \n \t\t\t\"Error Saving Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\"\\n\"+e.getMessage(),\n \t\t\tMessageDialog.ERROR, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n }\n\n completeSave();\n }\n });\n\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.grabExcessHorizontalSpace = false;\n deleteBtn = new Button(bottonBtnComposite, SWT.PUSH);\n deleteBtn.setText(\"Delete\");\n deleteBtn.setLayoutData(gd);\n deleteBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tdeleteColormap();\n }\n });\n Label sep = new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n sep.setLayoutData(gd);\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.HORIZONTAL_ALIGN_END);\n Button closeBtn = new Button(shell, SWT.PUSH);\n closeBtn.setText(\" Close \");\n closeBtn.setLayoutData(gd);\n closeBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tshell.dispose();\n }\n });\n }", "public void goToBarChart(ActionEvent event) throws SQLException {\n\t\tconn = MySqlConnection.ConnectDb();\n\n\t\tCategoryAxis xAxis = new CategoryAxis();\n\t\txAxis.setLabel(\"Category\");\n\t\tNumberAxis yAxis = new NumberAxis();\n\t\tyAxis.setLabel(\"Amount\");\n\n\t\tBarChart<String, Number> barChart = new BarChart<String, Number>(xAxis, yAxis);\n\n\t\tXYChart.Series<String, Number> xyChart = new XYChart.Series<String, Number>();\n\t\t\n\t\tString sql = \"select category, amount from Account order by amount asc\";\n\t\tps = conn.prepareStatement(sql);\n\t\trs = ps.executeQuery();\n\n\t for(Account acc: lists) {\n\t xyChart.getData().add(new XYChart.Data<String, Number>(acc.getCategory(), acc.getAmount()));\n\t }\n\n\t\tbarChart.getData().add(xyChart);\n\t\tbarChart.setLegendVisible(false);\n\n\t\tScene scene = new Scene(barChart, 500, 500);\n\t\tStage stage = new Stage();\n\t\tstage.setScene(scene);\n\t\tstage.show();\n\t}", "@Override\n public void start(Stage stage) {\n rubik=new Rubik();\n // create toolbars\n ToolBar tbTop=new ToolBar(new Button(\"U\"),new Button(\"Ui\"),new Button(\"F\"),\n new Button(\"Fi\"),new Separator(),new Button(\"Y\"),\n new Button(\"Yi\"),new Button(\"Z\"),new Button(\"Zi\"));\n // tbTop.setStyle(\"-fx-background-color: rgb(225, 230, 242);\");\n pane.setTop(tbTop);\n ToolBar tbBottom=new ToolBar(new Button(\"B\"),new Button(\"Bi\"),new Button(\"D\"),\n new Button(\"Di\"),new Button(\"E\"),new Button(\"Ei\"));\n pane.setBottom(tbBottom);\n ToolBar tbRight=new ToolBar(new Button(\"R\"),new Button(\"Ri\"),new Separator(),\n new Button(\"X\"),new Button(\"Xi\"));\n tbRight.setOrientation(Orientation.VERTICAL);\n pane.setRight(tbRight);\n ToolBar tbLeft=new ToolBar(new Button(\"L\"),new Button(\"Li\"),new Button(\"M\"),\n new Button(\"Mi\"),new Button(\"S\"),new Button(\"Si\"));\n tbLeft.setOrientation(Orientation.VERTICAL);\n pane.setLeft(tbLeft);\n \n pane.setCenter(rubik.getSubScene());\n \n pane.getChildren().stream()\n .filter(n -> (n instanceof ToolBar))\n .forEach(tb->{\n ((ToolBar)tb).getItems().stream()\n .filter(n -> (n instanceof Button))\n .forEach(n->((Button)n).setOnAction(e->rubik.rotateFace(((Button)n).getText())));\n });\n rubik.isOnRotation().addListener((ov,b,b1)->{\n pane.getChildren().stream()\n .filter(n -> (n instanceof ToolBar))\n .forEach(tb->tb.setDisable(b1));\n });\n final Scene scene = new Scene(pane, 880, 680, true);\n scene.setFill(Color.WHITE);\n stage.setTitle(\"Rubik's Cube - JavaFX 3D\");\n stage.setScene(scene);\n stage.show();\n }", "public BarChart() {\n\n\t\t//set the initial size of the store for curve data\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tcvV.add(new CurveData());\n\t\t}\n\n\t\tbarChartPanel.add(GP, BorderLayout.CENTER);\n\n\t\tBorder etchedBorder = BorderFactory.createEtchedBorder();\n\t\tborder = BorderFactory.createTitledBorder(etchedBorder, \"Title\");\n\t\tborder.setTitleColor(Color.blue);\n\t\tbarChartPanel.setBorder(border);\n\n\t\tMarkerFormat = new MarkerFormat(barColumns);\n\n\t\tGP.setSmartGL(false);\n\t\tGP.setNumberFormatX(MarkerFormat);\n\n\t\tGP.addHorLimitsListener(\n\t\t\t\t\t\t\t\tnew ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tint nClmns = barColumns.size();\n\t\t\t\tint nMaxLines = 0;\n\t\t\t\tjava.util.Iterator<BarColumn> itr = barColumns.iterator();\n\t\t\t\twhile (itr.hasNext()) {\n\t\t\t\t\tBarColumn bc = itr.next();\n\t\t\t\t\tif (nMaxLines < bc.size()) {\n\t\t\t\t\t\tnMaxLines = bc.size();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (nClmns > 0 && nMaxLines > 0) {\n\t\t\t\t\t//int iMin = GP.getScreenX(GP.getCurrentMinX());\n\t\t\t\t\t//int iMax = GP.getScreenX(GP.getCurrentMaxX());\n\t\t\t\t\tint iMin = GP.getScreenX(GP.getInnerMinX());\n\t\t\t\t\tint iMax = GP.getScreenX(GP.getInnerMaxX());\n\n\t\t\t\t\twidth = (int) ((iMax - iMin) / (1.9 * nMaxLines * nClmns));\n\t\t\t\t\tif (width < 1) {\n\t\t\t\t\t\twidth = 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (int i = 1, n = Math.min(nClmns * nMaxLines + 1, cvV.size()); i < n; i++) {\n\t\t\t\t\t\tCurveData cd = cvV.get(i);\n\t\t\t\t\t\tcd.setLineWidth(width);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tRunnable runRefresh =\n\t\t\t\tnew Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tGP.refreshGraphJPanel();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tThread mThread = new Thread(runRefresh);\n\t\t\t\tmThread.start();\n\t\t\t}\n\t\t});\n\n\t\t//operations with clicked point object\n\t\tJLabel infoLabel = new JLabel(\" Clicked Point Info: \", JLabel.CENTER);\n\n\t\tFunctionGraphsJPanel.ClickedPoint cpObj = GP.getClickedPointObject();\n\t\tcpObj.xValueLabel = new JLabel(\"X-Marker=\", JLabel.RIGHT);\n\t\tcpObj.xValueFormat = MarkerFormat;\n\t\tcpObj.xValueText = new JTextField(10);\n\t\tcpObj.xValueText.setHorizontalAlignment(JTextField.CENTER);\n\t\tcpObj.xValueText.setForeground(Color.blue);\n\n\t\tcpObj.yValueLabel = new JLabel(\" Value=\", JLabel.RIGHT);\n\t\tcpObj.yValueFormat = fortranFrmt;\n\t\tcpObj.yValueText = new JTextField(12);\n\t\tcpObj.yValueText.setHorizontalAlignment(JTextField.CENTER);\n\t\tcpObj.yValueText.setForeground(Color.blue);\n\n\t\tJPanel infoPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 4, 0));\n\t\tinfoPanel.add(infoLabel);\n\t\tinfoPanel.add(cpObj.xValueLabel);\n\t\tinfoPanel.add(cpObj.xValueText);\n\t\tinfoPanel.add(cpObj.yValueLabel);\n\t\tinfoPanel.add(cpObj.yValueText);\n\n\t\tbarChartPanel.add(infoPanel, BorderLayout.SOUTH);\n\t}", "@Override\n\tpublic void draw3() {\n\n\t}", "public void generateBarChart(float[] act, float[] act1)\n {\n\n HorizontalBarChart barChart= (HorizontalBarChart) findViewById(R.id.chart);\n /*\n ArrayList<BarEntry> entries = new ArrayList<>();\n entries.add(new BarEntry(4f, 0));\n entries.add(new BarEntry(8f, 1));\n entries.add(new BarEntry(6f, 2));\n entries.add(new BarEntry(12f, 3));\n entries.add(new BarEntry(18f, 4));\n entries.add(new BarEntry(10f, 6));\n entries.add(new BarEntry(14f, 7));\n entries.add(new BarEntry(2f, 5));\n\n BarDataSet dataset1 = new BarDataSet(entries, \"# of Calls\");\n */\n\n ArrayList<String> labels = new ArrayList<String>();\n labels.add(\"Food\");\n labels.add(\"Cloth\");\n labels.add(\"Travelling\");\n labels.add(\"Stationary\");\n labels.add(\"Furniture\");\n labels.add(\"Medicine\");\n labels.add(\"Bill\");\n labels.add(\"Utensils\");\n\n\n /* for create Grouped Bar chart*/\n ArrayList<BarEntry> group1 = new ArrayList<>();\n group1.add(new BarEntry(act1[0], 0));\n group1.add(new BarEntry(act1[1], 1));\n group1.add(new BarEntry(act1[2], 2));\n group1.add(new BarEntry(act1[3], 3));\n group1.add(new BarEntry(act1[4], 4));\n group1.add(new BarEntry(act1[5], 5));\n group1.add(new BarEntry(act1[6], 6));\n group1.add(new BarEntry(act1[7], 7));\n\n ArrayList<BarEntry> group2 = new ArrayList<>();\n group2.add(new BarEntry(act[0], 0));\n group2.add(new BarEntry(act[1], 1));\n group2.add(new BarEntry(act[2], 2));\n group2.add(new BarEntry(act[3], 3));\n group2.add(new BarEntry(act[4], 4));\n group2.add(new BarEntry(act[5], 5));\n group2.add(new BarEntry(act[6], 6));\n group2.add(new BarEntry(act[7], 7));\n\n BarDataSet barDataSet1 = new BarDataSet(group1, \"Planned Amount\");\n //barDataSet1.setColor(Color.rgb(0, 155, 0));\n barDataSet1.setColor(getResources().getColor(R.color.darkgreen));\n\n BarDataSet barDataSet2 = new BarDataSet(group2, \"Actual Amount\");\n barDataSet2.setColor(getResources().getColor(R.color.purered));\n\n\n ArrayList<IBarDataSet> dataset = new ArrayList<>();\n dataset.add(barDataSet1);\n dataset.add(barDataSet2);\n /**/\n\n BarData data = new BarData(labels,dataset);\n// // dataset.setColors(ColorTemplate.COLORFUL_COLORS); //\n barChart.setData(data);\n barChart.animateY(5000);\n barChart.setDescription(\"Expense Graph\");\n barChart.setDescriptionPosition(2f, 2f);\n\n }", "@Test\n public void test08() throws Throwable {\n DefaultMultiValueCategoryDataset defaultMultiValueCategoryDataset0 = new DefaultMultiValueCategoryDataset();\n DefaultMultiValueCategoryDataset defaultMultiValueCategoryDataset1 = (DefaultMultiValueCategoryDataset)defaultMultiValueCategoryDataset0.clone();\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D();\n LineRenderer3D lineRenderer3D0 = new LineRenderer3D();\n Color color0 = (Color)lineRenderer3D0.getWallPaint();\n categoryAxis3D0.setTickMarkPaint(color0);\n CyclicNumberAxis cyclicNumberAxis0 = new CyclicNumberAxis((-339.34), (-339.34), \"\");\n StackedBarRenderer3D stackedBarRenderer3D0 = new StackedBarRenderer3D();\n int int0 = defaultMultiValueCategoryDataset0.getColumnIndex(\"\");\n LegendItem legendItem0 = stackedBarRenderer3D0.getLegendItem(4485, 10);\n CategoryPlot categoryPlot0 = new CategoryPlot((CategoryDataset) defaultMultiValueCategoryDataset0, (CategoryAxis) categoryAxis3D0, (ValueAxis) cyclicNumberAxis0, (CategoryItemRenderer) stackedBarRenderer3D0);\n RectangleInsets rectangleInsets0 = categoryPlot0.getAxisOffset();\n LegendItemCollection legendItemCollection0 = categoryPlot0.getLegendItems();\n Color color1 = (Color)categoryPlot0.getDomainGridlinePaint();\n }", "@FXML \n\tprivate void handleTriButtonCH0() throws Exception {\n\t\tif(triButtonCH0.isSelected()){\n\t\t\t//draw the chart\n\t\t\tdutyFieldCH0.setDisable(true);\n\t\t\tchartDrawer.drawTri();\n\t\t}\n\t\telse{\n\t\t\t//clear the chart\n\t\t\tdutyFieldCH0.setDisable(false);\n\t\t\tchartDrawer.clear();\n\t\t}\n\t}", "private void createGUI() {\r\n\r\n cgRect modelSpace = new cgRect(0, 0, 11, 11);\r\n cgRect deviceSpace = new cgRect(0, 0, 600, 600);\r\n\r\n cgTransformation tr = new cgTransformation(modelSpace, deviceSpace, false, false);\r\n\r\n /**\r\n *\r\n */\r\n // The formatter of axis' labels will use default locale and pattern\r\n NumberFormat nf = NumberFormat.getInstance();\r\n\r\n // We will use \"fixed size\" axis renderer for all axes\r\n \r\n // 参数一:标签刻度长度大小 参数二:标签数字长度大小 参数三:数字和刻度之间的距离大小,长度为像素\r\n cgAxisRenderer ar = new cgFixedSizeAxisRenderer(5, 15, 50, nf);\r\n\r\n // ----------------------------------------------------\r\n // First axis - values match the model coordinates,\r\n // model origin is at 0.0\r\n // ----------------------------------------------------\r\n \r\n // 第三个参数为显示的数字数\r\n cgRect bbox1 = new cgRect(0, 0, 11, 1);\r\n TickGenerator tg1 = new NumericTickGenerator(1.0);\r\n cgAxisShape axis1 = new cgAxisShape(cgAxisShape.NORTH, bbox1, tg1, ar);\r\n\r\n cgShapeListLayer layer = new cgShapeListLayer();\r\n\r\n layer.addShape(axis1);\r\n\r\n /**\r\n *\r\n */\r\n // ----------------------------------------------------\r\n // Create grid using regular grid renderer\r\n // ----------------------------------------------------\r\n cgRect bbox = new cgRect(0, 0, 10, 10);\r\n TickGenerator htg = new NumericTickGenerator(1.0);\r\n TickGenerator vtg = new NumericTickGenerator(1.0);\r\n cgGridRenderer gr = new cgRegularGridRenderer();\r\n cgGridShape grid = new cgGridShape(bbox, htg, vtg, gr);\r\n\r\n // ----------------------------------------------------\r\n // Create view\r\n // ----------------------------------------------------\r\n// cgShapeListLayer layer = new cgShapeListLayer();\r\n// layer.addShape( grid );\r\n cgContainerModel model = new cgContainerModel();\r\n model.setBoundingBox(modelSpace);\r\n model.addLayer(layer);\r\n\r\n cgPlotView view = new cgPlotView(model, tr);\r\n\r\n // ----------------------------------------------------\r\n // Create plot\r\n // ----------------------------------------------------\r\n cgPlot plot = new cgPlot(view);\r\n\r\n plot.addScrollbar(cgGenericPlotLayout.SOUTH);\r\n plot.addScrollbar(cgGenericPlotLayout.EAST);\r\n\r\n getContentPane().add(plot);\r\n\r\n // ----------------------------------------------------\r\n // Set up listeners\r\n // ----------------------------------------------------\r\n // Set window listener\r\n addWindowListener(new WindowAdapter() {\r\n public void windowClosing(WindowEvent e) {\r\n System.exit(0);\r\n }\r\n });\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n panelChart = new javax.swing.JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jButton1.setText(\"Balansas\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n panelChart.setBackground(new java.awt.Color(255, 255, 255));\n panelChart.setLayout(new java.awt.BorderLayout());\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelChart, javax.swing.GroupLayout.DEFAULT_SIZE, 686, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGap(306, 306, 306)\n .addComponent(jButton1)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(panelChart, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addContainerGap())\n );\n\n pack();\n }", "private static void norm3JS() {\n\n // Drive\n axLeftX.setAxis(leftJoystick, 0); //Mecanum (Arcade) Left/Right turn\n axLeftY.setAxis(leftJoystick, 1); //Mecanum (Arcade) Fwd/Bkwd\n axRightX.setAxis(rightJoystick, 0); //Mecanum Rotate orientation\n axRightY.setAxis(rightJoystick, 1); //unassigned\n\n btnGyroReset.setButton(rightJoystick, 6); // reset gyro to 0\n\n btnHoldLeft.setButton(rightJoystick, 4); //??\n btnHoldCenter.setButton(rightJoystick,3); //??\n btnHoldRight.setButton(rightJoystick, 5); //??\n \n // Gear\n btnPickupGear.setButton(coJoystick, 2); // Pickup gear off floor\n btnPlaceGear.setButton(coJoystick, 5); // Place gear on ship peg\n \n // Shooter\n btnShooter.setButton(coJoystick, 1); // Start shooter then feeder(s)\n btnAgitator.setButton(coJoystick, 3); // Agitate the ball bin\n \n // Climb\n btnClimber.setButton(coJoystick, 8); // Climber rotating\n \n }", "private void TabbedPaneMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_TabbedPaneMouseClicked\n DefaultPieDataset pieDataset = new DefaultPieDataset();\n // import spending data\n getSpendingData();\n // assign data a title & add to chart\n pieDataset.setValue(\"mortgage\", mort);\n pieDataset.setValue(\"credit\", cred);\n pieDataset.setValue(\"loans\", loan);\n pieDataset.setValue(\"auto\", auto);\n pieDataset.setValue(\"grocery\", groc);\n pieDataset.setValue(\"medical\", medi);\n pieDataset.setValue(\"utilities\", util);\n pieDataset.setValue(\"entertainment\", ente);\n pieDataset.setValue(\"other\", othe);\n\n JFreeChart chart = ChartFactory.createPieChart3D(\"How You Spend Your Money\",\n pieDataset, true, true, true);\n PiePlot3D P = (PiePlot3D) chart.getPlot();\n // Add chart to existing JPanel...\n chartPanel.setLayout(new java.awt.BorderLayout());\n ChartPanel CP = new ChartPanel(chart);\n chartPanel.add(CP, BorderLayout.CENTER);\n chartPanel.validate();\n }", "public void chartMouseClicked(ChartMouseEvent event) {\n }", "private void setupBarChart() {\n mBarChart.setOnChartValueSelectedListener(this);\n mBarChart.getDescription().setEnabled(false);\n mBarChart.setDrawBorders(true);\n mBarChart.setBorderWidth(1.f);\n mBarChart.setBorderColor(Color.parseColor(\"#616161\"));\n mBarChart.setPinchZoom(true);\n mBarChart.setDrawBarShadow(false);\n mBarChart.setDrawGridBackground(false);\n mBarChart.setTouchEnabled(true);\n mBarChart.setDoubleTapToZoomEnabled(false);\n\n Legend l = mBarChart.getLegend();\n l.setVerticalAlignment(Legend.LegendVerticalAlignment.TOP);\n l.setHorizontalAlignment(Legend.LegendHorizontalAlignment.RIGHT);\n l.setOrientation(Legend.LegendOrientation.VERTICAL);\n l.setDrawInside(true);\n l.setYOffset(0f);\n l.setXOffset(10f);\n l.setYEntrySpace(0f);\n l.setTextSize(8f);\n\n// List<String> list = new ArrayList<String>();\n// for(Report report: mReportList){\n// list.add(report.monthYear);\n// }\n// final String[] stringMonthYear = list.toArray(new String[0]);\n\n XAxis xAxis = mBarChart.getXAxis();\n xAxis.setGranularity(1f);\n xAxis.setPosition(XAxis.XAxisPosition.TOP);\n xAxis.setCenterAxisLabels(true);\n xAxis.setValueFormatter(new IAxisValueFormatter() {\n @Override\n public String getFormattedValue(float value, AxisBase axis) {\n int n = (int) value;\n switch (n) {\n case 0:\n if(mReportList.size()<1){\n break;\n }\n return mReportList.get(0).monthYear;\n case 1:\n if(mReportList.size()<2){\n break;\n }\n return mReportList.get(1).monthYear;\n case 2:\n if(mReportList.size()<3){\n break;\n }\n return mReportList.get(2).monthYear;\n case 3:\n if(mReportList.size()<4){\n break;\n }\n return mReportList.get(3).monthYear;\n }\n if (n < 0) {\n return \"Tháng\";\n } else{\n return \"Tháng\";\n }\n }\n });\n\n YAxis leftAxis = mBarChart.getAxisLeft();\n leftAxis.setValueFormatter(new LargeValueFormatter());\n leftAxis.setDrawGridLines(false);\n leftAxis.setSpaceTop(35f);\n leftAxis.setAxisMinimum(0f); // this replaces setStartAtZero(true)\n\n mBarChart.getAxisRight().setEnabled(false);\n\n float groupSpace = 0.04f;\n float barSpace = 0.03f; // x2 dataset\n float barWidth = 0.45f; // x2 dataset\n // (0.45 + 0.03) * 2 + 0.04 = 1.00 -> interval per \"group\"\n\n int startMonth = 0;\n\n ArrayList<BarEntry> yValsThu = new ArrayList<BarEntry>();\n ArrayList<BarEntry> yValsChi = new ArrayList<BarEntry>();\n\n int i = 0;\n for (Report report : mReportList) {\n yValsThu.add(new BarEntry(i, (float) report.incomeTotal));\n yValsChi.add(new BarEntry(i, (float) report.expenseTotal));\n i++;\n }\n\n BarDataSet setThu, setChi;\n\n if (mBarChart.getData() != null && mBarChart.getData().getDataSetCount() > 0) {\n\n setThu = (BarDataSet) mBarChart.getData().getDataSetByIndex(0);\n setChi = (BarDataSet) mBarChart.getData().getDataSetByIndex(1);\n setThu.setValues(yValsThu);\n setChi.setValues(yValsChi);\n mBarChart.getData().notifyDataChanged();\n mBarChart.notifyDataSetChanged();\n\n } else {\n // create 4 DataSets\n setThu = new BarDataSet(yValsThu, \"Thu\");\n setThu.setColor(Color.parseColor(\"#64dd17\"));\n setChi = new BarDataSet(yValsChi, \"Chi\");\n setChi.setColor(Color.parseColor(\"#2196f3\"));\n\n BarData data = new BarData(setThu, setChi);\n data.setValueFormatter(new LargeValueFormatter());\n\n mBarChart.setData(data);\n }\n\n // specify the width each bar should have\n mBarChart.getBarData().setBarWidth(barWidth);\n\n // restrict the x-axis range\n mBarChart.getXAxis().setAxisMinimum(startMonth);\n\n // barData.getGroupWith(...) is a helper that calculates the width each group needs based on the provided parameters\n mBarChart.getXAxis().setAxisMaximum(startMonth + mBarChart.getBarData().getGroupWidth(groupSpace, barSpace) * mReportList.size());\n mBarChart.groupBars(startMonth, groupSpace, barSpace);\n for (IBarDataSet set : mBarChart.getData().getDataSets()) {\n ((BarDataSet) set).setBarBorderWidth(1.f);\n ((BarDataSet) set).setBarBorderColor(Color.parseColor(\"#616161\"));\n }\n mBarChart.invalidate();\n mBarChart.animateY(800);\n\n //[END Setup Bar Char]\n }", "private final void initBar() {\r\n \t//---------- Start ActionListener ----------\r\n \tActionListener readPhyTopoListener = new ActionListener() {\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t \tphysicalTopologyFile = importFile(\"josn\");\r\n \tcheckImportStatus();\r\n\t\t }\r\n\t\t};\r\n\t\tActionListener readVirTopoListener = new ActionListener() {\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t \tdeploymentFile = importFile(\"json\");\r\n \tcheckImportStatus();\r\n\t\t }\r\n\t\t};\r\n\t\tActionListener readWorkloadBkListener = new ActionListener() {\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t \tworkloads_background = importFile(\"cvs\");\r\n\t\t \tcheckImportStatus();\r\n\t\t }\r\n\t\t};\r\n\t\tActionListener readWorkloadListener = new ActionListener() {\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t \tworkloads = importFile(\"cvs\");\r\n\t\t \tcheckImportStatus();\r\n\t\t }\r\n\t\t};\r\n\t\tActionListener addPhysicalNodeListener = new ActionListener() {\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t \topenAddPhysicalNodeDialog();\r\n\t\t }\r\n\t\t};\r\n\t\tActionListener addVirtualNodeListener = new ActionListener() {\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t \topenAddVirtualNodeDialog();\r\n\t\t }\r\n\t\t};\r\n\t\tActionListener addPhysicalEdgeListener = new ActionListener() {\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t \topenAddPhysicalEdgeDialog();\r\n\t\t }\r\n\t\t};\r\n\t\tActionListener addVirtualEdgeListener = new ActionListener() {\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t \topenAddVirtualEdgeDialog();\r\n\t\t }\r\n\t\t};\r\n\t\tActionListener importPhyTopoListener = new ActionListener() {\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t \tString fileName = importFile(\"josn\");\r\n\t\t \tGraph phyGraph= Bridge.jsonToGraph(fileName, 0);\r\n/*\t\t \tSystem.out.println(phyGraph.getAdjacencyList().size());\r\n\t\t \tfor (Entry<Node, List<Edge>> entry : phyGraph.getAdjacencyList().entrySet()) {\r\n\t\t \t\tSystem.out.println(entry.getKey().getName()+entry.getKey().getType());\r\n\t\t \t}*/\r\n\t\t \tphysicalCanvas.setGraph(phyGraph);\r\n\t\t }\r\n\t\t};\r\n\t\tActionListener importVirTopoListener = new ActionListener() {\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t \tString fileName = importFile(\"josn\");\r\n\t\t \tGraph virGraph= Bridge.jsonToGraph(fileName, 1);\r\n\t\t \tvirtualCanvas.setGraph(virGraph);\r\n\t\t }\r\n\t\t};\r\n\t\tActionListener savePhyTopoListener = new ActionListener() {\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t \ttry {\r\n\t\t\t\t\tsaveFile(\"json\", physicalGraph);\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t }\r\n\t\t};\r\n\t\tActionListener saveVirTopoListener = new ActionListener() {\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t \ttry {\r\n\t\t\t\t\tsaveFile(\"json\", virtualGraph);\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t }\r\n\t\t};\r\n\t\t \r\n\t\t//---------- End ActionListener ----------\r\n \t\r\n //---------- Start Creating project tool bar ----------\r\n JToolBar toolbar = new JToolBar();\r\n\r\n ImageIcon iHost = new ImageIcon(\r\n getClass().getResource(\"/src/dc.png\"));\r\n ImageIcon iHline = new ImageIcon(\r\n getClass().getResource(\"/src/hline2.png\"));\r\n ImageIcon iHOpen = new ImageIcon(\r\n getClass().getResource(\"/src/openPhyTop.png\"));\r\n ImageIcon iHSave = new ImageIcon(\r\n getClass().getResource(\"/src/savePhyTop.png\"));\r\n ImageIcon iVM = new ImageIcon(\r\n getClass().getResource(\"/src/vm2.png\"));\r\n ImageIcon iVline = new ImageIcon(\r\n getClass().getResource(\"/src/vline2.png\"));\r\n ImageIcon iVOpen = new ImageIcon(\r\n getClass().getResource(\"/src/openVirTop.png\"));\r\n ImageIcon iVSave = new ImageIcon(\r\n getClass().getResource(\"/src/saveVirTop.png\"));\r\n ImageIcon iPhy = new ImageIcon(\r\n getClass().getResource(\"/src/upload1.png\"));\r\n ImageIcon iVir = new ImageIcon(\r\n getClass().getResource(\"/src/upload2.png\"));\r\n ImageIcon iWl1 = new ImageIcon(\r\n getClass().getResource(\"/src/upload3.png\"));\r\n ImageIcon iWl2 = new ImageIcon(\r\n getClass().getResource(\"/src/upload4.png\"));\r\n ImageIcon run = new ImageIcon(\r\n getClass().getResource(\"/src/play.png\"));\r\n ImageIcon exit = new ImageIcon(\r\n getClass().getResource(\"/src/exit.png\"));\r\n\r\n final JButton btnHost = new JButton(iHost);\r\n btnHost.setToolTipText(\"Add Host Node\");\r\n final JButton btnVm = new JButton(iVM);\r\n btnVm.setToolTipText(\"Add virtual Machine\");\r\n final JButton btnHedge = new JButton(iHline);\r\n btnHedge.setToolTipText(\"Add Host Edge\");\r\n final JButton btnVedge = new JButton(iVline);\r\n btnVedge.setToolTipText(\"Add VM Edge\");\r\n final JButton btnHopen = new JButton(iHOpen);\r\n btnHopen.setToolTipText(\"Open Physical Topology\");\r\n final JButton btnVopen = new JButton(iVOpen);\r\n btnVopen.setToolTipText(\"Open virtual Topology\");\r\n final JButton btnHsave = new JButton(iHSave);\r\n btnHsave.setToolTipText(\"Save Physical Topology\");\r\n final JButton btnVsave = new JButton(iVSave);\r\n btnVsave.setToolTipText(\"Save virtual Topology\");\r\n \r\n final JButton btnPhy = new JButton(iPhy);\r\n btnPhy.setToolTipText(\"Import topology network\");\r\n final JButton btnVir = new JButton(iVir);\r\n btnVir.setToolTipText(\"Import virtual network\");\r\n final JButton btnWl1 = new JButton(iWl1);\r\n btnWl1.setToolTipText(\"Import workload background\");\r\n final JButton btnWl2 = new JButton(iWl2);\r\n btnWl2.setToolTipText(\"Import workload\");\r\n \r\n btnRun = new JButton(run);\r\n btnRun.setToolTipText(\"Start simulation\");\r\n JButton btnExit = new JButton(exit);\r\n btnExit.setToolTipText(\"Exit CloudSim\");\r\n toolbar.setAlignmentX(0);\r\n \r\n btnHost.addActionListener(addPhysicalNodeListener);\r\n btnHedge.addActionListener(addPhysicalEdgeListener);\r\n btnHopen.addActionListener(importPhyTopoListener);\r\n btnHsave.addActionListener(savePhyTopoListener);\r\n btnVm.addActionListener(addVirtualNodeListener);\r\n btnVedge.addActionListener(addVirtualEdgeListener);\r\n btnVopen.addActionListener(importVirTopoListener);\r\n btnVsave.addActionListener(saveVirTopoListener);\r\n \r\n btnPhy.addActionListener(readPhyTopoListener);\r\n btnVir.addActionListener(readVirTopoListener);\r\n btnWl1.addActionListener(readWorkloadBkListener);\r\n btnWl2.addActionListener(readWorkloadListener);\r\n btnRun.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent event) {\r\n \tif(\"i\"==mode){\r\n \t\tif(physicalTopologyFile==null || physicalTopologyFile.isEmpty()){\r\n \t\t\tJOptionPane.showMessageDialog(panel, \"Please select physicalTopologyFile\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tif(deploymentFile==null || deploymentFile.isEmpty()){\r\n \t\t\tJOptionPane.showMessageDialog(panel, \"Please select deploymentFile\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tif(workloads_background==null || workloads_background.isEmpty()){\r\n \t\t\tJOptionPane.showMessageDialog(panel, \"Please select workloads_background\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tif(workloads==null || workloads.isEmpty()){\r\n \t\t\tJOptionPane.showMessageDialog(panel, \"Please select workloads\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n \t\t\treturn;\r\n \t\t}\r\n \t\t// run simulation\r\n \t\tSDNRun run = new SDNRun(physicalTopologyFile, deploymentFile, \r\n \t\t\t\t\t\t\t\tworkloads_background, workloads, GraphicSDN.this);\r\n\r\n \t\t\r\n\t\t }else if(\"m\"==mode){\r\n\t\t \t\r\n\t\t }\r\n \t\r\n }\r\n });\r\n btnExit.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent event) {\r\n System.exit(0);\r\n }\r\n\r\n }); \r\n\r\n toolbar.add(btnHost);\r\n toolbar.add(btnHedge);\r\n toolbar.add(btnHopen);\r\n toolbar.add(btnHsave);\r\n toolbar.addSeparator();\r\n toolbar.add(btnVm);\r\n toolbar.add(btnVedge);\r\n toolbar.add(btnVopen);\r\n toolbar.add(btnVsave);\r\n \r\n toolbar.add(btnPhy);\r\n toolbar.add(btnVir);\r\n toolbar.add(btnWl1);\r\n toolbar.add(btnWl2);\r\n toolbar.addSeparator();\r\n \r\n toolbar.add(btnRun);\r\n toolbar.add(btnExit);\r\n\r\n panel.add(toolbar);\r\n \r\n contentPane.add(panel, BorderLayout.NORTH);\r\n //---------- End Creating project tool bar ----------\r\n \r\n \r\n \r\n \t//---------- Start Creating project menu bar ----------\r\n \t//1-1\r\n JMenuBar menubar = new JMenuBar();\r\n //ImageIcon iconNew = new ImageIcon(getClass().getResource(\"/src/new.png\"));\r\n\r\n //2-1\r\n JMenu graph = new JMenu(\"Graph\");\r\n graph.setMnemonic(KeyEvent.VK_G);\r\n \r\n //Graph by importing json and cvs files\r\n final JMenuItem MiPhy = new JMenuItem(\"Physical Topology\");\r\n final JMenuItem MiVir = new JMenuItem(\"Virtual Topology\");\r\n final JMenuItem MiWl1 = new JMenuItem(\"Workload Background\");\r\n final JMenuItem MiWl2 = new JMenuItem(\"Workload\");\r\n //Graph drawing elements\r\n final JMenu MuPhy = new JMenu(\"Physical\");\r\n JMenuItem MiPhyNode = new JMenuItem(\"Add Node\");\r\n JMenuItem MiPhyEdge = new JMenuItem(\"Add Edge\");\r\n JMenuItem MiPhyOpen = new JMenuItem(\"Import Physical Topology\");\r\n JMenuItem MiPhySave = new JMenuItem(\"Save Physical Topology\");\r\n MuPhy.add(MiPhyNode);\r\n MuPhy.add(MiPhyEdge);\r\n MuPhy.add(MiPhyOpen);\r\n MuPhy.add(MiPhySave);\r\n final JMenu MuVir = new JMenu(\"Virtual\");\r\n JMenuItem MiVirNode = new JMenuItem(\"Add Node\");\r\n JMenuItem MiVirEdge = new JMenuItem(\"Add Edge\");\r\n JMenuItem MiVirOpen = new JMenuItem(\"Import Virtual Topology\");\r\n JMenuItem MiVirSave = new JMenuItem(\"Save Virtual Topology\");\r\n MuVir.add(MiVirNode);\r\n MuVir.add(MiVirEdge); \r\n MuVir.add(MiVirOpen);\r\n MuVir.add(MiVirSave);\r\n \r\n \r\n MiPhy.addActionListener(readPhyTopoListener);\r\n MiVir.addActionListener(readVirTopoListener);\r\n MiWl1.addActionListener(readWorkloadBkListener);\r\n MiWl2.addActionListener(readWorkloadListener);\r\n \r\n MiPhyNode.addActionListener(addPhysicalNodeListener);\r\n MiPhyEdge.addActionListener(addPhysicalEdgeListener);\r\n MiPhyOpen.addActionListener(importPhyTopoListener);\r\n MiPhySave.addActionListener(savePhyTopoListener);\r\n MiVirNode.addActionListener(addVirtualNodeListener);\r\n MiVirEdge.addActionListener(addVirtualEdgeListener);\r\n MiVirOpen.addActionListener(importVirTopoListener);\r\n MiVirSave.addActionListener(saveVirTopoListener);\r\n\r\n graph.add(MuPhy);\r\n graph.add(MuVir);\r\n graph.add(MiPhy);\r\n graph.add(MiVir);\r\n graph.add(MiWl1);\r\n graph.add(MiWl2);\r\n\r\n //2-2\r\n JMenu view = new JMenu(\"View\");\r\n view.setMnemonic(KeyEvent.VK_F);\r\n \r\n //switch mode between manual mode (to create graph by hand) and import mode (to create graph from file)\r\n\t\tActionListener actionSwitcher = new ActionListener() {\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t try {\r\n\t\t \t String cmd = e.getActionCommand();\r\n\t\t \t if(\"Canvas\" == cmd){\r\n\t\t \t \tbtnHost.setVisible(true);\r\n\t\t \t \tbtnHedge.setVisible(true);\r\n\t\t \t \tbtnHopen.setVisible(true);\r\n\t\t \t \tbtnHsave.setVisible(true);\r\n\t\t \t \tbtnVm.setVisible(true);\r\n\t\t \t \tbtnVedge.setVisible(true);\r\n\t\t \t \tbtnVopen.setVisible(true);\r\n\t\t \t \tbtnVsave.setVisible(true);\r\n\t\t \t \tbtnPhy.setVisible(false);\r\n\t\t \t \tbtnVir.setVisible(false);\r\n\t\t \t \tbtnWl1.setVisible(false);\r\n\t\t \t \tbtnWl2.setVisible(false);\r\n\t\t \t \t\r\n\t\t \t \tMiPhy.setVisible(false);\r\n\t\t \t \tMiVir.setVisible(false);\r\n\t\t \t \tMiWl1.setVisible(false);\r\n\t\t \t \tMiWl2.setVisible(false);\r\n\t\t \t \tMuPhy.setVisible(true);\r\n\t\t \t \tMuVir.setVisible(true);\r\n\t\t \t \t\r\n\t\t \t \tbtnRun.setVisible(false);\r\n\t\t \t \tbtnRun.setEnabled(false);\r\n\t\t \t \t\r\n\t\t \t \tmode = \"m\";\r\n\t\t \t \t\r\n\t\t \t }else if(\"Execution\" == cmd){\r\n\t\t \t \tbtnHost.setVisible(false);\r\n\t\t \t \tbtnHedge.setVisible(false);\r\n\t\t \t \tbtnHopen.setVisible(false);\r\n\t\t \t \tbtnHsave.setVisible(false);\r\n\t\t \t \tbtnVm.setVisible(false);\r\n\t\t \t \tbtnVedge.setVisible(false);\r\n\t\t \t \tbtnVopen.setVisible(false);\r\n\t\t \t \tbtnVsave.setVisible(false);\r\n\t\t \t \tbtnPhy.setVisible(true);\r\n\t\t \t \tbtnVir.setVisible(true);\r\n\t\t \t \tbtnWl1.setVisible(true);\r\n\t\t \t \tbtnWl2.setVisible(true);\r\n\t\t \t \t\r\n\t\t \t \tMiPhy.setVisible(true);\r\n\t\t \t \tMiVir.setVisible(true);\r\n\t\t \t \tMiWl1.setVisible(true);\r\n\t\t \t \tMiWl2.setVisible(true);\r\n\t\t \t \tMuPhy.setVisible(false);\r\n\t\t \t \tMuVir.setVisible(false);\r\n\t\t \t \t\r\n\t\t \t \tbtnRun.setVisible(true);\r\n\t\t \t \tbtnRun.setEnabled(false);\r\n\t\t \t \t\r\n\t\t \t \tmode = \"i\";\r\n\t\t \t }\r\n\t\t \t //System.out.println(e.getActionCommand());\r\n\t\t } catch (Exception ex) {\r\n\t\t ex.printStackTrace();\r\n\t\t }\r\n\t\t }\r\n\t\t};\r\n JRadioButtonMenuItem manualMode = new JRadioButtonMenuItem(\"Canvas\");\r\n manualMode.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_U, ActionEvent.CTRL_MASK));\r\n manualMode.addActionListener(actionSwitcher);\r\n JRadioButtonMenuItem importMode = new JRadioButtonMenuItem(\"Execution\");\r\n importMode.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.CTRL_MASK));\r\n importMode.addActionListener(actionSwitcher);\r\n ButtonGroup group = new ButtonGroup();\r\n group.add(manualMode);\r\n group.add(importMode);\r\n \r\n JMenuItem fileExit = new JMenuItem(\"Exit\");\r\n fileExit.setMnemonic(KeyEvent.VK_C);\r\n fileExit.setToolTipText(\"Exit CloudSim\");\r\n fileExit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W,\r\n ActionEvent.CTRL_MASK));\r\n\r\n fileExit.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent event) {\r\n System.exit(0);\r\n }\r\n\r\n });\r\n\r\n view.add(manualMode);\r\n view.add(importMode);\r\n view.addSeparator();\r\n view.add(fileExit); \r\n\r\n \r\n //3-1\r\n menubar.add(view);\r\n menubar.add(graph);\r\n\r\n //4-1\r\n setJMenuBar(menubar);\r\n //----- End Creating project menu bar -----\r\n \r\n \r\n \r\n //----- Start Initialize menu and tool bar -----\r\n manualMode.setSelected(true);\r\n mode = \"m\";\r\n \r\n btnHost.setVisible(true);\r\n \tbtnHedge.setVisible(true);\r\n \tbtnHopen.setVisible(true);\r\n \tbtnHsave.setVisible(true);\r\n \tbtnVm.setVisible(true);\r\n \tbtnVedge.setVisible(true);\r\n \tbtnVopen.setVisible(true);\r\n \tbtnVsave.setVisible(true);\r\n \tbtnPhy.setVisible(false);\r\n \tbtnVir.setVisible(false);\r\n \tbtnWl1.setVisible(false);\r\n \tbtnWl2.setVisible(false);\r\n \t\r\n \tMiPhy.setVisible(false);\r\n \tMiVir.setVisible(false);\r\n \tMiWl1.setVisible(false);\r\n \tMiWl2.setVisible(false);\r\n \tMuPhy.setVisible(true);\r\n \tMuVir.setVisible(true);\r\n \t\r\n \tbtnRun.setVisible(false);\r\n \tbtnRun.setEnabled(false);\r\n //----- End Initialize menu and tool bar -----\r\n\r\n }", "private void jButton3MouseClicked(java.awt.event.MouseEvent evt) {\n }", "public static void main(String[] args) {\r\n\r\n // create a chart\r\n double[][] data = new double[][] {\r\n {56.0, -12.0, 34.0, 76.0, 56.0, 100.0, 67.0, 45.0},\r\n {37.0, 45.0, 67.0, 25.0, 34.0, 34.0, 100.0, 53.0},\r\n {43.0, 54.0, 34.0, 34.0, 87.0, 64.0, 73.0, 12.0}};\r\n CategoryDataset dataset = DatasetUtilities.createCategoryDataset(\r\n \"Series \", \"Type \", data);\r\n\r\n JFreeChart chart = null;\r\n boolean drilldown = true;\r\n\r\n if (drilldown) {\r\n CategoryAxis categoryAxis = new CategoryAxis(\"Category\");\r\n ValueAxis valueAxis = new NumberAxis(\"Value\");\r\n BarRenderer renderer = new BarRenderer();\r\n renderer.setBaseToolTipGenerator(\r\n new StandardCategoryToolTipGenerator());\r\n renderer.setBaseItemURLGenerator(new StandardCategoryURLGenerator(\r\n \"bar_chart_detail.jsp\"));\r\n \r\n // add URLs to the series names in the legend...\r\n renderer.setLegendItemURLGenerator(new CategorySeriesLabelGenerator() \r\n {\r\n public String generateLabel(CategoryDataset dataset, int series) {\r\n return \"series.html?series=\" + (series + 1);\r\n }\r\n \r\n });\r\n \r\n // add tool tips to the series names in the legend...\r\n renderer.setLegendItemToolTipGenerator(new CategorySeriesLabelGenerator() \r\n {\r\n public String generateLabel(CategoryDataset dataset, int series) {\r\n return \"Tool tip for series \" + (series + 1);\r\n }\r\n \r\n });\r\n CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, \r\n valueAxis, renderer);\r\n plot.setOrientation(PlotOrientation.VERTICAL);\r\n chart = new JFreeChart(\"Bar Chart\", JFreeChart.DEFAULT_TITLE_FONT,\r\n plot, true);\r\n }\r\n else {\r\n chart = ChartFactory.createBarChart(\r\n \"Vertical Bar Chart\", // chart title\r\n \"Category\", // domain axis label\r\n \"Value\", // range axis label\r\n dataset, // data\r\n PlotOrientation.VERTICAL,\r\n true, // include legend\r\n true,\r\n false\r\n );\r\n }\r\n chart.setBackgroundPaint(java.awt.Color.white);\r\n \r\n // save it to an image\r\n try {\r\n ChartRenderingInfo info = new ChartRenderingInfo(\r\n new StandardEntityCollection());\r\n File file1 = new File(\"barchart100.png\");\r\n ChartUtilities.saveChartAsPNG(file1, chart, 600, 400, info);\r\n\r\n // write an HTML page incorporating the image with an image map\r\n File file2 = new File(\"barchart100.html\");\r\n OutputStream out = new BufferedOutputStream(\r\n new FileOutputStream(file2));\r\n PrintWriter writer = new PrintWriter(out);\r\n writer.println(\"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\"\");\r\n writer.println(\"\\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\\">\");\r\n writer.println(\"<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" lang=\\\"en\\\" xml:lang=\\\"en\\\">\");\r\n writer.println(\"<head><title>JFreeChart Image Map Demo</title></head>\");\r\n writer.println(\"<body><p>\");\r\n ImageMapUtilities.writeImageMap(writer, \"chart\", info);\r\n writer.println(\"<img src=\\\"barchart100.png\\\" \"\r\n + \"width=\\\"600\\\" height=\\\"400\\\" usemap=\\\"#chart\\\" alt=\\\"barchart100.png\\\"/>\");\r\n writer.println(\"</p></body>\");\r\n writer.println(\"</html>\");\r\n writer.close();\r\n\r\n }\r\n catch (IOException e) {\r\n System.out.println(e.toString());\r\n }\r\n\r\n }", "private void updateBarABC(int num) {\r\n if (num < 0) {\r\n window.removeAllShapes();\r\n }\r\n else {\r\n State currentState = covidCalculator.getLL().get(num);\r\n ArrayList<Race> currentRacesSorted = covidCalculator.sortByABC(\r\n currentState);\r\n\r\n for (int i = 0; i < currentRacesSorted.size(); i++) {\r\n double currentCFR = currentRacesSorted.get(i).getCFR();\r\n if (currentCFR > 0) {\r\n Shape cfrBar = new Shape(0, 0, 25, (int)(10 * currentCFR),\r\n Color.RED);\r\n cfrBar.moveTo(barXPos + (spacingSize * spacingCounter) + 5,\r\n barYPos - cfrBar.getHeight());\r\n window.addShape(cfrBar);\r\n }\r\n else {\r\n TextShape name = new TextShape(0, 0, \"NA\");\r\n name.moveTo(barXPos + (spacingSize * spacingCounter) + 5,\r\n barYPos - 20);\r\n }\r\n spacingCounter++;\r\n }\r\n }\r\n lastStateMemory = num;\r\n spacingCounter = 1;\r\n }", "public static void main(String[] args)\r\n\t{\n\t\tdouble[] x = increment(-1.0, 0.2, 1.2); // INCREMENTS X = [-1.0, 1.2) BY 0.2\r\n\t\tdouble[] y = increment(-2.0, 0.2, 2.2); // INCREMENTS Y = [-2.0, 2.2) BY 0.2\r\n\t\t\r\n\t\t// THE increment METHOD OF THE DoubleArray CLASS GIVES INCREMENTED \r\n\t\t// DOUBLE VALUES THAT AREN'T ENTIRELY ACCURATE DUE TO THE FORMULA USED.\r\n\t\t// THIS FIXES THAT FOR THIS PROGRAM WHERE WE ONLY NEED 1 DECIMAL PLACE.\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.#\");\r\n\t\tfor (int i = 0; i < x.length; i++)\r\n\t\t{\r\n\t\t\tx[i] = Double.valueOf(df.format(x[i]));\r\n\t\t\ty[i] = Double.valueOf(df.format(y[i]));\r\n\t\t}\r\n\t\t\r\n\t\t// PLOT DATA FOR z(x,y)\r\n\t\tdouble[][] z = function(x, y);\r\n\t\t\r\n \r\n\t\t// PANEL THAT SHOWS THE PLOT WITH A LEGEND AT THE BOTTOM\r\n\t\tPlot3DPanel plot = new Plot3DPanel(\"SOUTH\");\r\n \r\n\t\t// ADD THE VALUES OF X, Y, Z TO THE PANEL WITH LEGEND\r\n\t\tplot.addGridPlot(\"z(x,y) = (1-cos(PI*x))*((1.23456+cos(1.06512*y))^2)*e^(-x^2-y^2)\", x, y, z);\r\n \r\n\t\t// PUT THE PANEL INTO A JFrame\r\n\t\tJFrame frame = new JFrame(\"A Plot\");\r\n\t\tframe.setSize(600, 600);\r\n\t\tframe.setContentPane(plot);\r\n\t\tframe.setVisible(true);\r\n\t\t\r\n\t\t// FIND THE GRADIENTS\r\n\t\thighest[3] = gradient(partialX(highest[0], highest[1]), \r\n\t\t\t\tpartialY(highest[0], highest[1]));\r\n\t\tsecondHighest[3] = gradient(partialX(secondHighest[0], secondHighest[0]), \r\n\t\t\t\tpartialY(secondHighest[0], secondHighest[0]));\r\n\t\tlowest[3] = gradient(partialX(lowest[0], lowest[1]), \r\n\t\t\t\tpartialY(lowest[0], lowest[1]));\r\n\t\tsecondLowest[3] = gradient(partialX(secondLowest[0], secondLowest[1]), \r\n\t\t\t\tpartialY(secondLowest[0], secondLowest[1]));\r\n\t\t\r\n\t\t// PRINT A TABLE IN THE CONSOLE\r\n\t\tDecimalFormat out = new DecimalFormat(\"#.####\");\r\n\t\tSystem.out.println(\"\\t\\tX\\t|\\tY\\t|\\tZ\\t|\\tGrad\");\r\n\t\tSystem.out.println(\"Highest:\\t\" + highest[0] + \"\\t|\\t\" + highest[1] + \r\n\t\t\t\t\"\\t|\\t\" + out.format(highest[2]) + \"\\t|\\t\" + out.format(highest[3]));\r\n\t\tSystem.out.println(\"2nd Highest:\\t\" + secondHighest[0] + \"\\t|\\t\" + \r\n\t\t\t\tsecondHighest[1] + \"\\t|\\t\" + out.format(secondHighest[2]) + \r\n\t\t\t\t\"\\t|\\t\" + out.format(secondHighest[3]));\r\n\t\tSystem.out.println(\"Lowest: \\t\" + lowest[0] + \"\\t|\\t\" + lowest[1] + \r\n\t\t\t\t\"\\t|\\t\" + out.format(lowest[2]) + \"\\t|\\t\" + out.format(lowest[3]));\r\n\t\tSystem.out.println(\"2nd Lowest:\\t\" + secondLowest[0] + \"\\t|\\t\" + \r\n\t\t\t\tsecondLowest[1] + \"\\t|\\t\" + out.format(secondLowest[2]) + \r\n\t\t\t\t\"\\t|\\t\" + out.format(secondLowest[3]));\r\n\t}", "private PanelTester()\n {\n /**/\n //f.add(new CardSelector(0, 0, width, height, \"TEST\"));\n\n // 73 Total\n// Slice[] slices2 = { new Slice(5, Color.BLACK,\"BLACK\"),\n// new Slice(33, Color.GREEN,\"GREEN\"),\n// new Slice(20, Color.YELLOW,\"YELLOW\"), new Slice(15, Color.RED,\"RED\") };\n//\n// Slice[] slices = { new Slice(0.64, Color.GREEN, \"Organic\"),\n// new Slice(52.6590008, Color.BLUE, \"Conventional\" ),\n// new Slice(46.7009992, Color.RED, \"GMO\" ) };\n//\n// ArrayList<Slice> sliceArray = new ArrayList<>();\n// for( int i = 0; i < slices.length ; i++)\n// {\n// sliceArray.add( slices[i] );\n// }\n// f.add(new PieChart( f.getBounds(), sliceArray ) );\n// Rectangle temp = new Rectangle(0,0,100,100);\n //f.add(new ChartKey(temp, sliceArray ));\n /**/\n\n\n\n f.add(new AvailableCropsBar(\"test\", new Color(134,255, 109,255),100,60,20,300,50));\n\n\n\n\n\n //f.pack();\n }", "public static void graph(){\n\t\t double[][] valuepairs = new double[2][];\n\t\t valuepairs[0] = mutTotal; //x values\n\t\t valuepairs[1] = frequency; //y values\n\t\t DefaultXYDataset set = new DefaultXYDataset();\n\t\t set.addSeries(\"Occurances\",valuepairs); \n\t\t XYBarDataset barset = new XYBarDataset(set, .8);\n\t\t JFreeChart chart = ChartFactory.createXYBarChart(\n\t\t \"Mutation Analysis\",\"Number of Mutations\",false,\"Frequency\",\n\t\t barset,PlotOrientation.VERTICAL,true, true, false);\n\t\t JFrame frame = new JFrame(\"Mutation Analysis\");\n\t\t frame.setContentPane(new ChartPanel(chart));\n\t\t frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t frame.pack();\n\t\t frame.setVisible(true);\n\t\t }", "@Override\r\n public void chartMouseClicked(ChartMouseEvent cme) {\n }", "public Visualize() {\n initComponents();\n \n }", "public void MakeXYSpline() {\n\t\tXYSplineButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetXYSplineChartImage())));\n\t\tXYSplineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new XYSplineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"XYSpline Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new XYSplineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(XYSplineButton);\t\n\t}", "void setupBars() {\n\n // ID, Horiz, Left\n bars.add(new LedBar(0, false, true));\n bars.add(new LedBar(1, true, true));\n bars.add(new LedBar(2, false, false));\n bars.add(new LedBar(3, false, true));\n bars.add(new LedBar(4, true, true));\n bars.add(new LedBar(5, true, false));\n bars.add(new LedBar(6, true, false));\n bars.add(new LedBar(7, true, false));\n bars.add(new LedBar(8, true, false));\n bars.add(new LedBar(9, true, true));\n bars.add(new LedBar(10, false, true));\n bars.add(new LedBar(11, false, false));\n bars.add(new LedBar(12, true, true));\n bars.add(new LedBar(13, false, false));\n bars.add(new LedBar(14, false, true));\n\n // hnext, hprev, vbro\n bars.get(0).setLinks(null, null, bars.get(4));\n bars.get(1).setLinks(bars.get(4), bars.get(8), bars.get(3));\n bars.get(2).setLinks(null, null, bars.get(5));\n bars.get(3).setLinks(null, null, bars.get(1));\n bars.get(4).setLinks(bars.get(9), bars.get(1), bars.get(0));\n bars.get(5).setLinks(bars.get(6), bars.get(12), bars.get(2));\n bars.get(6).setLinks(bars.get(7), bars.get(5), bars.get(11));\n bars.get(7).setLinks(bars.get(8), bars.get(6), bars.get(13));\n bars.get(8).setLinks(bars.get(1), bars.get(7), null); //Only one that hasn't got a vertical 'brother'\n bars.get(9).setLinks(bars.get(12), bars.get(4), bars.get(14));\n bars.get(10).setLinks(null, null, bars.get(12));\n bars.get(11).setLinks(null, null, bars.get(6));\n bars.get(12).setLinks(bars.get(5), bars.get(9), bars.get(10));\n bars.get(13).setLinks(null, null, bars.get(7));\n bars.get(14).setLinks(null, null, bars.get(9));\n\n verticals.add(0);\n verticals.add(2);\n verticals.add(3);\n verticals.add(10);\n verticals.add(11);\n verticals.add(13);\n verticals.add(14);\n }", "@Test\n public void test79() throws Throwable {\n DefaultBoxAndWhiskerCategoryDataset defaultBoxAndWhiskerCategoryDataset0 = new DefaultBoxAndWhiskerCategoryDataset();\n SubCategoryAxis subCategoryAxis0 = new SubCategoryAxis(\":HD:3P^w7T\");\n DateAxis dateAxis0 = new DateAxis();\n DefaultPolarItemRenderer defaultPolarItemRenderer0 = new DefaultPolarItemRenderer();\n Color color0 = (Color)defaultPolarItemRenderer0.getBaseFillPaint();\n subCategoryAxis0.setSubLabelPaint(color0);\n StackedBarRenderer3D stackedBarRenderer3D0 = new StackedBarRenderer3D(729.43602760018, 729.43602760018, true);\n CategoryPlot categoryPlot0 = new CategoryPlot((CategoryDataset) defaultBoxAndWhiskerCategoryDataset0, (CategoryAxis) subCategoryAxis0, (ValueAxis) dateAxis0, (CategoryItemRenderer) stackedBarRenderer3D0);\n BasicStroke basicStroke0 = (BasicStroke)categoryPlot0.getRangeGridlineStroke();\n categoryPlot0.setDomainAxis(2052, (CategoryAxis) subCategoryAxis0, true);\n JFreeChart jFreeChart0 = new JFreeChart((Plot) categoryPlot0);\n ChartPanel chartPanel0 = new ChartPanel(jFreeChart0, true);\n ChartRenderingInfo chartRenderingInfo0 = chartPanel0.getChartRenderingInfo();\n PlotRenderingInfo plotRenderingInfo0 = chartRenderingInfo0.getPlotInfo();\n ScrollPane scrollPane0 = null;\n try {\n scrollPane0 = new ScrollPane();\n } catch(HeadlessException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"java.awt.GraphicsEnvironment\", e);\n }\n }", "private BarData generateDataBar() {\n\n ArrayList<BarEntry> entries = new ArrayList<>();\n\n for (int i = 0; i < 12; i++) {\n entries.add(new BarEntry(i, (int) (Math.random() * 70) + 30));\n }\n\n BarDataSet d = new BarDataSet(entries, \"New DataSet 1\");\n // 设置相邻的柱状图之间的距离\n d.setColors(ColorTemplate.VORDIPLOM_COLORS);\n // 设置高亮的透明度\n d.setHighLightAlpha(255);\n\n BarData cd = new BarData(d);\n cd.setBarWidth(0.9f);\n return cd;\n }", "public JPanel createDeclarationButtonBar() {\n\tJPanel buttonBar = new JPanel();\n\tBoxLayout boxlay=new BoxLayout(buttonBar,BoxLayout.Y_AXIS); //i think this does setLayout\n\tbuttonBar.setLayout(boxlay);\n\tbuttonBar.setBorder(new BevelBorder(BevelBorder.RAISED));\n\n\t//alignment = left\n\tFlowLayout flowlay1=new FlowLayout(FlowLayout.LEFT); //left justified\n\tFlowLayout flowlay2=new FlowLayout(FlowLayout.LEFT); //left justified\n\tJPanel buttonTopBar = new JPanel(flowlay1); //left justified\n\tJPanel buttonLowerBar = new JPanel(flowlay2);\n\n\t//JButton addVarTopButton=new JButton(\"Add Top Var\"); \n\tJButton addInputPortButton=new JButton(\"Add InputPort\"); \n\tJButton addOutputPortButton=new JButton(\"Add OutputPort\"); \n\tJButton addSubModuleButton=new JButton(\"Add SubModule\"); \n\tJButton addVarBottomButton=new JButton(\"Add Other Variable\"); \n\n\t//buttonTopBar.add(addVarTopButton);\n\tbuttonTopBar.add(addInputPortButton);\n\tbuttonTopBar.add(addOutputPortButton);\n\tbuttonTopBar.add(addSubModuleButton);\n\tbuttonTopBar.add(addVarBottomButton);\n\n\t//addVarTopButton.addActionListener(this);\n\taddInputPortButton.addActionListener(this);\n\taddOutputPortButton.addActionListener(this);\n\taddSubModuleButton.addActionListener(this);\n\taddVarBottomButton.addActionListener(this);\n\n //lower bar\n\n\tJButton changeButton=new JButton(\"Change\"); \n\tchangeButton.addActionListener(this);\n\tbuttonLowerBar.add(changeButton);\n\n\tJButton changeNameButton=new JButton(\"Change Name\"); \n\tchangeNameButton.addActionListener(this);\n\tbuttonLowerBar.add(changeNameButton);\n\n\tJButton copyButton=new JButton(\"Copy\"); \n\tcopyButton.addActionListener(this);\n\tbuttonLowerBar.add(copyButton);\n\n\tJButton deleteButton=new JButton(\"Delete\"); \n\tdeleteButton.addActionListener(this);\n\tbuttonLowerBar.add(deleteButton);\n\n\tJButton upButton=new JButton(\"Up\"); \n\tupButton.addActionListener(this);\n\tbuttonLowerBar.add(upButton);\n\n\tJButton downButton=new JButton(\"Down\"); \n\tdownButton.addActionListener(this);\n\tbuttonLowerBar.add(downButton);\n\n\tJButton topButton=new JButton(\"Top\"); \n\ttopButton.addActionListener(this);\n\tbuttonLowerBar.add(topButton);\n\n\tJButton bottomButton=new JButton(\"Bottom\"); \n\tbottomButton.addActionListener(this);\n\tbuttonLowerBar.add(bottomButton);\n\n buttonBar.add(buttonTopBar);\n buttonBar.add(buttonLowerBar);\n\treturn(buttonBar);\n }", "public static void barChart(String title, int[] arr) \n {\n CategoryChartBuilder builder = new CategoryChartBuilder();\n builder.width(800);\n builder.height(600);\n builder.title(\"Int array values\");\n builder.xAxisTitle(\"Index\");\n builder.yAxisTitle(\"Number\");\n\n // Add data and title to the chart\n CategoryChart chart = builder.build();\n chart.addSeries(title, null, arr);\n\n // display the chart:\n new SwingWrapper(chart).displayChart();\n }", "private void ChangeBar(int x)\r\n\t{\r\n\t\tString s1=TextField1.getText();\r\n\t\tString s2=TextField2.getText();\r\n\t\tString s3=TextField3.getText();\r\n\t\t \r\n\t\tint red=Integer.parseInt(s1);\r\n\t\tint green=Integer.parseInt(s2);\r\n\t\tint blue=Integer.parseInt(s3);\r\n\t\tint max=getmax(red,green,blue);\r\n\t\t \r\n\t\tif (max > x)\r\n\t\t{\r\n\t\t\tint d = abs(max-x-0);\r\n\t\t\tred -= d;\r\n\t\t\tgreen -= d;\r\n\t\t\tblue -= d;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint d = abs(max+x+100);\r\n\t\t\tred += d;\r\n\t\t\tgreen += d;\r\n\t\t\tblue += d;\r\n\t\t}\r\n\t\tTextField1.setText(String.valueOf(red));\r\n\t\tTextField2.setText(String.valueOf(green));\r\n\t\tTextField3.setText(String.valueOf(blue));\r\n\t\trepaint();\r\n\t\t}", "private void initBarChart() {\n\t\tBarChart<String, Number> chartLinguagens = new BarChart<String, Number>(new CategoryAxis(), new NumberAxis());\n\t\t// define o espaçamento entre as barras.\n\t\tchartLinguagens.setCategoryGap(30);\n\t\t// inserindo o title do grafico\n\t\tchartLinguagens.setTitle(\"Ranking de Linguagens de Programação Mar/2013\");\n\t\t// seta nome e valor de cada linguagem apresentada no grafico\n\t\tXYChart.Data<String, Number> dataJava = new XYChart.Data<String, Number>(\"Java\", 18.156);\n\t\tXYChart.Data<String, Number> dataC = new XYChart.Data<String, Number>(\"C\", 17.141);\n\t\tXYChart.Data<String, Number> dataObjectiveC = new XYChart.Data<String, Number>(\"Objective-C\", 10.230);\n\t\tXYChart.Data<String, Number> dataCPlus = new XYChart.Data<String, Number>(\"C++\", 9.115);\n\t\tXYChart.Data<String, Number> dataCSharp = new XYChart.Data<String, Number>(\"C#\", 6.597);\n\t\tXYChart.Series<String, Number> seriesData = new XYChart.Series<String, Number>();\n\t\t// rodapé ???\n\t\tseriesData.setName(\"Porcentagem (%)\");\n\n\t\tseriesData.getData().addAll(dataJava, dataC, dataObjectiveC, dataCPlus, dataCSharp);\n\n\t\tchartLinguagens.getData().add(seriesData);\n\t\t/* Indicar o BarChart em um painel principal... */\n\t\tpane.getChildren().add(chartLinguagens);\n\t}", "@FXML\n public void addBar() {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingBar(0, 0));\n }", "@Test\n public void test03() throws Throwable {\n TaskSeriesCollection taskSeriesCollection0 = new TaskSeriesCollection();\n CategoryAxis categoryAxis0 = new CategoryAxis(\"6{vVRiz\\\"hj\");\n CyclicNumberAxis cyclicNumberAxis0 = new CyclicNumberAxis(0.65, \"hZo6/@p:U,CZ-vyy \");\n StackedBarRenderer stackedBarRenderer0 = new StackedBarRenderer(false);\n CategoryPlot categoryPlot0 = new CategoryPlot((CategoryDataset) taskSeriesCollection0, categoryAxis0, (ValueAxis) cyclicNumberAxis0, (CategoryItemRenderer) stackedBarRenderer0);\n categoryPlot0.setOutlineVisible(true);\n AxisSpace axisSpace0 = categoryPlot0.getFixedDomainAxisSpace();\n }", "public void setBAxis(String frame,float x,float y, float z){\r\n\t\tsetAxis(\"axisB\",frame,x,y,z);\r\n\t}", "public void clickedRepVA(Button button) {\r\n textShape.setText(\"VA Case Fatality Ratios by Race\");\r\n this.updateRace(5);\r\n this.updateCFR(5);\r\n this.updateBar(5);\r\n }", "public void drawButtons(){\r\n\t\tGuiBooleanButton showDirection = new GuiBooleanButton(1, 10, 20, 150, 20, \"Show Direction\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowdir(), \"showdir\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showdir\").split(\";\"));\r\n\t\tGuiChooseStringButton dirpos = new GuiChooseStringButton(2, width/2+50, 20, 150, 20, \"Dir-Position\", GuiPositions.getPosList(), \"posdir\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosDir()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showFPS= new GuiBooleanButton(3, 10, 45, 150, 20, \"Show FPS\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowfps(), \"showfps\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfps\").split(\";\"));\r\n\t\tGuiChooseStringButton fpspos = new GuiChooseStringButton(4, width/2+50, 45, 150, 20, \"FPS-Position\", GuiPositions.getPosList(), \"posfps\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosFPS()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showCoor = new GuiBooleanButton(5, 10, 70, 150, 20, \"Show Coor\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowcoor(), \"showcoor\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showcoor\").split(\";\"));\r\n\t\tGuiChooseStringButton coorpos = new GuiChooseStringButton(6, width/2+50, 70, 150, 20, \"Coor-Position\", GuiPositions.getPosList(), \"poscoor\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosCoor()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showworldage = new GuiBooleanButton(7, 10, 95, 150, 20, \"Show WorldAge\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowWorldAge(), \"showworldage\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showworldage\").split(\";\"));\r\n\t\tGuiChooseStringButton worldagepos = new GuiChooseStringButton(8, width/2+50, 95, 150, 20, \"WorldAge-Position\", GuiPositions.getPosList(), \"posworldage\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosWorldAge()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\tGuiBooleanButton showFriendly = new GuiBooleanButton(7, 10, 120, 150, 20, \"Mark friendly spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingFriendlySpawns(), \"showfmobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfriendlymobspawn\").split(\";\"));\r\n\t\tGuiBooleanButton showAggressiv = new GuiBooleanButton(7, 10, 145, 150, 20, \"Mark aggressiv spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingAggressivSpawns(), \"showamobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showaggressivmobspawn\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton dynamic = new GuiBooleanButton(7, width/2+50, 120, 150, 20, \"dynamic selection\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isDynamic(), \"dynamichsel\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.dynamicselection\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tGuiButton back = new GuiButton(9, width/2-100,height-50 , \"back to game\");\r\n\t\t\r\n\t\tbuttonList.add(showworldage);\r\n\t\tbuttonList.add(worldagepos);\r\n\t\tbuttonList.add(dirpos);\r\n\t\tbuttonList.add(fpspos);\r\n\t\tbuttonList.add(coorpos);\r\n\t\tbuttonList.add(showCoor);\r\n\t\tbuttonList.add(showFPS);\r\n\t\tbuttonList.add(showDirection);\r\n\t\t\r\n\t\tbuttonList.add(showFriendly);\r\n\t\tbuttonList.add(showAggressiv);\r\n\t\tbuttonList.add(dynamic);\r\n\t\t\r\n\t\tbuttonList.add(back);\r\n\t}", "private JButton getVycvik3Button() {\n\t\tif (vycvik3Button == null) {\n\t\t\tvycvik3Button = new JButton();\n\t\t\tvycvik3Button.setBounds(new Rectangle(148, 253, 74, 25));\n\t\t\tvycvik3Button.setEnabled(false);\n\t\t\tvycvik3Button.setText(\"Výcvik\");\n\t\t\tvycvik3Button.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tmod = \"3v\";\n\t\t\t\t\tucivoText.setText(\"úroveň 3: Ľubovoľné súzvuky\");\n\t\t\t\t\tcvicenieText.setText(\"Výcvik\");\n\t\t\t\t\tsuzvukText.setText(\"Náhodný súzvuk\");\n\t\t\t\t\tspravne = true;\n\t\t\t\t\tpotvrdil = false;\n\n\t\t\t\t\tanalyzaPanel.setVisible(true);\n\t\t\t\t\tmenuPanel.setVisible(false);\n\t\t\t\t\tspodnyPanel.setVisible(true);\n\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\tint[] p;\n\n\t\t\t\t\tint r = rand.nextInt(3);\n\t\t\t\t\t// r = 0;\n\t\t\t\t\tswitch (r) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tpriklad = new Dvojzvuk(rand.nextInt(49) + 36, rand\n\t\t\t\t\t\t\t\t.nextInt(13));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tp = new int[2];\n\t\t\t\t\t\twhile (p[0] == p[1]) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Trojzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tp = new int[3];\n\t\t\t\t\t\twhile ((p[0] == p[1]) || (p[1] == p[2])\n\t\t\t\t\t\t\t\t|| (p[0] == p[2])) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[2] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Stvorzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1], p[2]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn vycvik3Button;\n\t}", "public void MakeScatter() {\n\t\tScatterButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(\n\t\t\t\tGetScatterPlotChartImage())));\n\t\tScatterButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Scatter Plot Chart \", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(ScatterButton);\n\t}", "void toggleButton_actionPerformed(ActionEvent e) {\n this.togglePlot();\n }", "public GUIVerbrauchsdiagramm(String title, EnergyData energyData) {\n super(title);\n this.energyData = energyData;\n setExtendedState(JFrame.MAXIMIZED_BOTH);\n ChartPanel chartPanel = (ChartPanel) createPanel(energyData);\n\n buttonGroup.add(verbrauchDiagramm);\n buttonGroup.add(zaehlerDiagramm);\n pRadiobuttons.add(verbrauchDiagramm);\n pRadiobuttons.add(zaehlerDiagramm);\n pRadiobuttons.setBorder(new EmptyBorder(0, 20, 0, 0));\n verbrauchDiagramm.setSelected(true);\n tDate.setForeground(Color.gray);\n\n pSkipDay.setLayout(new GridLayout(1, 7, 5, 0));\n pSkipDay.add(bBackwardsM);\n pSkipDay.add(bBackwardsW);\n pSkipDay.add(bBackwards);\n pSkipDay.add(tDate);\n pSkipDay.add(bForwards);\n pSkipDay.add(bForwardsW);\n pSkipDay.add(bForwardsM);\n\n pDate.add(lCurrentDate);\n pDate.add(lEmpty2);\n pDate.add(pSkipDay);\n\n\n pCsv.add(bExportCSV);\n pCsv.add(lEmpty);\n pCsv.add(bExportJSON);\n\n\n pHeader.add(pRadiobuttons);\n pHeader.add(pDate);\n pHeader.add(pCsv);\n\n this.add(chartPanel, BorderLayout.CENTER);\n this.add(pHeader, BorderLayout.NORTH);\n\n //Actionlistener\n ActionListener actionListenerDiagramm = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (verbrauchDiagramm.isSelected()) {\n System.out.println(\"Verbrauchsdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetVerbrauchsdiagramm(energyData);\n chart.setTitle(\"Stromzählerübersicht\");\n }\n if (zaehlerDiagramm.isSelected()) {\n System.out.println(\"Zählerdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetZaehlerdiagramm(energyData);\n chart.setTitle(\"Zählerstand\");\n }\n }\n };\n\n bExportCSV.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n try {\n JFileChooser fileChooser = new JFileChooser(\"./CSV\");\n fileChooser.setDialogTitle(\"CSV-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.csv\",\"csv\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".csv\")){\n path = path +\".csv\";\n }\n FileHandler.writeCSV(map,path);\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden in ein CSV-File exportiert\");\n }\n });\n\n bExportJSON.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n FileHandler.saveJSON(map);\n\n try {\n JFileChooser fileChooser = new JFileChooser(\"./JSON\");\n fileChooser.setDialogTitle(\"JSON-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.json\",\"json\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".json\")){\n path = path +\".json\";\n }\n FileWriter fileWriter = new FileWriter(path);\n fileWriter.write(FileHandler.saveJSON(map));\n fileWriter.flush();\n fileWriter.close();\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden zum JSON exportiert \\n\" + \"https://api.npoint.io/0dc854da1619aca3be45\");\n }\n });\n\n bForwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, true);\n }\n });\n\n bBackwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, false);\n }\n });\n bBackwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, false);\n }\n });\n bForwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, true);\n }\n });\n bBackwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, false);\n }\n });\n bForwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, true);\n }\n });\n\n /*chart.getXYPlot().addChangeListener(new PlotChangeListener() {\n @Override\n public void plotChanged(PlotChangeEvent plotChangeEvent) {\n XYPlot plot = plotChangeEvent.getPlot().getChart().getXYPlot();\n PlotChangeListener plotChangeListener = this;\n\n plot.removeChangeListener(plotChangeListener);\n long upperBound = (long) plot.getDomainAxis().getUpperBound();\n long lowerBound = (long) plot.getDomainAxis().getLowerBound();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(upperBound / 900000 * 900000);\n upperBound = calendar.getTimeInMillis();\n\n calendar.setTimeInMillis(lowerBound / 900000 * 900000);\n lowerBound = calendar.getTimeInMillis();\n System.out.println(new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\").format(new Date(lowerBound)));\n\n System.out.println(getEnergyData().getSdatData().containsKey(lowerBound));\n\n double highestValue = 0;\n if (getEnergyData().getSdatData().containsKey(lowerBound)) {\n for (long i = lowerBound; i < upperBound; i = i + 86400000) {\n if (getEnergyData().getSdatData().get(i).getRelativBezug() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getRelativBezug();\n\n }\n if (getEnergyData().getSdatData().get(i).getRelativeEinspeisung() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getZaehlerstandEinspeisung();\n }\n }\n\n System.out.println(highestValue);\n System.out.println(highestValue + 1);\n\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(highestValue + 1);\n }else {\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(plot.getRangeAxis().getUpperBound());\n }\n plot.addChangeListener(plotChangeListener);\n\n }\n\n });\n */\n\n tDate.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent e) {\n checkDate(e);\n }\n\n @Override\n public void keyPressed(KeyEvent e) {\n\n }\n\n @Override\n public void keyReleased(KeyEvent e) {\n\n }\n });\n\n tDate.addFocusListener(new FocusListener() {\n @Override\n public void focusGained(FocusEvent e) {\n if (tDate.getText().equals(\"Datum:\")) {\n tDate.setText(\"\");\n tDate.setForeground(Color.BLACK);\n }\n }\n\n @Override\n public void focusLost(FocusEvent e) {\n if (tDate.getText().isEmpty()) {\n tDate.setForeground(Color.GRAY);\n tDate.setText(\"Datum:\");\n }\n }\n });\n\n\n verbrauchDiagramm.addActionListener(actionListenerDiagramm);\n zaehlerDiagramm.addActionListener(actionListenerDiagramm);\n }", "void createEqualizerControls();", "private void initialize() {\n\t\tfrmcCharts = new JFrame();\n\t\tfrmcCharts.setTitle(\"8C Charts\");\n\t\tfrmcCharts.setBounds(100, 100, 775, 487);\n\t\tfrmcCharts.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(SystemColor.activeCaption);\n\t\tfrmcCharts.getContentPane().add(panel, BorderLayout.CENTER);\n\t\tpanel.setLayout(null);\n\t\t\n\t\tJLabel lblWelcomeToc = new JLabel(\"Welcome to 8C Charts\");\n\t\tlblWelcomeToc.setFont(new Font(\"Tahoma\", Font.BOLD, 20));\n\t\tlblWelcomeToc.setBounds(239, 42, 242, 35);\n\t\tpanel.add(lblWelcomeToc);\n\t\t\n\t\tJButton btnWorkBreakdownTree = new JButton(\"Work Breakdown Tree\");\n\t\tbtnWorkBreakdownTree.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n//\t\t\t\tWBT.main(null);\n\t\t\t\tchartType = \"WBT\";\n//\t\t\t\tframe.dispose();\n\t\t fileLoader.main(null);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnWorkBreakdownTree.setBounds(26, 119, 187, 45);\n\t\tpanel.add(btnWorkBreakdownTree);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"PERT Chart\");\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tchartType = \"PERT\";\n//\t\t\t\tframe.dispose();\n\t\t fileLoader.main(null);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(26, 188, 187, 45);\n\t\tpanel.add(btnNewButton);\n\t\t\n\t\tJButton btnGanttChart = new JButton(\"GANTT Chart\");\n\t\tbtnGanttChart.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tchartType = \"GANTT\";\n\t\t fileLoader.main(null);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnGanttChart.setBounds(26, 259, 187, 45);\n\t\tpanel.add(btnGanttChart);\n\t\t\n\t\tTextArea textArea = new TextArea();\n\t\ttextArea.setEditable(false);\n\t\ttextArea.setBounds(239, 88, 510, 309);\n\t\tpanel.add(textArea);\n\t\ttextArea.setText(\"Welcome to 8C Charts\\r\\n\\r\\n8C Charts can create the perfect charts for all you project planning or schedueling \\r\\nneeds.\\r\\n\\r\\nThis application will allow you to create the following charts:\\r\\n\\r\\nWork Breakdown Tree (WBT):\\r\\n\\t\\r\\nThis diagram is to shows the main tasks that needs to be done and the sub task of \\r\\neach of the main tasks. It will order the tasks in priority of what needs to be done \\r\\nbefore another.\\r\\n\\r\\nPERT Chart:\\r\\n\\r\\nThis chart will have a diagram with all the different task that needs to be done. \\r\\nNext to the task it will also have the start and end dates for which the task \\r\\nneeds to be completed. It will also show you what tasks can be done at the same\\r\\ntime as other tasks and what has to be done before certain task can be started.\\r\\n\\r\\nGANTT Chart:\\r\\n\\r\\nThis chart shows a time line length for different tasks and how long each task will\\r\\ntake. It will also have all the information that the PERT Chart has but includes lines\\r\\nshowing the lastest start and finish time of each task.\\r\\n\\r\\n\");\n\t\t\n\t\tJButton btnDonate = new JButton(\"Donate\");\n\t\tbtnDonate.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\n\t\t donate.main(null);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnDonate.setBounds(660, 414, 89, 23);\n\t\tpanel.add(btnDonate);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tmenuBar.setToolTipText(\"\");\n\t\tmenuBar.setBounds(0, 0, 759, 21);\n\t\tpanel.add(menuBar);\n\t\t\n\t\tJMenu mnFile = new JMenu(\"File\");\n\t\tmenuBar.add(mnFile);\n\t\t\n\t\tJMenu mnWbt = new JMenu(\"WBT\");\n\t\tmenuBar.add(mnWbt);\n\t\t\n\t\tJMenu mnCreateNewFile = new JMenu(\"Create New File\");\n\t\tmnWbt.add(mnCreateNewFile);\n\t\t\n\t\tJMenu mnLoadExistingFile = new JMenu(\"Load Existing File\");\n\t\tmnWbt.add(mnLoadExistingFile);\n\t\t\n\t\tJMenu mnPert = new JMenu(\"PERT\");\n\t\tmenuBar.add(mnPert);\n\t\t\n\t\tJMenu mnCreateNewFile_1 = new JMenu(\"Create New File\");\n\t\tmnPert.add(mnCreateNewFile_1);\n\t\t\n\t\tJMenu mnLoadExistingFile_1 = new JMenu(\"Load Existing File\");\n\t\tmnPert.add(mnLoadExistingFile_1);\n\t\t\n\t\tJMenu mnGantt = new JMenu(\"GANTT\");\n\t\tmenuBar.add(mnGantt);\n\t\t\n\t\tJMenu mnCreateNewFile_2 = new JMenu(\"Create New File\");\n\t\tmnGantt.add(mnCreateNewFile_2);\n\t\t\n\t\tJMenu mnLoadExistingFile_2 = new JMenu(\"Load Existing File\");\n\t\tmnGantt.add(mnLoadExistingFile_2);\n\t\t\n\t\tJMenu mnHelp = new JMenu(\"Help\");\n\t\tmenuBar.add(mnHelp);\n\t\t\n\t\tJMenu mnDonate = new JMenu(\"Donate\");\n\t\tmnHelp.add(mnDonate);\n\t\t\n\t\tJMenu mnUserGuide = new JMenu(\"User Guide\");\n\t\tmnHelp.add(mnUserGuide);\n\t}", "private void labelAbdomen3D() {\r\n \r\n ViewUserInterface.getReference().getMessageFrame().append(\"labelAbdomen3D(): Start\\n\", ViewJFrameMessage.DEBUG);\r\n \r\n // find a seed point inside the subcutaneous fat for a region grow\r\n boolean found = false;\r\n short seedX = 0, seedY = 0, seedZ = 0;\r\n short seedVal = 0;\r\n \r\n for (int idx = 0, z = 0; !found && z < zDim; z++) {\r\n // fill up the slice buffer\r\n try {\r\n srcImage.exportData(z * sliceSize, sliceSize, sliceBuffer);\r\n } catch (IOException ex) {\r\n System.err.println(\"PlugInAlgorithmCTAbdomen.labelAbdomen3D(): Error exporting data on slice: \" +z);\r\n return;\r\n }\r\n \r\n for (int y = 0; !found && y < yDim; y++) {\r\n for (int x = 0; x < xDim; x++, idx++) {\r\n // search for a fat pixel. These are Hounsfield units\r\n if (sliceBuffer[idx] > -75 && sliceBuffer[idx] < -30) {\r\n seedX = (short)x;\r\n seedY = (short)y;\r\n seedZ = (short)z;\r\n seedVal = sliceBuffer[idx];\r\n found = true;\r\n break;\r\n }\r\n } // end for (int x = 0; ...)\r\n } // end for int y = 0; ...)\r\n } // end for (int idx = 0, ...\r\n \r\n\r\n if (seedX < 0 || seedX >= xDim || seedY < 0 || seedY >= yDim || seedZ < 0 || seedZ >= zDim) {\r\n MipavUtil.displayError(\"PlugInAlgorithmCTAbdomen.labelAbdomen3D(): Failed to find a seed location for the region grow\");\r\n return;\r\n }\r\n\r\n// ViewUserInterface.getReference().getMessageFrame().append(\"seed point: \" +seedX +\" \" +seedY +\" \" +seedZ);\r\n// ViewUserInterface.getReference().getMessageFrame().append(\"seed value: \" +seedVal);\r\n\r\n AlgorithmRegionGrow regionGrowAlgo = new AlgorithmRegionGrow(srcImage, 1.0f, 1.0f);\r\n regionGrowAlgo.setRunningInSeparateThread(false);\r\n \r\n CubeBounds regionGrowBounds = new CubeBounds(xDim, 0, yDim, 0, zDim, 0);\r\n\r\n ViewUserInterface.getReference().getMessageFrame().append(\" regionGrow3D: \", ViewJFrameMessage.DEBUG);\r\n long time = System.currentTimeMillis();\r\n\r\n // under segment so that we do not get the blanket\r\n regionGrowAlgo.regionGrow3D(volumeBitSet, new Point3D(seedX, seedY, seedZ), -1,\r\n false, false, null, seedVal - 50,\r\n seedVal + 1500, -1, -1, false, 0, regionGrowBounds);\r\n \r\n ViewUserInterface.getReference().getMessageFrame().append(+((System.currentTimeMillis() - time)) / 1000.0f +\" sec\\n\", ViewJFrameMessage.DEBUG);\r\n\r\n // make the abdominal label image from the volume BitSet determined in the region grow\r\n for (int volIdx = 0, z = 0; z < zDim; z++) {\r\n for (int sliceIdx = 0; sliceIdx < sliceSize; sliceIdx++, volIdx++) {\r\n if (volumeBitSet.get(volIdx)) {\r\n sliceBuffer[sliceIdx] = abdomenTissueLabel;\r\n } else {\r\n sliceBuffer[sliceIdx] = 0;\r\n }\r\n } // end for (int sliceIdx = 0; ...)\r\n // save the sliceBuffer into the abdomenImage\r\n try {\r\n abdomenImage.importData(z * sliceSize, sliceBuffer, false);\r\n } catch (IOException ex) {\r\n System.err.println(\"labelAbdomen3D(): Error importing data\");\r\n }\r\n } // end for (int idx = 0; ...)\r\n\r\n// ShowImage(abdomenImage, \"abdominal label image\");\r\n\r\n // do a mathematical morphology closing operation to fill the small gaps\r\n // do it in 2D so as to not change the 3D shape\r\n ViewUserInterface.getReference().getMessageFrame().append(\" closeImage25D: \", ViewJFrameMessage.DEBUG);\r\n time = System.currentTimeMillis();\r\n closeImage25D(abdomenImage);\r\n ViewUserInterface.getReference().getMessageFrame().append(+((System.currentTimeMillis() - time)) / 1000.0f +\" sec\\n\", ViewJFrameMessage.DEBUG);\r\n \r\n// ShowImage(abdomenImage, \"closed image\");\r\n \r\n \r\n // update the volumeBitSet to match the closed abdomenImage\r\n // This needs to happen if we are going to find the VOI's with a region grow technique\r\n // that uses the volumeBitSet\r\n\r\n ViewUserInterface.getReference().getMessageFrame().append(\" updating the volume BitSet: \", ViewJFrameMessage.DEBUG);\r\n time = System.currentTimeMillis();\r\n volumeBitSet.clear();\r\n for (int volIdx = 0, z = 0; z < zDim; z++) {\r\n // fill up the slice buffer\r\n try {\r\n abdomenImage.exportData(z * sliceSize, sliceSize, sliceBuffer);\r\n } catch (IOException ex) {\r\n System.err.println(\"PlugInAlgorithmCTAbdomen.labelAbdomen3D(): Error exporting data on slice: \" +z);\r\n return;\r\n }\r\n \r\n for (int sliceIdx = 0; sliceIdx < sliceSize; sliceIdx++, volIdx++) {\r\n if (sliceBuffer[sliceIdx] == abdomenTissueLabel) {\r\n volumeBitSet.set(volIdx);\r\n }\r\n } // end for (int sliceIdx = 0; ...)\r\n } // end for (volIdx = 0, ...)\r\n ViewUserInterface.getReference().getMessageFrame().append(+((System.currentTimeMillis() - time)) / 1000.0f +\" sec\\n\", ViewJFrameMessage.DEBUG);\r\n\r\n ViewUserInterface.getReference().getMessageFrame().append(\"labelAbdomen3D(): End\\n\", ViewJFrameMessage.DEBUG);\r\n\r\n }", "@Test\n public void test28() throws Throwable {\n double[][] doubleArray0 = new double[4][3];\n double[] doubleArray1 = new double[0];\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[1];\n doubleArray2[0] = 4394.831255689545;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[5];\n doubleArray3[0] = 4394.831255689545;\n doubleArray3[1] = 4394.831255689545;\n doubleArray3[2] = 4394.831255689545;\n doubleArray3[3] = 4394.831255689545;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[3];\n doubleArray4[0] = 4394.831255689545;\n doubleArray4[1] = 4394.831255689545;\n doubleArray0[3] = doubleArray4;\n DefaultIntervalCategoryDataset defaultIntervalCategoryDataset0 = new DefaultIntervalCategoryDataset(doubleArray0, doubleArray0);\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D(\"org.jfree.data.xy.DefaultWindDataset\");\n Month month0 = new Month();\n ZoneOffset zoneOffset0 = ZoneOffset.MAX;\n ZoneInfo zoneInfo0 = (ZoneInfo)TimeZone.getTimeZone((ZoneId) zoneOffset0);\n PeriodAxis periodAxis0 = new PeriodAxis(\"'Ypi)?q\", (RegularTimePeriod) month0, (RegularTimePeriod) month0, (TimeZone) zoneInfo0);\n LayeredBarRenderer layeredBarRenderer0 = new LayeredBarRenderer();\n CategoryPlot categoryPlot0 = new CategoryPlot((CategoryDataset) defaultIntervalCategoryDataset0, (CategoryAxis) categoryAxis3D0, (ValueAxis) periodAxis0, (CategoryItemRenderer) layeredBarRenderer0);\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo();\n PlotRenderingInfo plotRenderingInfo0 = new PlotRenderingInfo(chartRenderingInfo0);\n CategoryItemRendererState categoryItemRendererState0 = new CategoryItemRendererState(plotRenderingInfo0);\n StandardEntityCollection standardEntityCollection0 = (StandardEntityCollection)categoryItemRendererState0.getEntityCollection();\n ChartRenderingInfo chartRenderingInfo1 = new ChartRenderingInfo((EntityCollection) standardEntityCollection0);\n PlotRenderingInfo plotRenderingInfo1 = chartRenderingInfo1.getPlotInfo();\n categoryPlot0.zoomRangeAxes(4394.831255689545, plotRenderingInfo1, (Point2D) null, false);\n }", "@FXML\n void zOutPressed(ActionEvent event) {\n\t\tcanvas.setScaleX(canvas.getScaleX()*0.9);\n\t\tcanvas.setScaleY(canvas.getScaleY()*0.9);\n }", "private void drawVBar(int c, int r, int g, int b) {\n int rows= currentIm.getRows();\n int cols= currentIm.getCols();\n \n /* inv: pixels currentIm[c..c+4][0..x-1] are color c */\n for (int x= 0; x < rows; x= x+1) {\n \n int alpha= DM.getAlpha(currentIm.getPixel(x,c));\n currentIm.setPixel(x, c, (alpha << 24) | (r << 16) | (g << 8) | b);\n currentIm.setPixel(x, c+1, (alpha << 24) | (r << 16) | (g << 8) | b);\n currentIm.setPixel(x, c+2, (alpha << 24) | (r << 16) | (g << 8) | b);\n currentIm.setPixel(x, c+3, (alpha << 24) | (r << 16) | (g << 8) | b);\n }\n }", "private Button createNewArrayButton(BorderPane root) {\n Button newArr = new Button(\"Generate New Array\");\n\n newArr.setOnMouseClicked(event -> {\n ((HBox) root.getTop()).getChildren().get(2).setDisable(false);\n ((HBox) root.getTop()).getChildren().get(3).setDisable(false);\n\n generateRandomHeights();\n root.setBottom(createSortingDisplay());\n });\n\n return newArr;\n }", "public static String exampleBarChart2() {\n final int MAX_MEDALS = 51;\n Data goldData= DataUtil.scaleWithinRange(0, MAX_MEDALS, Arrays.asList(MAX_MEDALS, 36, 23, 19, 16));\n Data silverData= DataUtil.scaleWithinRange(0, MAX_MEDALS, Arrays.asList(21, 38, 21, 13, 10));\n Data bronzeData= DataUtil.scaleWithinRange(0, MAX_MEDALS, Arrays.asList(28, 36, 28, 15, 15));\n BarChartPlot gold = Plots.newBarChartPlot(goldData, GOLD, \"Gold\");\n BarChartPlot silver = Plots.newBarChartPlot(silverData, SILVER, \"Silver\");\n BarChartPlot bronze = Plots.newBarChartPlot(bronzeData, Color.BROWN, \"Bronze\");\n BarChart chart = GCharts.newBarChart(gold, silver, bronze);\n\n // Defining axis info and styles\n AxisStyle axisStyle = AxisStyle.newAxisStyle(BLACK, 13, AxisTextAlignment.CENTER);\n AxisLabels country = AxisLabelsFactory.newAxisLabels(\"Country\", 50.0);\n country.setAxisStyle(axisStyle);\n AxisLabels countries = AxisLabelsFactory.newAxisLabels(\"Germany\", \"United Kingdom\", \"Russia\", \"USA\", \"China\");\n countries.setAxisStyle(axisStyle);\n AxisLabels medals = AxisLabelsFactory.newAxisLabels(\"Medals\", 50.0);\n medals.setAxisStyle(axisStyle);\n AxisLabels medalCount = AxisLabelsFactory.newNumericRangeAxisLabels(0, MAX_MEDALS);\n medalCount.setAxisStyle(axisStyle);\n\n\n // Adding axis info to chart.\n chart.addXAxisLabels(medalCount);\n chart.addXAxisLabels(medals);\n chart.addYAxisLabels(countries);\n chart.addYAxisLabels(country);\n chart.addTopAxisLabels(medalCount);\n chart.setHorizontal(true);\n chart.setSize(450, 650);\n chart.setSpaceBetweenGroupsOfBars(30);\n\n chart.setTitle(\"2008 Beijing Olympics Medal Count\", BLACK, 16);\n ///51 is the max number of medals.\n chart.setGrid((50.0/MAX_MEDALS)*20, 600, 3, 2);\n chart.setBackgroundFill(Fills.newSolidFill(LIGHTGREY));\n LinearGradientFill fill = Fills.newLinearGradientFill(0, Color.newColor(\"E37600\"), 100);\n fill.addColorAndOffset(Color.newColor(\"DC4800\"), 0);\n chart.setAreaFill(fill);\n String url = chart.toURLString();\n return url;\n }", "@Test\n public void test70() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) null);\n Color color0 = (Color)combinedDomainCategoryPlot0.getRangeGridlinePaint();\n CategoryAxis categoryAxis0 = combinedDomainCategoryPlot0.getDomainAxis();\n JFreeChart jFreeChart0 = new JFreeChart((Plot) combinedDomainCategoryPlot0);\n ChartPanel chartPanel0 = new ChartPanel(jFreeChart0, (-1369), (-797), (-797), (-797), (-797), (-797), true, false, true, true, false, false);\n ChartRenderingInfo chartRenderingInfo0 = chartPanel0.getChartRenderingInfo();\n PlotRenderingInfo plotRenderingInfo0 = new PlotRenderingInfo(chartRenderingInfo0);\n Button button0 = null;\n try {\n button0 = new Button(\"yw{>Kt*0}\");\n } catch(HeadlessException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"java.awt.GraphicsEnvironment\", e);\n }\n }", "@Override\n public void renderButton(MatrixStack matrices, int mouseX, int mouseY, float delta) {\n }", "@Override\n\tpublic boolean is3D() {\n\t\treturn true;\n\t}", "private BarChart.Options getOptions() {\n\t\tBarChart.Options options = BarChart.Options.create();\n\t\toptions.set3D(raised);\n\t\tif (label != null){options.setTitle(label);}\n\t\treturn options;\n\t}", "@Test\n public void test84() throws Throwable {\n Point2D.Double point2D_Double0 = new Point2D.Double();\n point2D_Double0.setLocation(0.0, 0.0);\n CategoryAxis categoryAxis0 = new CategoryAxis(\"\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot(categoryAxis0);\n DefaultPolarItemRenderer defaultPolarItemRenderer0 = new DefaultPolarItemRenderer();\n Color color0 = (Color)defaultPolarItemRenderer0.getItemLabelPaint(871, (-1498));\n Number[][] numberArray0 = new Number[5][3];\n Number[] numberArray1 = new Number[2];\n int int0 = Calendar.LONG_FORMAT;\n numberArray1[0] = (Number) 2;\n int int1 = Float.SIZE;\n numberArray1[1] = (Number) 32;\n numberArray0[0] = numberArray1;\n Number[] numberArray2 = new Number[4];\n numberArray2[0] = (Number) 0.0;\n numberArray2[1] = (Number) 0.0;\n numberArray2[2] = (Number) 0.0;\n numberArray2[3] = (Number) 0.0;\n numberArray0[1] = numberArray2;\n Number[] numberArray3 = new Number[1];\n numberArray3[0] = (Number) 0.0;\n numberArray0[2] = numberArray3;\n Number[] numberArray4 = new Number[7];\n numberArray4[0] = (Number) 0.0;\n long long0 = XYBubbleRenderer.serialVersionUID;\n numberArray4[1] = (Number) (-5221991598674249125L);\n numberArray4[2] = (Number) 0.0;\n numberArray4[3] = (Number) 0.0;\n numberArray4[4] = (Number) 0.0;\n int int2 = JDesktopPane.LIVE_DRAG_MODE;\n numberArray4[5] = (Number) 0;\n numberArray4[6] = (Number) 0.0;\n numberArray0[3] = numberArray4;\n Number[] numberArray5 = new Number[9];\n numberArray5[0] = (Number) 0.0;\n numberArray5[1] = (Number) 0.0;\n numberArray5[2] = (Number) 0.0;\n numberArray5[3] = (Number) 0.0;\n numberArray5[4] = (Number) 0.0;\n numberArray5[5] = (Number) 0.0;\n numberArray5[6] = (Number) 0.0;\n numberArray5[7] = (Number) 0.0;\n int int3 = SwingConstants.HORIZONTAL;\n numberArray5[8] = (Number) 0;\n numberArray0[4] = numberArray5;\n DefaultIntervalCategoryDataset defaultIntervalCategoryDataset0 = new DefaultIntervalCategoryDataset(numberArray0, numberArray0);\n LogarithmicAxis logarithmicAxis0 = new LogarithmicAxis(\"org.jfree.data.ComparableObjectItem\");\n LineAndShapeRenderer lineAndShapeRenderer0 = new LineAndShapeRenderer();\n CategoryPlot categoryPlot0 = null;\n try {\n categoryPlot0 = new CategoryPlot((CategoryDataset) defaultIntervalCategoryDataset0, categoryAxis0, (ValueAxis) logarithmicAxis0, (CategoryItemRenderer) lineAndShapeRenderer0);\n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n assertThrownBy(\"org.jfree.data.category.DefaultIntervalCategoryDataset\", e);\n }\n }", "public ChartFrame(Chart chart) {\r\n\t\tthis.chart = chart;\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c = 0; c < seatGrid[r].length; c++) {\r\n\t\t\t\tJLabel label = new JLabel();\r\n\t\t\t\tlabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n\t\t\t\tseatGrid[r][c] = label;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tremoveBtn = new JButton(\"Remove\");\r\n\t\tremoveBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonRemoveClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taddBtn = new JButton(\"Add\");\r\n\t\taddBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonAddClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tswapBtn = new JButton(\"Swap\");\r\n\t\tswapBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonSwapClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tloadBtn = new JButton(\"Load\");\r\n\t\tloadBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonLoadClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmoveBtn = new JButton(\"Move\");\r\n\t\tmoveBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonMoveClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));\r\n\t\tpanel.setLayout(new GridLayout(7, 5));\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c = 0; c < seatGrid[r].length; c++) {\r\n\t\t\t\tpanel.add(seatGrid[r][c]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < seatGrid[0].length; i++) {\r\n\t\t\tpanel.add(Box.createHorizontalGlue());\r\n\t\t}\r\n\r\n\t\tpanel.add(removeBtn);\r\n\t\tpanel.add(addBtn);\r\n\t\tpanel.add(loadBtn);\r\n\t\tpanel.add(swapBtn);\r\n\t\tpanel.add(moveBtn);\r\n\r\n\t\tadd(panel);\r\n\t\tsetSize(500, 400);\r\n\t\tsetVisible(true);\r\n\t\tsetTitle(\"Seating Chart\");\r\n\t\tupdate();\r\n\r\n\t}", "public interface SupportsBigDataViewerToolBarButton\n{\n int addToolBarButtons(int verticalPosition);\n}", "public CommandBar(String[] towerNames, double ax, \r\n double awidth, double aheight)\r\n {\r\n towerTypes = towerNames;\r\n initX = ax;\r\n width = awidth;\r\n height = aheight;\r\n \r\n //initialize \"buttons\" and dummy list\r\n dummyList = new ArrayList<Unit>();\r\n towerButtons = new Rectangle2D.Double[towerTypes.length];\r\n for (int i = 0; i < towerButtons.length; i++)\r\n {\r\n double x = initX + GAP;\r\n double y = (3*GAP + FONT_SIZE)*i + GAP;\r\n towerButtons[i] = new Rectangle2D.Double(x, y,\r\n width - 2*GAP, \r\n 2*GAP + FONT_SIZE);\r\n dummyList.add(generateDummy(towerTypes[i]));\r\n }\r\n \r\n display = new UnitDisplay();\r\n selectedIndex = -1;\r\n }", "public void addButtonToCoolBar(JButton button) {\n\t\t_coolBar.addButton(button);\n\t}", "private void addGraphButton() {\n\t\tgraphButton = new JButton(\"Graph\");\n\t\tadd (graphButton, SOUTH);\n\t\tgraphButton.addActionListener(this);\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tint month;\n\t\tdouble maxtempereture,monthlytempereture,mintempereture;\n\t\tResultSet rs;\n\t\tlib.MySQL mysql = new lib.MySQL();\n\t\trs = mysql.selectAll();\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\ttry{\n\t\t\twhile(rs.next()){\n\t\t\t\tmonth = rs.getInt(\"Month\");\n\t\t\t\tmaxtempereture = rs.getDouble(\"MaxTempereture\");\n\t\t\t\tmonthlytempereture = rs.getDouble(\"MonthkyTempereture\");\n\t\t\t\tmintempereture = rs.getDouble(\"MinTempereture\");\n System.out.println(\"月:\" + month);\n System.out.println(\"最高気温:\" + maxtempereture);\n System.out.println(\"月間平均気温:\" + monthlytempereture);\n System.out.println(\"最低気温:\" + mintempereture);\n data.addValue(maxtempereture,\"MaxTempereture\",month+\"\");\n data.addValue(monthlytempereture,\"MonthlyTempereture\",month+\"\");\n data.addValue(mintempereture,\"MinTempereture\",month+\"\");\n\t\t }\n\t\t}catch(SQLException et){}\n\t\t JFreeChart chart = \n\t\t\t ChartFactory.createLineChart(\"TOKYO TEMPERETURE\",\n\t\t\t \"month\",\n\t\t\t \"tempereture\",\n\t\t\t data,\n\t\t\t PlotOrientation.VERTICAL,\n\t\t\t true,\n\t\t\t false,\n\t\t\t false);\n \n\n ChartPanel cpanel = new ChartPanel(chart);\n panel1.add(cpanel);\n cardlayout.next(this);\n\t}", "private void btn_stockMouseClicked(java.awt.event.MouseEvent evt) {\n \n }", "@Override\r\n \t\t\t\tpublic void onClick(View v) {\n \t\t\t\t\t\r\n \t\t\t\t\tmRenderer.setZoomButtonsVisible(false);\r\n \t\t\t\t\t\r\n \t\t\t\t\t/*Bitmap bmp = Bitmap.createBitmap( 800, 600, Bitmap.Config.ARGB_8888 );\r\n \t\t\t\t\t\r\n \t\t\t\t\t//Bitmap bmp =Bitmap.createBitmap( mChart.getMeasuredWidth(),mChart.getMeasuredHeight(), Bitmap.Config.ARGB_8888 );\r\n \t\t\t\t\t\r\n \t\t\t\t\tCanvas canvas = new Canvas(bmp);\r\n \t\t\t\t\tmChart.draw( canvas );\r\n \t\t\t\t\t\r\n \t\t\t\t\tFile myDir = new File(Environment.getExternalStorageDirectory() + File.separator + \"SpeakingTime Graphs\"); //pour créer le repertoire dans lequel on va mettre notre fichier\r\n \t\t if (!myDir.exists()) {\r\n \t\t \tmyDir.mkdir(); //On crée le répertoire (s'il n'existe pas!!)\r\n \t\t }\r\n \t\t\t\t\t\r\n \t\t\t\t\tFileOutputStream out = null;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tout = new FileOutputStream(Environment.getExternalStorageDirectory() + File.separator + \"SpeakingTime Graphs\" + File.separator + name.substring(0, name.length() - 4) + \"_bargraph.jpg\");\r\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n \t\t\t\t\tbmp.compress( Bitmap.CompressFormat.JPEG, 97, out );\r\n \t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tout.close();\r\n\t\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}*/\r\n \t\t\t\t\t\r\n \t\t\t\t\tModalDialog modalDialog = new ModalDialog();\r\n\t\t\t\t\t\tString boxplots_name = modalDialog.showModalDialogReunionName(BarGraphActivity.this, \"Give a name to this graph\"); \t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (boxplots_name != \"Cancel\"){\r\n\t\t\t\t\t\t\tif (boxplots_name.equalsIgnoreCase(\"\")){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tAlertDialog.Builder alertDialog = new AlertDialog.Builder(BarGraphActivity.this);\r\n\t\t\t\t\t\t\t\talertDialog.setTitle(\"Warning\");\r\n\t\t\t\t\t\t\t\talertDialog.setMessage(\"GIVE A VALID NAME !\");\r\n\t\t\t\t\t\t\t\talertDialog.show();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (SaveGraphOnDisk(boxplots_name) == \"error\") {\r\n\t\t \t\t\t\t\t\tAlertDialog.Builder alertDialog = new AlertDialog.Builder(BarGraphActivity.this);\r\n\t\t\t\t\t\t\t\t\talertDialog.setTitle(\"Warning\");\r\n\t\t\t\t\t\t\t\t\talertDialog.setMessage(\"The graph can't be saved !\");\r\n\t\t\t\t\t\t\t\t\talertDialog.show();\r\n\t\t \t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n \t\t\t\t\t\r\n \t\t\t\t\t\r\n \t\t\t\t\t\r\n \t\t\t\t\tmRenderer.setZoomButtonsVisible(true);\r\n \t\t\t\t}", "@FXML \n\tprivate void handleQuadradoButtonCH0() throws Exception {\n\t\tif(quadradoButtonCH0.isSelected()){\n\t\t\t//System.out.println(\"quadrado seleteed\");\n\t\t\tdutyFieldCH0.setDisable(false);\n\t\t\tdutyLabelCH0.setText(\"Duty\");\n\t\t\tdutyUnitLabelCH0.setText(\"%\");\n\t\t\tchartDrawer.drawQua();\n\t\t}\n\t\telse{\n\t\t\t//clear the chart\n\t\t\tdutyFieldCH0.setDisable(true);\n\t\t\tchartDrawer.clear();\n\t\t}\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n panel.getChartPanel().restoreAutoBounds();\n }", "@Override\r\n public int getFXLayer()\r\n {\r\n return 3;\r\n }", "public Kal()\n {\n setDefaultCloseOperation( EXIT_ON_CLOSE );\n \n setLayout( new FlowLayout() );\n \n allTheShapes = new Shape[1000];\n \n boxButton = new JButton(\"box\");\n add(boxButton);\n boxButton.addActionListener(this);\n \n addMouseListener(this);\n addMouseMotionListener(this);\n \n setSize( 500,500);\n setVisible( true);\n \n theColorPicker = new ColorPicker3();\n \n }", "public BarChartPanel(String chartTitle, String xAxis, String yAxis, CategoryDataset dataset) {\n\t\t// Plotting a new chart object with, graph title, x-axis title, y-axis title, and dataset which is provided\n\t\tchart = ChartFactory.createBarChart(chartTitle, xAxis, yAxis, dataset, PlotOrientation.VERTICAL, true, true, false);\n\t\t\t\t\n\t\t// Styling the chart\t\n\t\tStandardChartTheme theme = (StandardChartTheme) org.jfree.chart.StandardChartTheme.createJFreeTheme();\n\t\ttheme.setTitlePaint(UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\ttheme.setExtraLargeFont(UI.APPLICATION_THEME_FONT_18_PLAIN); // title\n\t\ttheme.setLargeFont(UI.APPLICATION_THEME_FONT_17_PLAIN); // axis-title\n\t\ttheme.setRegularFont(UI.APPLICATION_THEME_FONT_15_PLAIN);\n\t\ttheme.setRangeGridlinePaint(UI.APPLICATION_THEME_TERTIARY_COLOR);\n\t\ttheme.setPlotOutlinePaint((Paint)UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\ttheme.setPlotBackgroundPaint(UI.APPLICATION_THEME_TERTIARY_COLOR);\n\t\ttheme.setChartBackgroundPaint(UI.APPLICATION_THEME_TERTIARY_COLOR);\n\t\ttheme.setDomainGridlinePaint(UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\ttheme.setAxisOffset(new RectangleInsets(0, 0, 0, 0));\n\t\ttheme.setBarPainter(new StandardBarPainter());\n\t\ttheme.setAxisLabelPaint(UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\ttheme.apply(chart);\n\t\tchart.getCategoryPlot().setOutlineVisible(false);\n\t\tchart.getCategoryPlot().getRangeAxis().setAxisLineVisible(false);\n\t\tchart.getCategoryPlot().getRangeAxis().setTickMarksVisible(false);\n\t\tchart.getCategoryPlot().setRangeGridlineStroke(new BasicStroke());\n\t\tchart.getCategoryPlot().getRangeAxis().setTickLabelPaint(UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\tchart.getCategoryPlot().getDomainAxis().setTickLabelPaint(UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\tValueAxis yAxisRange = chart.getCategoryPlot().getRangeAxis();\n\t\tyAxisRange.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n\t\tchart.setTextAntiAlias(true);\n\t\tchart.setAntiAlias(true);\n\t\tchart.getCategoryPlot().getRenderer().setSeriesPaint(0, UI.APPLICATION_THEME_PRIMARY_COLOR);\n\t\tBarRenderer rend = (BarRenderer) chart.getCategoryPlot().getRenderer();\n\t\trend.setShadowVisible(true);\n\t\trend.setShadowXOffset(2);\n\t\trend.setShadowYOffset(0);\n\t\trend.setShadowPaint(UI.APPLICATION_THEME_QUATERNARY_COLOR);\n\t\trend.setMaximumBarWidth(0.1);\n\t\tchart.removeLegend();\n\t}", "public void mousePressed() {\n if (mouseX > 250 && mouseX < 300 && mouseY > 45 && mouseY < 95) {\n // createWindows();\n // btnMakeWindow.setEnabled(false); createWindows();\n }\n\n if (mouseX > 20 && mouseX < 20+20 && mouseY > 20 && mouseY < 20+20) {\n button = !button;\n }\n if (mouseX > 250 && mouseX < 350 && mouseY > 20 && mouseY < 20+50) {\n\n }\n if (mouseX > 418 && mouseX < 473 && mouseY > 185 && mouseY < 204) {\n rgbEffects();\n }\n if (mouseX > 10 && mouseX < 49 && mouseY > 150 && mouseY < 169) {\n MyController1.getController(\"bar height\").setValue(50);\n MyController2.getController(\"width\").setValue(50);\n input.disableMonitoring();\n }\n if (mouseX > 395 && mouseX < 395+24 && mouseY > 285 && mouseY < 285+24) {\n\n JOptionPane.showMessageDialog(null, \"Audio Visualizer made by Debus Alexy\\nRaccourci clavier : Touche p ou P pour stopper le programme\\nTouche d ou D pour reset\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\n }\n\n if (mouseX > 180 && mouseX < 230 && mouseY > 152 && mouseY < 167) {\n javaColor = JColorChooser.showDialog(null, \"color picker\",Color.WHITE);\n\n\t\tif (javaColor!= null){\n\t\t BEAT = javaColor;\n rgbToHsv(BEAT);\n MyController1.getController(\"Saturation\").setValue((float)s);\n MyController1.getController(\"Brightness\").setValue((float)v);\n h-=90;\n if (h<0){\n h+=360;\n }\n MyController1.getController(\"Hue\").setValue((float)h);\n MyController1.getController(\"Hue\").setColorBackground(color(javaColor.getRed(),javaColor.getGreen(),javaColor.getBlue()));\n // MyController1.getController(\"Hue\").setColorValue(color(255-javaColor.getRed(),255-javaColor.getGreen(),255-javaColor.getBlue()));\n // mon_port.write(javaColor.getRed()+'g'+javaColor.getGreen()+'b'+javaColor.getBlue());\n \t}\n\t\telse {\n\t\t //default\n BEAT = Color.WHITE;\n\t\t}\n\n }\n\n if (mouseX > 430 && mouseX < 469 && mouseY > 290 && mouseY < 309) {\n leaving();\n }\n if (mouseX > 420 && mouseX < 450 && mouseY > 25 && mouseY < 35) {\n MyController1.getController(\"Play\").setValue(1);\n\n }else if (mouseX > 390 && mouseX < 400 && mouseY > 25 && mouseY < 35) {\n MyController1.getController(\"Play\").setValue(0);\n MyController1.getController(\"Beat pulse\").setValue(0);\n }\n\n if (mouseX > 400 && mouseX < 466 && mouseY > 20 && mouseY < 44) {\n buttonPlay = !buttonPlay;\n if (buttonPlay ==true){\n // mon_port.write('1');\n MyController1.getController(\"Play\").setImages(loadImage(\"On.png\"),loadImage(\"On.png\"),loadImage(\"On.png\"));\n }else{\n mon_port.write('0');\n MyController1.getController(\"Play\").setImages(loadImage(\"Off.png\"),loadImage(\"Off.png\"),loadImage(\"Off.png\"));\n }\n }\n}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource() == button1){\n\t\t\tint id,number;\n\t\t\tString year;\n\t\t\tResultSet rs;\n\t\t\tMySQL mysql = new MySQL();\n\t\t\trs = mysql.selectAll();\n\t\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\twhile(rs.next()){\n\t\t\t\tid = rs.getInt(\"id\");\n\t\t\t\tyear = rs.getString(\"year\");\n\t\t\t number = rs.getInt(\"number\");\n\t\t\t data.addValue(number,\"出生数\",year); \n\t \t\t\tpanelA.add(new Label(\"id:\"+id+\" / year\"+year+\" / number\"+number)); \n\t\t\t\t}\n\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\t JFreeChart chart = \n\t\t\t ChartFactory.createLineChart(\"出生率\",\n\t\t\t \"年度\",\n\t\t\t \"万(人)\",\n\t\t\t data,\n\t\t\t PlotOrientation.VERTICAL,\n\t\t\t true,\n\t\t\t false,\n\t\t\t false);\n\n\t\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t\t panelA.add(cpanel);\n\t\t\t cardlayout.next(this);\n\n\t\t}\n\t}", "private javax.swing.JButton getJButton3() {\n\t\tif(jButton3 == null) {\n\t\t\tjButton3 = new javax.swing.JButton();\n\t\t\tjButton3.setPreferredSize(new java.awt.Dimension(120,40));\n\t\t\tjButton3.setBackground(new java.awt.Color(226,226,222));\n\t\t\tjButton3.setText(\"F3 Modificar Detalles\");\n\t\t\tjButton3.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.BOLD, 10));\n\t\t\tjButton3.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n\t\t\tjButton3.setMargin(new Insets(1,2,1,1));\n\t\t\tjButton3.setActionCommand(\"F3 Modificar Detalles\");\n\t\t}\n\t\treturn jButton3;\n\t}", "public void MakePie() {\n\t\tPieButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(GetPieChartImage())));\n\t\tPieButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\tJPanel piecharts = new JPanel();\n\t\t\t\tpiecharts.setLayout(new WrapLayout());\n\t\t\t\tpiecharts.setSize(new Dimension(600,400));\n\t\t\t\tpiecharts.setBackground(Color.WHITE);\n\t\t\t\t\n\t\t\t\tif(GetHost().GetColumns().length == 1){\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\tpiecharts.add(new PieChart(GetHost().GetGraphData(), \n\t\t\t\t\t\t\"Pie Chart\", \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), 0));\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\tpiecharts.add(new PieChart(\n\t\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), 0));\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int i = 1; i<GetHost().GetColumns().length; i++){\n\t\t\t\t\t\t\tSetIncrement(i);\n\t\t\t\t\t\t\tpiecharts.add(new PieChart(\n\t\t\t\t\t\t\tGetHost().GetGraphData(), \"Pie Chart\", \n\t\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), i));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\tfor(int i=1;i<GetHost().GetColumns().length; i++){\n\t\t\t\t\t\t\t\tSetIncrement(i);\n\t\t\t\t\t\t\t\tpiecharts.add(new PieChart(\n\t\t\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), i));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\tHolder = new JScrollPane();\n\t\t\tHolder.setPreferredSize(new Dimension(800,450));\n\t\t\tHolder.setViewportView(piecharts);\n\t\t\tHolder.setVisible(true);\n\t\t\t\t\n\t\t\tGetHost().LeftPanelContent(Holder);\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(PieButton);\t\n\t}", "@Test\n public void test48() throws Throwable {\n Line2D.Double line2D_Double0 = new Line2D.Double(0.0, 0.0, (-3419.6012506212037), (-3419.6012506212037));\n line2D_Double0.y2 = 1830.949;\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D(\"A2mVhdCINzNxW\\\"g@uU\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) categoryAxis3D0);\n CategoryItemRenderer[] categoryItemRendererArray0 = new CategoryItemRenderer[8];\n ScatterRenderer scatterRenderer0 = new ScatterRenderer();\n categoryItemRendererArray0[0] = (CategoryItemRenderer) scatterRenderer0;\n AreaRenderer areaRenderer0 = new AreaRenderer();\n categoryItemRendererArray0[1] = (CategoryItemRenderer) areaRenderer0;\n AreaRenderer areaRenderer1 = new AreaRenderer();\n categoryItemRendererArray0[2] = (CategoryItemRenderer) areaRenderer1;\n StackedBarRenderer stackedBarRenderer0 = new StackedBarRenderer(true);\n categoryItemRendererArray0[3] = (CategoryItemRenderer) stackedBarRenderer0;\n CategoryStepRenderer categoryStepRenderer0 = new CategoryStepRenderer(false);\n categoryItemRendererArray0[4] = (CategoryItemRenderer) categoryStepRenderer0;\n WaterfallBarRenderer waterfallBarRenderer0 = new WaterfallBarRenderer();\n categoryItemRendererArray0[5] = (CategoryItemRenderer) waterfallBarRenderer0;\n StackedBarRenderer3D stackedBarRenderer3D0 = new StackedBarRenderer3D(false);\n categoryItemRendererArray0[6] = (CategoryItemRenderer) stackedBarRenderer3D0;\n IntervalBarRenderer intervalBarRenderer0 = new IntervalBarRenderer();\n categoryItemRendererArray0[7] = (CategoryItemRenderer) intervalBarRenderer0;\n combinedDomainCategoryPlot0.setRenderers(categoryItemRendererArray0);\n StackedBarRenderer3D stackedBarRenderer3D1 = new StackedBarRenderer3D();\n TickUnits tickUnits0 = new TickUnits();\n combinedDomainCategoryPlot0.setRenderer(93, (CategoryItemRenderer) stackedBarRenderer3D1);\n }", "private void createButton() {\n this.setIcon(images.getImageIcon(fileName + \"-button\"));\n this.setActionCommand(command);\n this.setPreferredSize(new Dimension(width, height));\n this.setMaximumSize(new Dimension(width, height));\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n pnlChart = new javax.swing.JPanel();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n pnlChart.setBackground(new java.awt.Color(0, 0, 0));\n pnlChart.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n pnlChart.setForeground(new java.awt.Color(255, 255, 255));\n pnlChart.setAlignmentX(1.5F);\n pnlChart.setAlignmentY(0.35F);\n pnlChart.setMaximumSize(new java.awt.Dimension(1000, 1000));\n pnlChart.setMinimumSize(new java.awt.Dimension(1, 1));\n pnlChart.setPreferredSize(new java.awt.Dimension(1, 1));\n pnlChart.setLayout(new java.awt.BorderLayout());\n\n jButton2.setText(\"jButton2\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n pnlChart.add(jButton2, java.awt.BorderLayout.PAGE_START);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(pnlChart, javax.swing.GroupLayout.PREFERRED_SIZE, 631, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 993, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(pnlChart, javax.swing.GroupLayout.PREFERRED_SIZE, 595, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 801, Short.MAX_VALUE))\n );\n\n pack();\n }", "@FXML\n public void threeQuartersPatternButtonPressed()\n {\n GraphicsContext gc = clearCanvasAndGetGraphicsContext();\n\n // loop to draw lines for each number of lines\n for(int i = 0; i <= lines; i++) {\n\n // draw L shape in bottom left\n gc.strokeLine(\n 0,\n (canvas.getHeight()/lines)*i,\n (canvas.getWidth()/lines)*i,\n canvas.getHeight()\n );\n\n // draw L shape in top right\n gc.strokeLine(\n (canvas.getWidth()/lines)*i,\n 0,\n canvas.getWidth(),\n (canvas.getHeight()/lines)*i\n );\n\n // draw L shape in bottom right\n gc.strokeLine(\n (canvas.getWidth()/lines)*i,\n canvas.getHeight(),\n canvas.getWidth(),\n canvas.getHeight() - (canvas.getHeight()/lines)*i\n );\n }\n }", "private void createRgbHsbButtons() {\n \t\n Composite comp1 = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(3, false);\n gl.horizontalSpacing = 10;\n comp1.setLayout(gl);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n comp1.setLayoutData(gd);\n\n // Create a group to contain the RGB and HSB radio buttons.\n Group colorGroup = new Group(comp1, SWT.NONE);\n colorGroup.setText(\" Use color model: \");\n\n RowLayout groupRowLayout = new RowLayout();\n groupRowLayout.marginLeft = 10;\n groupRowLayout.marginRight = 10;\n groupRowLayout.spacing = 10;\n colorGroup.setLayout(groupRowLayout);\n\n // Create the RGB radio button. When the radio button is selected\n // update the upper and lower color wheel objects to display the RGB\n // sliders.\n rgbRdo = new Button(colorGroup, SWT.RADIO);\n rgbRdo.setText(\"RGB\");\n rgbRdo.setSelection(true);\n rgbRdo.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n changeColorWheels();\n }\n });\n\n // Create the HSB radio button. When the radio button is selected\n // update the upper and lower color wheel objects to display the HSB\n // sliders.\n hsbRdo = new Button(colorGroup, SWT.RADIO);\n hsbRdo.setText(\"HSB\");\n hsbRdo.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n changeColorWheels();\n }\n });\n \n Composite catComp = new Composite(comp1, SWT.NONE);\n gl = new GridLayout(1, false);\n gl.horizontalSpacing = 20;\n catComp.setLayout(gl);\n gd = new GridData(GridData.CENTER);\n gd.horizontalAlignment = SWT.CENTER;\n \n catComp.setLayoutData(gd);\n\n Label selCatLbl = new Label( catComp, SWT.None );\n selCatLbl.setText(\"Category\");\n \n final Combo selCmapCatCombo = new Combo( catComp, SWT.DROP_DOWN | SWT.READ_ONLY );\n selCmapCatCombo.setItems( availColorMapCats );\n selCmapCatCombo.select(0);\n \n selCmapCatCombo.addSelectionListener( new SelectionAdapter() {\n \tpublic void widgetSelected(SelectionEvent event) {\n \t\tString seldCat = selCmapCatCombo.getText();\n \t\tif( seldCat.equals( seldCmapCat ) ) {\n \t\t\treturn;\n \t\t}\n \t\t\n \t\tseldCmapCat = seldCat;\n \t\tseldCmapName = null;\n \t\tavailColorMaps.clear();\n \t\t\n for( String cmap : ColorMapUtil.listColorMaps(seldCmapCat) ) {\n \tif( seldCmapName == null ) {\n \t\tseldCmapName = cmap;\n \t\tif( !initColorMap() ) {\n \t\tseldCmapName = null;\n \t\t\tcontinue; // don't add to the list\n \t\t}\n \t}\n \tavailColorMaps.add(cmap);\n }\n \t\n createSliderData();\n selCmapCombo.setItems( availColorMaps.toArray(new String[0] ) );\n selCmapCombo.select(0);\n colorBar.setNewColorMap(sliderText, colorArray);\n \t}\n });\n \n Composite cmapComp = new Composite(comp1, SWT.NONE);\n gl = new GridLayout(1, false);\n gl.horizontalSpacing = 10;\n cmapComp.setLayout(gl);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n cmapComp.setLayoutData(gd);\n\n Label selCmapLbl = new Label( cmapComp, SWT.None );\n selCmapLbl.setText(\"Colormap\");\n \n selCmapCombo = new Combo( cmapComp, SWT.DROP_DOWN );\n selCmapCombo.setItems( availColorMaps.toArray(new String[0] ) );\n selCmapCombo.select(0);\n \n selCmapCombo.addSelectionListener( new SelectionAdapter() {\n \tpublic void widgetSelected(SelectionEvent event) {\n \t\tString seldCmap = selCmapCombo.getText();\n \t\tif( seldCmap.equals( seldCmapName ) ) {\n \t\t\treturn;\n \t\t}\n \t\t\n \t\tseldCmapName = seldCmap;\n\n \t\tif( initColorMap() ) {\n createSliderData();\n \t\t}\n colorBar.setNewColorMap(sliderText, colorArray);\n \t}\n });\n \n// selCmapCombo.addModifyListener( new ModifyListener() {\n//\t\t\t@Override\n//\t\t\tpublic void modifyText(ModifyEvent e) { \n//\t\t\t\tseldCmapName = selCmapCombo.getText();\n//\t\t\t}\n// });\n }", "@Override\r\n protected final Control createButtonBar(Composite parent) {\n return null;\r\n }", "public void level3Button(ActionEvent event) throws IOException {\r\n\t\tParent lv3View = FXMLLoader.load(getClass().getResource(\"Level3Scene.fxml\"));\r\n\t\tScene lv3ViewScene = new Scene(lv3View);\r\n\t\tStage window = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n\t\twindow.setScene(lv3ViewScene);\r\n\t\twindow.show();\r\n\r\n\r\n\t}", "private void createGenerateButton(final ToolBar bar) {\r\n // image's source:\r\n // http://pixabay.com/de/w%C3%BCrfel-sechs-gesichter-rollen-35637/\r\n createButton(bar, \"images/dice-35637_640.png\", \"Generate\",\r\n new GenerateButtonListener(this));\r\n }", "protected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \" 设 置 \",\n\t\t\t\ttrue);//IDialogConstants.CANCEL_LABEL\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\" 取 消 \", false);//IDialogConstants.CANCEL_LABEL\n\t}", "public SketchBarChart(String colour, String outlineColour, Integer offset) {\n super(\"bar_sketch\");\n setColour(colour);\n setOutlineColour(outlineColour);\n setOffset(offset);\n }", "private JButton getSkuska3Button() {\n\t\tif (skuska3Button == null) {\n\t\t\tskuska3Button = new JButton();\n\t\t\tskuska3Button.setEnabled(false);\n\t\t\tskuska3Button.setSize(new Dimension(83, 25));\n\t\t\tskuska3Button.setLocation(new Point(227, 253));\n\t\t\tskuska3Button.setText(\"Skúška\");\n\t\t\tskuska3Button.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tmod = \"3s\";\n\t\t\t\t\tucivoText.setText(\"úroveň 3: Ľubovoľné súzvuky\");\n\t\t\t\t\tcvicenieText.setText(\"Skúška\");\n\t\t\t\t\tsuzvukText.setText(\"súzvuk 1/10\");\n\t\t\t\t\tspravne = true;\n\t\t\t\t\tpotvrdil = false;\n\n\t\t\t\t\tanalyzaPanel.setVisible(true);\n\t\t\t\t\tmenuPanel.setVisible(false);\n\t\t\t\t\tspodnyPanel.setVisible(true);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\tint[] p;\n\n\t\t\t\t\tint r = rand.nextInt(3);\n\t\t\t\t\t// r = 2;\n\t\t\t\t\tswitch (r) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tpriklad = new Dvojzvuk(\n\t\t\t\t\t\t\t\trand.nextInt(49) + 36, rand\n\t\t\t\t\t\t\t\t\t\t.nextInt(13));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tp = new int[2];\n\t\t\t\t\t\twhile (p[0] == p[1]) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Trojzvuk(\n\t\t\t\t\t\t\t\trand.nextInt(49) + 36, p[0], p[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tp = new int[3];\n\t\t\t\t\t\twhile ((p[0] == p[1]) || (p[1] == p[2])\n\t\t\t\t\t\t\t\t|| (p[0] == p[2])) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[2] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Stvorzvuk(\n\t\t\t\t\t\t\t\trand.nextInt(49) + 36, p[0], p[1],\n\t\t\t\t\t\t\t\tp[2]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn skuska3Button;\n\t}", "protected void maintainInAxis(Coord2d mouse) {\n View view = getChart().getView();\n View2DLayout layout = view.get2DLayout();\n\n BoundingBox3d bounds3d = getChart().getView().getBounds();\n\n\n\n // Get corners\n Coord3d cornerMin3D = null;\n Coord3d cornerMax3D = null;\n\n\n if (view.is2D_XY()) {\n // no flip : take X min for bottom left corner\n if (layout.isNoAxisFlipped()) {\n cornerMin3D = bounds3d.getCorners().getXminYminZmin();\n cornerMax3D = bounds3d.getCorners().getXmaxYmaxZmax();\n }\n // horizontal flip : take X max for bottom left corner\n else if (layout.isHorizontalAxisFlipOnly()) {\n cornerMin3D = bounds3d.getCorners().getXmaxYminZmin();\n cornerMax3D = bounds3d.getCorners().getXminYmaxZmax();\n }\n // vertical flip : take Y max for bottom left corner\n else if (layout.isVerticalAxisFlipOnly()) {\n cornerMin3D = bounds3d.getCorners().getXminYmaxZmin();\n cornerMax3D = bounds3d.getCorners().getXmaxYminZmax();\n }\n // both of the two above\n else if (layout.isBothAxisFlipped()) {\n cornerMin3D = bounds3d.getCorners().getXmaxYmaxZmin();\n cornerMax3D = bounds3d.getCorners().getXminYminZmax();\n }\n }\n\n else if (view.is2D_XZ()) {\n // no flip : take X min for bottom left corner\n if (layout.isNoAxisFlipped()) {\n cornerMin3D = bounds3d.getCorners().getXminYminZmin();\n cornerMax3D = bounds3d.getCorners().getXmaxYmaxZmax();\n }\n // horizontal flip : take X max for bottom left corner\n else if (layout.isHorizontalAxisFlipOnly()) {\n cornerMin3D = bounds3d.getCorners().getXmaxYminZmin();\n cornerMax3D = bounds3d.getCorners().getXminYmaxZmax();\n }\n // vertical flip : take Y max for bottom left corner\n else if (layout.isVerticalAxisFlipOnly()) {\n cornerMin3D = bounds3d.getCorners().getXminYminZmax();\n cornerMax3D = bounds3d.getCorners().getXmaxYmaxZmin();\n }\n // both of the two above\n else if (layout.isBothAxisFlipped()) {\n cornerMin3D = bounds3d.getCorners().getXmaxYminZmax();\n cornerMax3D = bounds3d.getCorners().getXminYmaxZmin();\n }\n }\n\n else if (view.is2D_YZ()) {\n // no flip : take X min for bottom left corner\n if (layout.isNoAxisFlipped()) {\n cornerMin3D = bounds3d.getCorners().getXminYminZmin();\n cornerMax3D = bounds3d.getCorners().getXmaxYmaxZmax();\n }\n // horizontal flip : take X max for bottom left corner\n else if (layout.isHorizontalAxisFlipOnly()) {\n cornerMin3D = bounds3d.getCorners().getXminYmaxZmin();\n cornerMax3D = bounds3d.getCorners().getXmaxYminZmax();\n }\n // vertical flip : take Y max for bottom left corner\n else if (layout.isVerticalAxisFlipOnly()) {\n cornerMin3D = bounds3d.getCorners().getXminYminZmax();\n cornerMax3D = bounds3d.getCorners().getXmaxYmaxZmin();\n }\n // both of the two above\n else if (layout.isBothAxisFlipped()) {\n cornerMin3D = bounds3d.getCorners().getXminYmaxZmax();\n cornerMax3D = bounds3d.getCorners().getXmaxYminZmin();\n }\n }\n\n // System.out.println(\"Corner min 3D : \" + cornerMin3D);\n // System.out.println(\"Corner max 3D : \" + cornerMax3D);\n\n // Project 3D bounds to 2D\n Coord3d cornerMin2D = modelToScreen(cornerMin3D); // bottom left\n Coord3d cornerMax2D = modelToScreen(cornerMax3D); // top right\n\n Coord2d scale = scaled?new Coord2d(1,1):getChart().getView().getPixelScale();\n \n cornerMin2D.x /= scale.x; \n cornerMin2D.y /= scale.y; \n cornerMax2D.x /= scale.x; \n cornerMax2D.y /= scale.y; \n \n // System.out.println(mouse + \" corner min \" + cornerMin2D + \" corner max \" + cornerMax2D);\n\n // System.out.println(\"Corner min 2D : \" + cornerMin);\n // System.out.println(\"Corner max 2D : \" + cornerMax);\n\n // Crop on X bounds\n if (mouse.x < cornerMin2D.x)\n mouse.x = cornerMin2D.x;\n if (mouse.x > cornerMax2D.x)\n mouse.x = cornerMax2D.x;\n\n // Crop on Y bounds\n int height = (int)(getChart().getCanvas().getRendererHeight() / scale.y);\n\n float flipedCornerMinY = height - cornerMin2D.y;\n float flipedCornerMaxY = height - cornerMax2D.y;\n float flipedMouseY = height - mouse.y;\n\n if (flipedMouseY < cornerMin2D.y)\n mouse.y = flipedCornerMinY;\n if (flipedMouseY > cornerMax2D.y)\n mouse.y = flipedCornerMaxY;\n }" ]
[ "0.68384355", "0.6334129", "0.60796446", "0.6037572", "0.6011259", "0.599449", "0.5903555", "0.58953434", "0.58294106", "0.57593685", "0.56067806", "0.56050235", "0.5598575", "0.55896914", "0.5575991", "0.5557324", "0.55409616", "0.5540775", "0.5540731", "0.55208755", "0.55198205", "0.5518831", "0.5505172", "0.5502364", "0.5483515", "0.54348236", "0.5431266", "0.5430627", "0.5397757", "0.5376853", "0.5362215", "0.53604954", "0.5358345", "0.5347086", "0.53331476", "0.53315735", "0.53295434", "0.5326322", "0.53176796", "0.53128815", "0.52926946", "0.52851194", "0.52844244", "0.5283124", "0.5272562", "0.5264809", "0.526228", "0.5255747", "0.52488756", "0.5247061", "0.5233769", "0.52173895", "0.5211946", "0.52034724", "0.52009565", "0.51958346", "0.5189674", "0.5177328", "0.5170739", "0.51628846", "0.5159632", "0.5158076", "0.5155742", "0.51539683", "0.5152976", "0.51522464", "0.51516175", "0.5149896", "0.5141526", "0.5132256", "0.5130708", "0.5125827", "0.5121592", "0.5120551", "0.5118584", "0.51164246", "0.511594", "0.51151663", "0.5103616", "0.51031405", "0.51007825", "0.50934136", "0.5093097", "0.50927085", "0.5092535", "0.50907105", "0.50894964", "0.5087932", "0.50870246", "0.5083259", "0.50832224", "0.5075692", "0.5070773", "0.5065442", "0.5063262", "0.5062708", "0.50554496", "0.5052036", "0.505069", "0.50500363" ]
0.86328816
0
Makes the Bubble Chart button
public void MakeBubble() { BubbleButton = new JButton( new ImageIcon(getClass().getResource(GetBubbleChartImage()))); BubbleButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { GetHost().instructionText.setVisible(false); GetHost().ExportEnabled(); if(GetHost().GetColumns().length >= 3){ if(GetHost().GetTitle() == UNSET) { GetHost().LeftPanelContent(new BubbleChart( GetHost().GetGraphData(), "Bubble Chart", GetHost().GetColourScheme(), GetHost())); }else { GetHost().LeftPanelContent(new BubbleChart( GetHost().GetGraphData(), GetHost().GetTitle(), GetHost().GetColourScheme(), GetHost())); } } else { JOptionPane.showMessageDialog(null, "You must have three columns selected to use this chart", "Bubble Chart Format", JOptionPane.ERROR_MESSAGE); } } }); ChartTypeInterface.add(BubbleButton); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void MakeScatter() {\n\t\tScatterButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(\n\t\t\t\tGetScatterPlotChartImage())));\n\t\tScatterButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Scatter Plot Chart \", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(ScatterButton);\n\t}", "public void MakeBar() {\n\t\tBarButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(GetBarChartImage())));\t\n\t\tBarButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Bar chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BarButton);\t\n\t}", "public void MakeStacked() {\n\t\tStackedButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetStackedAreaChartImage())));\n\t\tStackedButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Stacked Area Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(StackedButton);\n\t}", "public void MakeBar3D() {\n\t\tBarButton3D = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t\tGet3DBarChartImage())));\n\t\tBarButton3D.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\t\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart3D(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"3D Bar Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart3D(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\t\n\t\t\n\t\tChartTypeInterface.add(BarButton3D);\n\t}", "private void addGraphButton() {\n\t\tgraphButton = new JButton(\"Graph\");\n\t\tadd (graphButton, SOUTH);\n\t\tgraphButton.addActionListener(this);\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\t \n\t\t for(int g = 0;g<i;g++){\n\t\t String s = String.valueOf(datas[1][g]);\n\t\t data.addValue(this.datas[2][g], this.name[g], s);\n\t\t }\n\t\t \n\t\t if(e.getSource() == button1){\n\t\t JFreeChart chart = ChartFactory.createLineChart(\"Import Volume\",\n\t\t \"Year\",\n\t\t \"Ton\",\n\t\t data,\n\t\t PlotOrientation.VERTICAL,\n\t\t true,\n\t\t false,\n\t\t false);\n\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t add(cpanel, BorderLayout.CENTER);\n\t\t setVisible(true);\n\t\t } else if(e.getSource() == button2){\n\t\t\t JFreeChart chart = ChartFactory.createBarChart(\"Import Volume\",\n \"Year\",\n \"Ton\",\n data,\n PlotOrientation.VERTICAL,\n true,\n false,\n false);\n\t\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t\t add(cpanel, BorderLayout.CENTER);\n\t\t\t setVisible(true);\n} \n\n\t\t\n\t}", "public void chartMouseClicked(ChartMouseEvent event) {\n }", "public void mouseClicked(MouseEvent e) {\n\t\t\tJLabel button = (JLabel)e.getSource();\n\t\t//BorderFactory.createLoweredBevelBorder());\n\t\t\t\n\t\t}", "public void buttonPressed(){\r\n\t\tsetBorder(new BevelBorder(10));\r\n\t}", "@Override\r\n public void chartMouseClicked(ChartMouseEvent cme) {\n }", "public BubbleChart(Context context, AttributeSet attrs) { super(context, attrs); }", "public void MakeLine() {\n\t\tLineButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetLineChartImage())));\n\t\tLineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Line Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(LineButton);\n\t}", "private Button createNewArrayButton(BorderPane root) {\n Button newArr = new Button(\"Generate New Array\");\n\n newArr.setOnMouseClicked(event -> {\n ((HBox) root.getTop()).getChildren().get(2).setDisable(false);\n ((HBox) root.getTop()).getChildren().get(3).setDisable(false);\n\n generateRandomHeights();\n root.setBottom(createSortingDisplay());\n });\n\n return newArr;\n }", "public void MakeXYSpline() {\n\t\tXYSplineButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetXYSplineChartImage())));\n\t\tXYSplineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new XYSplineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"XYSpline Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new XYSplineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(XYSplineButton);\t\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n panelChart = new javax.swing.JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jButton1.setText(\"Balansas\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n panelChart.setBackground(new java.awt.Color(255, 255, 255));\n panelChart.setLayout(new java.awt.BorderLayout());\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelChart, javax.swing.GroupLayout.DEFAULT_SIZE, 686, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGap(306, 306, 306)\n .addComponent(jButton1)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(panelChart, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addContainerGap())\n );\n\n pack();\n }", "public void makeCheckBEButton() {\r\n JButton checkBE = new JButton(\"Check if a champion can be purchased with Blue Essence\");\r\n new Button(checkBE, main);\r\n// checkBE.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// checkBE.setPreferredSize(new Dimension(2500, 100));\r\n// checkBE.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n checkBE.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n checkBlueEssenceBalanceDifference();\r\n }\r\n });\r\n// main.add(checkBE);\r\n }", "private void constructChartPanel() {\n chartPanel = new JPanel();\n chartPanel.setBorder(BorderFactory.createTitledBorder(\"Price Chart\"));\n chartPanel.setPreferredSize(relativeSize(0.4f, 0.35f));\n \n displayChartButton = new JButton(\"Click to Display Price Chart\");\n displayChartButton.setEnabled(false);\n displayChartButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n JPanel cPanel = chart.getChartPanel();\n chartPanel.removeAll();\n chartPanel.add(cPanel);\n cPanel.setPreferredSize(relativeSize(0.4f, 0.35f));\n \n pack();\n repaint();\n }\n });\n \n chartPanel.add(displayChartButton);\n }", "public BubbleChart(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); }", "public void MakePie() {\n\t\tPieButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(GetPieChartImage())));\n\t\tPieButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\tJPanel piecharts = new JPanel();\n\t\t\t\tpiecharts.setLayout(new WrapLayout());\n\t\t\t\tpiecharts.setSize(new Dimension(600,400));\n\t\t\t\tpiecharts.setBackground(Color.WHITE);\n\t\t\t\t\n\t\t\t\tif(GetHost().GetColumns().length == 1){\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\tpiecharts.add(new PieChart(GetHost().GetGraphData(), \n\t\t\t\t\t\t\"Pie Chart\", \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), 0));\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\tpiecharts.add(new PieChart(\n\t\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), 0));\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int i = 1; i<GetHost().GetColumns().length; i++){\n\t\t\t\t\t\t\tSetIncrement(i);\n\t\t\t\t\t\t\tpiecharts.add(new PieChart(\n\t\t\t\t\t\t\tGetHost().GetGraphData(), \"Pie Chart\", \n\t\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), i));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\tfor(int i=1;i<GetHost().GetColumns().length; i++){\n\t\t\t\t\t\t\t\tSetIncrement(i);\n\t\t\t\t\t\t\t\tpiecharts.add(new PieChart(\n\t\t\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), i));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\tHolder = new JScrollPane();\n\t\t\tHolder.setPreferredSize(new Dimension(800,450));\n\t\t\tHolder.setViewportView(piecharts);\n\t\t\tHolder.setVisible(true);\n\t\t\t\t\n\t\t\tGetHost().LeftPanelContent(Holder);\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(PieButton);\t\n\t}", "private void btn_stockMouseClicked(java.awt.event.MouseEvent evt) {\n \n }", "private void createButton() {\n this.setIcon(images.getImageIcon(fileName + \"-button\"));\n this.setActionCommand(command);\n this.setPreferredSize(new Dimension(width, height));\n this.setMaximumSize(new Dimension(width, height));\n }", "public Button(){\n id=1+nbrButton++;\n setBounds(((id-1)*getDimX())/(Data.getNbrLevelAviable()+1),((id-1)*getDimY())/(Data.getNbrLevelAviable()+1),getDimX()/(2*Data.getNbrLevelAviable()),getDimY()/(2*Data.getNbrLevelAviable()));\n setText(id+\"\");\n setFont(Data.getFont());\n addMouseListener(this);\n setVisible(true);\n }", "void toggleButton_actionPerformed(ActionEvent e) {\n this.togglePlot();\n }", "public void makeGetRPButton() {\r\n JButton getRP = new JButton(\"Check if a champion can be purchased with Riot Points\");\r\n new Button(getRP, main);\r\n// getRP.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// getRP.setPreferredSize(new Dimension(2500, 100));\r\n// getRP.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n getRP.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n getRiotPointsBalanceDifference();\r\n }\r\n });\r\n// main.add(getRP);\r\n }", "@Override\n\tpublic void callButton(TrafficSignal TS) {\n\t\t\n\t}", "private void createButton(){\n addButton();\n addStartButton();\n }", "private void bubbleDown() \n\t{\n\t}", "@Override\n\tprotected void buildButton() {\n\t\t\n\t}", "public ZeePanel(Spel spel) {\n this.spel = spel;\n buttons = new JButton[16][16];\n setLayout(new GridLayout(16,16,5,5));\n for (int rij=0;rij<16;rij++)\n {\n for (int kolom=0;kolom<16;kolom++)\n {\n buttons[rij][kolom] = new JButton();\n buttons[rij][kolom].setBackground(Color.CYAN);\n add(buttons[rij][kolom]);\n buttons[rij][kolom].addActionListener(this);\n buttons[rij][kolom].setActionCommand(rij + \",\" + kolom);\n }\n }\n }", "public void buttonClicked();", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmCustomViewGroup.updateViewLayout(childView,new ViewGroup.LayoutParams(50, 50));\r\n\t\t\t\tcellChildView = new Button(MainActivity.this);\r\n\t\t\t\tcellChildView.setText(\"1111\");\r\n\t\t\t\tCellLayoutParams cellLayoutParams = new CellLayoutParams(0, 0, 100, 100);\r\n\t\t\t\tmCellViewGroup.addView(cellChildView, cellLayoutParams);\r\n\t\t\t}", "private void initialize() {\r\n\t\t//frame = new JFrame();\r\n\t\tframe.setSize(725, 482);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t//frame.getContentPane().setLayout(null);\r\n\t\t\r\n\t\t\r\n\t\tDefaultCategoryDataset dataset= new DefaultCategoryDataset();\r\n\t\t//JOptionPane.showMessageDialog(null, \"BUTTON CLICKED!!!\");\r\n\t\t//LableMessage.setText(\"BUTTON CLICKED!!!\");\r\n\t\t\r\n\t\t//Pain, Drowsiness, Nausea, Anxiety, and Depression\r\n\t\tdataset.setValue(2, \"day1\",\"Pain\");\r\n\t\tdataset.setValue(5, \"day2\",\"Pain\");\r\n\t\tdataset.setValue(4, \"day3\",\"Pain\");\r\n\t\tdataset.setValue(6, \"day1\", \"Drowsiness\");\r\n\t\tdataset.setValue(10, \"day2\", \"Drowsiness\");\r\n\t\tdataset.setValue(8, \"day3\", \"Drowsiness\");\r\n\t\tdataset.setValue(1, \"day1\", \"Nausea\");\r\n\t\tdataset.setValue(7, \"day2\", \"Nausea\");\r\n\t\tdataset.setValue(5, \"day3\", \"Nausea\");\r\n\t\tdataset.setValue(3,\"day1\",\"Anxiety\");\t\r\n\t\tdataset.setValue(8,\"day2\",\"Anxiety\");\r\n\t\tdataset.setValue(9,\"day3\",\"Anxiety\");\r\n\t\tdataset.setValue(8, \"day1\", \"Depression\");\r\n\t\tdataset.setValue(7, \"day2\", \"Depression\");\r\n\t\tdataset.setValue(9, \"day3\", \"Depression\");\r\n\t\tint test[] = new int[7];\r\n\t\tfor (int i=0;i<7; i++)\r\n\t\t{\r\n\t\t\ttest[i]=5;\r\n\t\t}\r\n\t\tDefaultCategoryDataset dataset2= new DefaultCategoryDataset();\r\n\t\t//dataset2 = dataSetInit(P1.getEnterSymptomLevel(),P1.getPreviousSymptomLevel1(),P1.getPreviousSymptomLevel2());\r\n\t\tdataset2 = dataSetInit(test,test,test);\r\n\t\t//P1.getEnter\r\n\t\t//DefaultCategoryDataset dataset2= new DefaultCategoryDataset();\r\n\r\n\t\t//JFreeChart chart= ChartFactory.createBarChart(P1.firstName+\" \"+P1.lastName,\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\r\n\t\tJFreeChart chart= ChartFactory.createBarChart3D(\"Symptom Report\",\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,true,true,true);\r\n\t\t//JFreeChart chart2= ChartFactory.createBarChart(\"Symptom Report\",\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\t\tchart.setBackgroundPaint(Color.lightGray);\r\n\t\t//JFreeChart chart2= ChartFactory.createBarChart(\"Grade Report\",\"Student Name\", \"Marks\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\t\t\r\n\t\tChartPanel chartPanel = new ChartPanel(chart);\r\n\t\tchartPanel.setPreferredSize(new Dimension(700,350));\r\n\t\tPan.add(chartPanel);\r\n\t\t\r\n\t\tframe.getContentPane().add(Pan);\r\n\t\tCategoryPlot p=chart.getCategoryPlot();\r\n\t\tp.setRangeGridlinePaint(Color.red);\r\n\t\tp.setBackgroundPaint(Color.WHITE);\r\n\t\tframe.setVisible(true);\r\n//\t\tChartFrame frame= new ChartFrame(\"Bar Graph Test\",chart,false);\r\n//\t\t\r\n//\t\tframe.setVisible(true);\r\n//\t\tframe.setSize(700,350);\r\n//\t\tframe.setResizable(false);\r\n\t\t//frame2 =new JFrame()\r\n\t}", "private void addButtons() {\r\n\t\troot.getChildren().add(button); // creating the Easy button \r\n\t\tb1 = new Button(\"Easy\");\r\n\t\tb1.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Easy\";\r\n\t\t\t}\r\n\t\t});\r\n\t\troot.getChildren().add(b1); // creating the Normal button\r\n\t\tb2 = new Button(\"Normal\");\r\n\t\tb2.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Normal\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb2.setLayoutX(50);\r\n\t\troot.getChildren().add(b2); // creating the Hard button\r\n\t\tb3 = new Button(\"Hard\");\r\n\t\tb3.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Hard\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb3.setLayoutX(115);\r\n\t\troot.getChildren().add(b3);\r\n\t}", "private JButton getJButtonInto() {\r\n\t\tif (jButtonInto == null) {\r\n\t\t\tjButtonInto = new JButton();\r\n\t\t\tjButtonInto.setMargin(new Insets(2, 5, 2, 5));\r\n\t\t\tjButtonInto.setText(\"数据入库\");\r\n\t\t\tjButtonInto.setBounds(new Rectangle(512, 517, 70, 23));\r\n\t\t\tjButtonInto.addMouseListener(new MouseAdapter() {\r\n\t\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent e) {\r\n\t\t\t\t\tDataIntoGui.this.setVisible(false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonInto;\r\n\t}", "@Override\n public void onClick() {\n // TODO: Disabled adding shape on just click. It should be added inside the BPMNDiagram by default.\n // log(Level.FINE, \"Palette: Adding \" + description);\n // addShapeToCanvasEvent.fire(new AddShapeToCanvasEvent(definition, factory));\n }", "public void goToBarChart(ActionEvent event) throws SQLException {\n\t\tconn = MySqlConnection.ConnectDb();\n\n\t\tCategoryAxis xAxis = new CategoryAxis();\n\t\txAxis.setLabel(\"Category\");\n\t\tNumberAxis yAxis = new NumberAxis();\n\t\tyAxis.setLabel(\"Amount\");\n\n\t\tBarChart<String, Number> barChart = new BarChart<String, Number>(xAxis, yAxis);\n\n\t\tXYChart.Series<String, Number> xyChart = new XYChart.Series<String, Number>();\n\t\t\n\t\tString sql = \"select category, amount from Account order by amount asc\";\n\t\tps = conn.prepareStatement(sql);\n\t\trs = ps.executeQuery();\n\n\t for(Account acc: lists) {\n\t xyChart.getData().add(new XYChart.Data<String, Number>(acc.getCategory(), acc.getAmount()));\n\t }\n\n\t\tbarChart.getData().add(xyChart);\n\t\tbarChart.setLegendVisible(false);\n\n\t\tScene scene = new Scene(barChart, 500, 500);\n\t\tStage stage = new Stage();\n\t\tstage.setScene(scene);\n\t\tstage.show();\n\t}", "@Override\n protected void addButtons()\n {\n JLabel agentOptions = new JLabel(\"Client Options \", SwingConstants.CENTER);\n addComponentToGridBag(this, agentOptions, 0, 0, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n\n JButton agentSendMessage = new JButton(\"Send Message\");\n addComponentToGridBag(this, agentSendMessage, 0, 2, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentSendMessage.addActionListener((ActionEvent e) ->\n {\n String to = getTo();\n String content = getContent(to);\n sendMessage(to, content);\n });\n\n JButton agentShowPortal = new JButton(\"Show Portal\");\n addComponentToGridBag(this, agentShowPortal, 0, 3, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentShowPortal.addActionListener((ActionEvent e) ->\n {\n displayConnections();\n });\n\n JButton agentexit = new JButton(\"Exit\");\n addComponentToGridBag(this, agentexit, 0, 5, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentexit.addActionListener((ActionEvent e) ->\n {\n System.exit(0);\n });\n }", "public void createNoBanButton() {\n\t\tnoban = new JButton(\"Click here if the current team missed a ban\");\n\t\tnoban.setName(\"noban\");\n\t\tnoban.setBackground(Color.GRAY);\n\t\tnoban.setForeground(Color.WHITE);\n\t\tnoban.setBorderPainted(false);\n\t\tnoban.addActionListener(this);\n\t\tnoban.setBounds(400, 50, 400, 100);\n\t\tbottomPanel.add(noban, new Integer(1));\n\t}", "@Override\r\npublic void mouseClicked(MouseEvent e) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public void buildButtons() {\r\n\t\tImage temp1= display_img.getImage();\r\n\t\tImageIcon img=new ImageIcon(temp1.getScaledInstance(800, 800, Image.SCALE_SMOOTH));\r\n\t\timg1 = img.getImage();\r\n\t\tfor(int y=0;y<10;y++) {\r\n\t\t\tfor(int x=0; x<10; x++) {\r\n\t\t\t\tImage image = Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(img1.getSource(), new CropImageFilter(x * 800 / 10, y * 800 / 10, 100, 100)));\r\n\t\t\t\tImageIcon icon = new ImageIcon(image);\r\n\t\t\t\tJButton temp = new JButton(icon);\r\n\t\t\t\ttemp.putClientProperty(\"position\", new Point(y,x));\r\n\t\t\t\tsolutions.add(new Point(y,x));\r\n\t\t\t\ttemp.putClientProperty(\"isLocked\", false);\r\n\t\t\t\ttemp.addMouseListener(new DragMouseAdapter());\r\n\t\t\t\tgrid[x][y]=temp;\r\n\r\n\t\t\t\tbuttons.add(temp);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void button1MouseClicked(MouseEvent e) {\n\t}", "void createButton(Button main){\n\t\tActions handler = new Actions();\r\n\t\tmain.setOnAction(handler);\r\n\t\tmain.setFont(font);\r\n\t\t//sets button preference dimensions and label \r\n\t\tmain.setPrefWidth(100);\r\n\t\tmain.setPrefHeight(60);\r\n\t\tmain.setText(\"Close\");\r\n\t}", "private void setupButtonListeners() {\r\n final SharedPreferences sharedPref = getSharedPreferences(getString(R.string.pref_file_key),\r\n Context.MODE_PRIVATE);\r\n final String accessToken = sharedPref.getString(getString(R.string.access_token_key), null);\r\n\r\n final BarChart chart = findViewById(R.id.chart);\r\n\r\n final Button btnNext = findViewById(R.id.btn_next);\r\n btnNext.setVisibility(View.GONE); // current week is displayed on create, so no next week\r\n btnNext.setOnClickListener(new View.OnClickListener() {\r\n\r\n public void onClick(View v) {\r\n // Clear old data\r\n chart.invalidate();\r\n chart.clear();\r\n\r\n offsetFromToday--;\r\n\r\n // Calculate new endDate used to keep track of which day or week is displayed\r\n // and update the date heading\r\n if(dataType.equals(\"NON-SED\")) {\r\n endDate.add(Calendar.DATE, 1);\r\n updateDateHeading(null);\r\n } else {\r\n Calendar startDate = endDate;\r\n startDate.add(Calendar.DATE, 1);\r\n endDate = calcEndDateFromStart(startDate);\r\n updateDateHeading(startDate);\r\n }\r\n\r\n // Request new data\r\n getActivityData(accessToken, false);\r\n }\r\n });\r\n\r\n final Button btnPrev = findViewById(R.id.btn_prev);\r\n btnPrev.setOnClickListener(new View.OnClickListener() {\r\n\r\n public void onClick(View v) {\r\n // Clear old data\r\n chart.invalidate();\r\n chart.clear();\r\n\r\n offsetFromToday++;\r\n\r\n // Calculate new endDate used to keep track of which day or week is displayed\r\n // and update the date heading\r\n if(dataType.equals(\"NON-SED\")) {\r\n endDate.add(Calendar.DATE, -1);\r\n updateDateHeading(null);\r\n } else {\r\n endDate = calcPrevEndDate(endDate);\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n updateDateHeading(startDate);\r\n }\r\n\r\n // Request new data\r\n getActivityData(accessToken, false);\r\n }\r\n });\r\n }", "public void initButtons() {\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 5; j++) {\n bt[i][j].setOnMouseEntered(e -> {\n Button button;\n button = (Button) e.getSource();\n button.setStyle(\"-fx-border-color:yellow\");\n });\n bt[i][j].setOnMouseExited(e -> {\n Button button;\n button = (Button) e.getSource();\n button.setStyle(\"-fx-border-color:trasparent\");\n });\n\n }\n }\n }", "public void actionPerformed(ActionEvent ae)\n\t{\n\t\tif(ae.getSource()==ok)//ae.getActionCommand().equals(\" OK \")) // pie chart\n\t\t{\n\t\t\tif(!processTitles())\n\t\t\t\treturn;\n\t\t\tif(type==0)\n\t\t\t{\n\t\t\t\tvalues=ws.buildBarChart();\n\t\t\t\tif(values.length>15)\n\t\t\t\t{\n\t\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\t\tString checkRange1 = wordBundle.getString(\"checkRange1\");\n\t\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\t\tint select = map.showDialog(map,\"checkRange1\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tws.buildPieChart(titles,xvalues,map);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(type==1) // vertical bar chart\n\t\t\t{\n\t\t\t\tvalues=ws.buildBarChart();\n\t\t\t\tif(checkDataValidity(values))\n\t\t\t\t{\n\t\t\t\t\tif(values.length>10)\n\t\t\t\t\t{\n\t\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\t\tString checkRange = wordBundle.getString(\"checkRange\");\n\t\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\t\tint select = map.showDialog(map,\"checkRange\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tJFrame bcV =new barChartV(map,values,titles,xvalues);\n\t\t\t\t\t\tbcV.repaint();\n\t\t\t\t\t\tbcV.validate();\n\t\t\t\t\t\tbcV.show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"Chart can not be drawn\");\n\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\tString DataCheck = wordBundle.getString(\"DataCheck\");\n\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\tint select = map.showDialog(map,\"DataCheck\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(type==2)//horizontal bar chart\n\t\t\t{\n\t\t\t\tvalues=ws.buildBarChart();\n\t\t\t\t//arrValue av=new arrValue();\n\t\t\t\t//av.selValues=values;\n\t\t\t\tif(checkDataValidity(values))\n\t\t\t\t{\n\t\t\t\t\tif(values.length>10)\n\t\t\t\t\t{\n\t\t\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\t\t\tString checkRange = wordBundle.getString(\"checkRange\");\n\t\t\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\t\t\tint select = map.showDialog(map,\"checkRange\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tJFrame bcH =new barChartH(map,values,titles,xvalues);\n\t\t\t\t\t\tbcH.repaint();\n\t\t\t\t\t\tbcH.validate();\n\t\t\t\t\t\tbcH.show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\tString DataCheck = wordBundle.getString(\"DataCheck\");\n\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\tint select = map.showDialog(map,\"DataCheck\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tsetVisible(false);\n\t\t}\n\t\telse if(ae.getSource()==cancel)//getActionCommand().equals(\"CANCEL\"))\n\t\t\tsetVisible(false);\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource() == button1){\n\t\t\tint id,number;\n\t\t\tString year;\n\t\t\tResultSet rs;\n\t\t\tMySQL mysql = new MySQL();\n\t\t\trs = mysql.selectAll();\n\t\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\twhile(rs.next()){\n\t\t\t\tid = rs.getInt(\"id\");\n\t\t\t\tyear = rs.getString(\"year\");\n\t\t\t number = rs.getInt(\"number\");\n\t\t\t data.addValue(number,\"出生数\",year); \n\t \t\t\tpanelA.add(new Label(\"id:\"+id+\" / year\"+year+\" / number\"+number)); \n\t\t\t\t}\n\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\t JFreeChart chart = \n\t\t\t ChartFactory.createLineChart(\"出生率\",\n\t\t\t \"年度\",\n\t\t\t \"万(人)\",\n\t\t\t data,\n\t\t\t PlotOrientation.VERTICAL,\n\t\t\t true,\n\t\t\t false,\n\t\t\t false);\n\n\t\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t\t panelA.add(cpanel);\n\t\t\t cardlayout.next(this);\n\n\t\t}\n\t}", "private void button1MouseClicked(MouseEvent e) {\n }", "@Override\n\tprotected void createCompButtons() {\n\t\tbtnExcelReport = new Button(getCompButtons(), SWT.NONE);\n\t\tbtnExcelReport.setText(\"Excel Report\");\n\t\tbtnExcelReport.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tbtnExcelReport\n\t\t.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(\n\t\t\t\t\torg.eclipse.swt.events.SelectionEvent e) {\n\t\t\t\tcmdExcelReportWidgetSelected();\n\t\t\t}\n\t\t});\n\t}", "private void triggerB1ChangeButton(JButton button) {\n if (!Objects.equals(button, previousB1Button)) {\n previousB1Button.setBackground(MOUSE_B1_EXITED_COLOR);\n previousB1Button.setForeground(BUTTON_B1_DEFAULT_COLOR);\n }\n }", "public void makeReceiveButton() {\r\n JButton receive = new JButton(\"Receive a new champion recommendation\");\r\n new Button(receive, main);\r\n// receive.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// receive.setPreferredSize(new Dimension(2500, 100));\r\n// receive.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n receive.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n receiveChampionRecommendation();\r\n }\r\n });\r\n// main.add(receive);\r\n }", "public void createOrderBtn(){\n createOrderBtn = new Button(\"Create order\");\n createOrderBtn.setLayoutX(305);\n createOrderBtn.setLayoutY(710);\n createOrderBtn.setPrefWidth(480);\n createOrderBtn.setPrefHeight(50);\n createOrderBtn.setStyle(\"-fx-background-color: #34ffb9\");\n createOrderBtn.setFont(new Font(18));\n createOrderBtn.setOnAction(event -> createOrderInDB());\n\n root.getChildren().addAll(createOrderBtn);\n }", "public GUIVerbrauchsdiagramm(String title, EnergyData energyData) {\n super(title);\n this.energyData = energyData;\n setExtendedState(JFrame.MAXIMIZED_BOTH);\n ChartPanel chartPanel = (ChartPanel) createPanel(energyData);\n\n buttonGroup.add(verbrauchDiagramm);\n buttonGroup.add(zaehlerDiagramm);\n pRadiobuttons.add(verbrauchDiagramm);\n pRadiobuttons.add(zaehlerDiagramm);\n pRadiobuttons.setBorder(new EmptyBorder(0, 20, 0, 0));\n verbrauchDiagramm.setSelected(true);\n tDate.setForeground(Color.gray);\n\n pSkipDay.setLayout(new GridLayout(1, 7, 5, 0));\n pSkipDay.add(bBackwardsM);\n pSkipDay.add(bBackwardsW);\n pSkipDay.add(bBackwards);\n pSkipDay.add(tDate);\n pSkipDay.add(bForwards);\n pSkipDay.add(bForwardsW);\n pSkipDay.add(bForwardsM);\n\n pDate.add(lCurrentDate);\n pDate.add(lEmpty2);\n pDate.add(pSkipDay);\n\n\n pCsv.add(bExportCSV);\n pCsv.add(lEmpty);\n pCsv.add(bExportJSON);\n\n\n pHeader.add(pRadiobuttons);\n pHeader.add(pDate);\n pHeader.add(pCsv);\n\n this.add(chartPanel, BorderLayout.CENTER);\n this.add(pHeader, BorderLayout.NORTH);\n\n //Actionlistener\n ActionListener actionListenerDiagramm = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (verbrauchDiagramm.isSelected()) {\n System.out.println(\"Verbrauchsdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetVerbrauchsdiagramm(energyData);\n chart.setTitle(\"Stromzählerübersicht\");\n }\n if (zaehlerDiagramm.isSelected()) {\n System.out.println(\"Zählerdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetZaehlerdiagramm(energyData);\n chart.setTitle(\"Zählerstand\");\n }\n }\n };\n\n bExportCSV.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n try {\n JFileChooser fileChooser = new JFileChooser(\"./CSV\");\n fileChooser.setDialogTitle(\"CSV-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.csv\",\"csv\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".csv\")){\n path = path +\".csv\";\n }\n FileHandler.writeCSV(map,path);\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden in ein CSV-File exportiert\");\n }\n });\n\n bExportJSON.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n FileHandler.saveJSON(map);\n\n try {\n JFileChooser fileChooser = new JFileChooser(\"./JSON\");\n fileChooser.setDialogTitle(\"JSON-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.json\",\"json\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".json\")){\n path = path +\".json\";\n }\n FileWriter fileWriter = new FileWriter(path);\n fileWriter.write(FileHandler.saveJSON(map));\n fileWriter.flush();\n fileWriter.close();\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden zum JSON exportiert \\n\" + \"https://api.npoint.io/0dc854da1619aca3be45\");\n }\n });\n\n bForwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, true);\n }\n });\n\n bBackwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, false);\n }\n });\n bBackwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, false);\n }\n });\n bForwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, true);\n }\n });\n bBackwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, false);\n }\n });\n bForwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, true);\n }\n });\n\n /*chart.getXYPlot().addChangeListener(new PlotChangeListener() {\n @Override\n public void plotChanged(PlotChangeEvent plotChangeEvent) {\n XYPlot plot = plotChangeEvent.getPlot().getChart().getXYPlot();\n PlotChangeListener plotChangeListener = this;\n\n plot.removeChangeListener(plotChangeListener);\n long upperBound = (long) plot.getDomainAxis().getUpperBound();\n long lowerBound = (long) plot.getDomainAxis().getLowerBound();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(upperBound / 900000 * 900000);\n upperBound = calendar.getTimeInMillis();\n\n calendar.setTimeInMillis(lowerBound / 900000 * 900000);\n lowerBound = calendar.getTimeInMillis();\n System.out.println(new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\").format(new Date(lowerBound)));\n\n System.out.println(getEnergyData().getSdatData().containsKey(lowerBound));\n\n double highestValue = 0;\n if (getEnergyData().getSdatData().containsKey(lowerBound)) {\n for (long i = lowerBound; i < upperBound; i = i + 86400000) {\n if (getEnergyData().getSdatData().get(i).getRelativBezug() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getRelativBezug();\n\n }\n if (getEnergyData().getSdatData().get(i).getRelativeEinspeisung() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getZaehlerstandEinspeisung();\n }\n }\n\n System.out.println(highestValue);\n System.out.println(highestValue + 1);\n\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(highestValue + 1);\n }else {\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(plot.getRangeAxis().getUpperBound());\n }\n plot.addChangeListener(plotChangeListener);\n\n }\n\n });\n */\n\n tDate.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent e) {\n checkDate(e);\n }\n\n @Override\n public void keyPressed(KeyEvent e) {\n\n }\n\n @Override\n public void keyReleased(KeyEvent e) {\n\n }\n });\n\n tDate.addFocusListener(new FocusListener() {\n @Override\n public void focusGained(FocusEvent e) {\n if (tDate.getText().equals(\"Datum:\")) {\n tDate.setText(\"\");\n tDate.setForeground(Color.BLACK);\n }\n }\n\n @Override\n public void focusLost(FocusEvent e) {\n if (tDate.getText().isEmpty()) {\n tDate.setForeground(Color.GRAY);\n tDate.setText(\"Datum:\");\n }\n }\n });\n\n\n verbrauchDiagramm.addActionListener(actionListenerDiagramm);\n zaehlerDiagramm.addActionListener(actionListenerDiagramm);\n }", "public void makeFavouriteButton() {\r\n JButton favourite = new JButton(\"Favourite a champion\");\r\n new Button(favourite, main);\r\n// favourite.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// favourite.setPreferredSize(new Dimension(2500, 100));\r\n// favourite.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n favourite.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n favouriteChampion();\r\n }\r\n });\r\n// main.add(favourite);\r\n }", "public ChartFrame(Chart chart) {\r\n\t\tthis.chart = chart;\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c = 0; c < seatGrid[r].length; c++) {\r\n\t\t\t\tJLabel label = new JLabel();\r\n\t\t\t\tlabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n\t\t\t\tseatGrid[r][c] = label;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tremoveBtn = new JButton(\"Remove\");\r\n\t\tremoveBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonRemoveClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taddBtn = new JButton(\"Add\");\r\n\t\taddBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonAddClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tswapBtn = new JButton(\"Swap\");\r\n\t\tswapBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonSwapClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tloadBtn = new JButton(\"Load\");\r\n\t\tloadBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonLoadClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmoveBtn = new JButton(\"Move\");\r\n\t\tmoveBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonMoveClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));\r\n\t\tpanel.setLayout(new GridLayout(7, 5));\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c = 0; c < seatGrid[r].length; c++) {\r\n\t\t\t\tpanel.add(seatGrid[r][c]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < seatGrid[0].length; i++) {\r\n\t\t\tpanel.add(Box.createHorizontalGlue());\r\n\t\t}\r\n\r\n\t\tpanel.add(removeBtn);\r\n\t\tpanel.add(addBtn);\r\n\t\tpanel.add(loadBtn);\r\n\t\tpanel.add(swapBtn);\r\n\t\tpanel.add(moveBtn);\r\n\r\n\t\tadd(panel);\r\n\t\tsetSize(500, 400);\r\n\t\tsetVisible(true);\r\n\t\tsetTitle(\"Seating Chart\");\r\n\t\tupdate();\r\n\r\n\t}", "public void setGraph(ActionEvent event)\n {\n theLineGraph.getData().clear();\n double temporary=0;\n theLineGraph.getXAxis().setLabel(\"Days\");\n\n XYChart.Series<String, Number> theGraph = new XYChart.Series<String, Number>();\n\n for (int i=0; i<Driver.save.getLog().size();i++)\n {\n String myI=i+\"\";\n\n if (event.getSource()==caloriesButton)\n {\n temporary=Driver.save.getDayCalories(i);\n theLineGraph.getYAxis().setLabel(\"Calories\");\n\n } else if(event.getSource()==protienButton)\n {\n temporary=Driver.save.getDayProtein(i);\n theLineGraph.getYAxis().setLabel(\"protien\");\n }\n else if (event.getSource()==carbsButton)\n {\n temporary=Driver.save.getDayCarbo(i);\n theLineGraph.getYAxis().setLabel(\"Carbs\");\n }\n else if (event.getSource()==fatsButton)\n {\n temporary=Driver.save.getDayFats(i);\n theLineGraph.getYAxis().setLabel(\"Fats\");\n }\n else if (event.getSource()==bevButton)\n {\n temporary=Driver.save.getDayBevarage(i);\n theLineGraph.getYAxis().setLabel(\"Drinks in ml\");\n }\n\n theGraph.getData().add(new XYChart.Data<String, Number>(myI ,temporary));\n }\n theLineGraph.getData().addAll(theGraph);\n\n }", "private void createBottomButtons() {\n // Create a composite that will contain the control buttons.\n Composite bottonBtnComposite = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(3, true);\n gl.horizontalSpacing = 10;\n bottonBtnComposite.setLayout(gl);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n bottonBtnComposite.setLayoutData(gd);\n\n // Create the Interpolate button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n interpolateBtn = new Button(bottonBtnComposite, SWT.PUSH);\n interpolateBtn.setText(\"Interpolate\");\n interpolateBtn.setLayoutData(gd);\n interpolateBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorData upperColorData = upperColorWheel.getColorData();\n ColorData lowerColorData = lowerColorWheel.getColorData();\n\n colorBar.interpolate(upperColorData, lowerColorData, rgbRdo\n .getSelection());\n undoBtn.setEnabled(true);\n updateColorMap();\n }\n });\n\n // Create the Undo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n undoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n undoBtn.setText(\"Undo\");\n undoBtn.setEnabled(false);\n undoBtn.setLayoutData(gd);\n undoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n undoBtn.setEnabled(colorBar.undoColorBar());\n updateColorMap();\n redoBtn.setEnabled(true);\n }\n });\n\n // Create the Redo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n redoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n redoBtn.setText(\"Redo\");\n redoBtn.setEnabled(false);\n redoBtn.setLayoutData(gd);\n redoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n redoBtn.setEnabled(colorBar.redoColorBar());\n updateColorMap();\n undoBtn.setEnabled(true);\n }\n });\n\n // Create the Revert button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n revertBtn = new Button(bottonBtnComposite, SWT.PUSH);\n revertBtn.setText(\"Revert\");\n revertBtn.setLayoutData(gd);\n revertBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n colorBar.revertColorBar();\n updateColorMap();\n undoBtn.setEnabled(false);\n redoBtn.setEnabled(false);\n }\n });\n\n // Create the Save button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n saveBtn = new Button(bottonBtnComposite, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n if( seldCmapName == null ) {\n saveBtn.setEnabled(false);\n }\n \n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorMap cm = (ColorMap) cmapParams.getColorMap();\n seldCmapName = selCmapCombo.getText();\n \n// int sepIndx = seldCmapName.indexOf(File.separator);\n// String cmapCat = seldCmapName.substring(0,seldCmapName.indexOf(File.separator));\n// String cmapName = seldCmapName.substring( seldCmapName.indexOf(File.separator));\n if (lockedCmaps != null && lockedCmaps.isLocked(seldCmapName)) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists and is locked.\\n\\n\" +\n \t\t\t\"You cannot overwrite it.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tconfirmDlg.open();\n \tcolorBar.undoColorBar();\n updateColorMap();\n \treturn;\n } \n else if( ColorMapUtil.colorMapExists( seldCmapCat, seldCmapName ) ) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists.\\n\\n\" +\n \t\t\t\"Do you want to overwrite it?\",\n \t\t\tMessageDialog.QUESTION, new String[]{\"Yes\", \"No\"}, 0);\n \tconfirmDlg.open();\n\n \tif( confirmDlg.getReturnCode() == MessageDialog.CANCEL ) {\n \t\treturn;\n \t}\n }\n\n try {\n ColorMapUtil.saveColorMap( cm, seldCmapCat, seldCmapName );\n \n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Colormap Saved\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" Saved.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n } catch (VizException e) {\n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Error\", null, \n \t\t\t\"Error Saving Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\"\\n\"+e.getMessage(),\n \t\t\tMessageDialog.ERROR, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n }\n\n completeSave();\n }\n });\n\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.grabExcessHorizontalSpace = false;\n deleteBtn = new Button(bottonBtnComposite, SWT.PUSH);\n deleteBtn.setText(\"Delete\");\n deleteBtn.setLayoutData(gd);\n deleteBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tdeleteColormap();\n }\n });\n Label sep = new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n sep.setLayoutData(gd);\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.HORIZONTAL_ALIGN_END);\n Button closeBtn = new Button(shell, SWT.PUSH);\n closeBtn.setText(\" Close \");\n closeBtn.setLayoutData(gd);\n closeBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tshell.dispose();\n }\n });\n }", "@Override\n\t\t\tpublic void handle(MouseEvent event) {\n\t\t\t\tdrawHoverIndicator(canvas,buttonName);\n\t\t\t}", "private void setupButtons() {\n compareButton.setOnClickListener((View view) -> {\n if (comparisonCompaniesAdapter.getDataSet() == null\n || comparisonCompaniesAdapter.getDataSet().size() < 2) {\n Toast.makeText(getApplicationContext(),\n \"Select at least 2 companies!\", Toast.LENGTH_LONG).show();\n return;\n }\n Intent moveToGraph = new Intent(this, GraphActivity.class);\n\n moveToGraph.putStringArrayListExtra(\"COMPARISON_COMPANIES\",\n extractTickers((ArrayList<Company>) comparisonCompaniesAdapter.getDataSet()));\n startActivity(moveToGraph);\n\n });\n }", "private void ajouteBouton(String label, JPanel p) {\r\n // Ajoute un bouton, avec le texte label, au panneau p\r\n JButton b = new JButton(label);\r\n p.add(b);\r\n b.addActionListener(this);\r\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tint month;\n\t\tdouble maxtempereture,monthlytempereture,mintempereture;\n\t\tResultSet rs;\n\t\tlib.MySQL mysql = new lib.MySQL();\n\t\trs = mysql.selectAll();\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\ttry{\n\t\t\twhile(rs.next()){\n\t\t\t\tmonth = rs.getInt(\"Month\");\n\t\t\t\tmaxtempereture = rs.getDouble(\"MaxTempereture\");\n\t\t\t\tmonthlytempereture = rs.getDouble(\"MonthkyTempereture\");\n\t\t\t\tmintempereture = rs.getDouble(\"MinTempereture\");\n System.out.println(\"月:\" + month);\n System.out.println(\"最高気温:\" + maxtempereture);\n System.out.println(\"月間平均気温:\" + monthlytempereture);\n System.out.println(\"最低気温:\" + mintempereture);\n data.addValue(maxtempereture,\"MaxTempereture\",month+\"\");\n data.addValue(monthlytempereture,\"MonthlyTempereture\",month+\"\");\n data.addValue(mintempereture,\"MinTempereture\",month+\"\");\n\t\t }\n\t\t}catch(SQLException et){}\n\t\t JFreeChart chart = \n\t\t\t ChartFactory.createLineChart(\"TOKYO TEMPERETURE\",\n\t\t\t \"month\",\n\t\t\t \"tempereture\",\n\t\t\t data,\n\t\t\t PlotOrientation.VERTICAL,\n\t\t\t true,\n\t\t\t false,\n\t\t\t false);\n \n\n ChartPanel cpanel = new ChartPanel(chart);\n panel1.add(cpanel);\n cardlayout.next(this);\n\t}", "public void onClick(View v) {\n checkFields();\n generateChart();\n }", "@Override\n\tprotected void createCompButtons() {\n\t\tbuildCompButtons();\n\t}", "public void createFinishedButton() {\n\t\tJButton finished = new JButton(\"Click here when finished inputting selected champions\");\n\t\tfinished.setName(\"finished\");\n\t\tfinished.setBackground(Color.GRAY);\n\t\tfinished.setForeground(Color.WHITE);\n\t\tfinished.setBorderPainted(false);\n\t\tfinished.addActionListener(this);\n\t\tfinished.setBounds(400, 50, 400, 100);\n\t\tbottomPanel.add(finished, new Integer(4));\n\t}", "private void btnSiguienteMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnSiguienteMouseClicked\r\n \r\n if(PanelBalanceGeneral.getX() != 0){\r\n \r\n Contador++;\r\n Avanzar();\r\n \r\n if(PanelBalanceGeneral.getX() == 0){PanelActual = Paneles[1];}\r\n \r\n if(Contador-1 >= 0){\r\n \r\n btnAnterior.setToolTipText(Paneles[Contador-1]);\r\n btnSiguiente.setToolTipText(Paneles[Contador+1]);\r\n \r\n }\r\n \r\n }\r\n // TODO add your handling code here:\r\n }", "@Override\n public void renderButton(MatrixStack matrices, int mouseX, int mouseY, float delta) {\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "private void botonFuncional(JButton Boton){\n \n if(!caraUp){\n Boton.setEnabled(false);\n imagen1 =(ImageIcon) Boton.getDisabledIcon();\n v[0] = Boton;\n caraUp = true;\n cara1 = false;\n }\n else {\n Boton.setEnabled(false); \n imagen2 =(ImageIcon) Boton.getDisabledIcon();\n v[1]= Boton;\n cara1 = true;\n ganar();\n }\n }", "public void mouseClicked(MouseEvent e) {\r\n //panel.addCircle(new Circle(e.getX(), e.getY(), 24, Color.BLUE));\r\n // super.mouseClicked(e);\r\n water.addWater(e.getX(), e.getY(), 50);\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n pnlChart = new javax.swing.JPanel();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n pnlChart.setBackground(new java.awt.Color(0, 0, 0));\n pnlChart.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n pnlChart.setForeground(new java.awt.Color(255, 255, 255));\n pnlChart.setAlignmentX(1.5F);\n pnlChart.setAlignmentY(0.35F);\n pnlChart.setMaximumSize(new java.awt.Dimension(1000, 1000));\n pnlChart.setMinimumSize(new java.awt.Dimension(1, 1));\n pnlChart.setPreferredSize(new java.awt.Dimension(1, 1));\n pnlChart.setLayout(new java.awt.BorderLayout());\n\n jButton2.setText(\"jButton2\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n pnlChart.add(jButton2, java.awt.BorderLayout.PAGE_START);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(pnlChart, javax.swing.GroupLayout.PREFERRED_SIZE, 631, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 993, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(pnlChart, javax.swing.GroupLayout.PREFERRED_SIZE, 595, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 801, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void addButtonToCoolBar(JButton button) {\n\t\t_coolBar.addButton(button);\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btnBlood = new javax.swing.JButton();\n btnResp = new javax.swing.JButton();\n btnHeart = new javax.swing.JButton();\n btnWeight = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n btnBlood.setText(\"Blood Pressure\");\n btnBlood.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBloodActionPerformed(evt);\n }\n });\n\n btnResp.setText(\"RespiratoryRate\");\n btnResp.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRespActionPerformed(evt);\n }\n });\n\n btnHeart.setText(\"Heart Rate\");\n btnHeart.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnHeartActionPerformed(evt);\n }\n });\n\n btnWeight.setText(\"Weight\");\n btnWeight.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnWeightActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"GRAPH \");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(165, 165, 165)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btnResp, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnHeart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnBlood, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnWeight, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(189, 189, 189)\n .addComponent(jLabel1)))\n .addContainerGap(237, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(31, 31, 31)\n .addComponent(btnBlood)\n .addGap(61, 61, 61)\n .addComponent(btnResp)\n .addGap(66, 66, 66)\n .addComponent(btnHeart)\n .addGap(67, 67, 67)\n .addComponent(btnWeight)\n .addContainerGap(103, Short.MAX_VALUE))\n );\n }", "@Override\n\t\tpublic void renderButton(int mouseX, int mouseY){\n\t\t}", "abstract void botonDemo_actionPerformed(ActionEvent e);", "private JButton createApplyButton() {\r\n apply = new JButton();\r\n apply.setBounds(5, 260, 100, 25);\r\n\r\n add(new SComponent(apply,\r\n new String[] {\"Anpassen\", \"Apply\"},\r\n new String[] {\"Speichert die Farbeinstellungen.\",\r\n \"Saves the color settings.\"}));\r\n\r\n apply.addActionListener(new ActionListener() {\r\n\r\n /** Zeichnet den Graphen mit den ausgewählten\r\n * Frabeinstellungen\r\n *\r\n * @param e ActionEvent\r\n */\r\n public void actionPerformed(final ActionEvent e) {\r\n Color[] col = new Color[8];\r\n for (int i = 0; i < 8; i++) {\r\n if (mainclass.getGraphTyp()\r\n == AbstractGraph.GRAPHTYP_RESIDUAL) {\r\n switch (i) {\r\n case COLOR_EDGE_ONE:\r\n col[i] = chooser[COLOR_EDGE_FLOW]\r\n .getColorSelected();\r\n break;\r\n case COLOR_EDGE_TWO:\r\n col[i] = chooser[COLOR_EDGE_CAP]\r\n .getColorSelected();\r\n break;\r\n case COLOR_EDGE_TOP:\r\n col[i] = chooser[COLOR_EDGE_RTOP]\r\n .getColorSelected();\r\n break;\r\n default: col[i] = chooser[i].getColorSelected();\r\n }\r\n } else {\r\n col[i] = chooser[i].getColorSelected();\r\n }\r\n }\r\n drawer.setColorSettings(col);\r\n\r\n /*GAModel gam = mainclass.getModel();\r\n if (gam.getGraphComponentState()\r\n == GAModel.COMPONENT_VALID) {\r\n gam.setGraphComponentState(GAModel.COMPONENT_OUTDATED);\r\n }*/\r\n mainclass.repaint();\r\n }\r\n });\r\n\r\n return apply;\r\n }", "@Override\r\n\t\t\tpublic void buttonClick(com.vaadin.ui.Button.ClickEvent event) {\n\t\t\t\t\r\n\t\t\t\tbuscarPacks();\r\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.BLUE;\n\t\t\t}", "@FXML\n public void createRecentsButtons(ActionEvent ae) throws Exception {\n\n // do your job of creating Buttons and pass the arraylist as function parameters\n for(int k=0; k<11; k++)\n myArray.add(k);\n this.getNumberOfRecentGroups(myArray);\n System.out.println(\"I was clicked\");\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n btn_stat.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent event) {\r\n ReclamationService rs=new ReclamationService();\r\n int a=0;int b=0;int c=0;\r\n try {\r\n a=rs.getNombre(\"traitee\");\r\n b= rs.getNombre(\" en cours \");\r\n // c= rs.getNombre(\"En maintenance\");\r\n } catch (SQLException ex) {\r\n Logger.getLogger(StatisquereclamationController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n DefaultCategoryDataset dataset=new DefaultCategoryDataset();\r\n dataset.setValue(a, \"statut\", \"traitee\");\r\n dataset.setValue(b, \"statut\", \" en cours\");\r\n // dataset.setValue(c, \"equipements\", \"en maintenance\");\r\n JFreeChart chart=ChartFactory.createBarChart3D(\"statut de reclamation \", \"etat\", \"nombres\", dataset);\r\n chart.setBackgroundPaint(Color.YELLOW);\r\n chart.getTitle().setPaint(Color.red);\r\n CategoryPlot p=chart.getCategoryPlot();\r\n p.setRangeGridlinePaint(Color.BLUE);\r\n ChartFrame frame=new ChartFrame(\"bar de reclamation\",chart);\r\n frame.setVisible(true);\r\n frame.setSize(450, 350);\r\n System.out.println(a);\r\n System.out.println(b);\r\n\r\n }\r\n });\r\n btn_stat1.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent event) {\r\n ReclamationService rs=new ReclamationService();\r\n int a=0;int b=0;int c =0;\r\n try {\r\n \r\n a=rs.Afficher_listcat(Integer.parseInt(tx_id_patissier.getText()));\r\n b=rs.NombreRec();\r\n c=a/b;\r\n // c= rs.getNombre(\"En maintenance\");tx_id_patissier.getText()\r\n } catch (SQLException ex) {\r\n Logger.getLogger(StatisquereclamationController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n DefaultCategoryDataset dataset=new DefaultCategoryDataset();\r\n dataset.setValue(a, \"taux de reclamation\", \"Patissier n°\"+tx_id_patissier.getText());\r\n \r\n // dataset.setValue(c, \"equipements\", \"en maintenance\");\r\n JFreeChart chart=ChartFactory.createBarChart3D(\"Statistique de patissier\", \"patissier\", \"nombres\", dataset);\r\n chart.setBackgroundPaint(Color.YELLOW);\r\n chart.getTitle().setPaint(Color.red);\r\n CategoryPlot p=chart.getCategoryPlot();\r\n p.setRangeGridlinePaint(Color.BLUE);\r\n ChartFrame frame=new ChartFrame(\"bar de reclamation\",chart);\r\n frame.setVisible(true);\r\n frame.setSize(450, 350);\r\n System.out.println(a);\r\n \r\n }\r\n });\r\n\r\n }", "@Override\n public void onBoomButtonClick(int index) {\n }", "private void drawGraph() {\n // you can show warning messages now\n imrGuiBean.showWarningMessages(true);\n addGraphPanel();\n setButtonsEnable(true);\n }", "JFreeChart generateBox();", "public void createButtonGrid() {\n\t\tbuttonPanel.setOpaque(false);\n\t\t\n\t\t// designs array of buttons\n\t\tfor (int counter = 1; counter <= 20; counter++) {\n\t\t\tbuttonArray[counter] = new JButton();\n\t\t\tbuttonArray[counter].setOpaque(false);\n\t\t\tbuttonArray[counter].setVisible(true);\n\t\t\tbuttonArray[counter].setBorderPainted(false);\n\t\t\tbuttonArray[counter].setHorizontalTextPosition(JButton.CENTER);\n\t\t\tbuttonArray[counter].setVerticalTextPosition(SwingConstants.CENTER);\n\t\t\tbuttonArray[counter].setFont(new Font(\"Courier\", Font.PLAIN, 15));\n\t\t\tbuttonArray[counter].setText(\"<html><font color = white>\" + Integer.toString(counter) + \"</font></html>\");\n\t\t\t// add action listener to each button\n\t\t\tbuttonArray[counter].addActionListener(eventsMain);\n\t\t\t// add each button to the container\n\t\t\tbuttonPanel.add(buttonArray[counter]);\n\t\t}\n\t\t\n\t\t// set colour for ach row of buttons\n\t\tfor (int counter = 1; counter <= 20; counter++) {\n\t\t\tif (counter >= 1 && counter < 6) {\n\t\t\t\tbuttonArray[counter].setIcon(btnBlue);\n\t\t\t} else if (counter > 5 && counter < 11) {\n\t\t\t\tbuttonArray[counter].setIcon(btnGreen);\n\t\t\t} else if (counter > 10 && counter < 16) {\n\t\t\t\tbuttonArray[counter].setIcon(btnRed);\n\t\t\t} else if (counter > 15 && counter < 21) {\n\t\t\t\tbuttonArray[counter].setIcon(btnGray);\n\t\t\t}\n\t\t}\n\t}", "protected void createButtons(Panel panel) {\n panel.add(new Filler(24,20));\n\n Choice drawingChoice = new Choice();\n drawingChoice.addItem(fgUntitled);\n\n\t String param = getParameter(\"DRAWINGS\");\n\t if (param == null)\n\t param = \"\";\n \tStringTokenizer st = new StringTokenizer(param);\n while (st.hasMoreTokens())\n drawingChoice.addItem(st.nextToken());\n // offer choice only if more than one\n if (drawingChoice.getItemCount() > 1)\n panel.add(drawingChoice);\n else\n panel.add(new Label(fgUntitled));\n\n\t\tdrawingChoice.addItemListener(\n\t\t new ItemListener() {\n\t\t public void itemStateChanged(ItemEvent e) {\n\t\t if (e.getStateChange() == ItemEvent.SELECTED) {\n\t\t loadDrawing((String)e.getItem());\n\t\t }\n\t\t }\n\t\t }\n\t\t);\n\n panel.add(new Filler(6,20));\n\n Button button;\n button = new CommandButton(new DeleteCommand(\"Delete\", fView));\n panel.add(button);\n\n button = new CommandButton(new DuplicateCommand(\"Duplicate\", fView));\n panel.add(button);\n\n button = new CommandButton(new GroupCommand(\"Group\", fView));\n panel.add(button);\n\n button = new CommandButton(new UngroupCommand(\"Ungroup\", fView));\n panel.add(button);\n\n button = new Button(\"Help\");\n\t\tbutton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n\t\t showHelp();\n\t\t }\n\t\t }\n\t\t);\n panel.add(button);\n\n fUpdateButton = new Button(\"Simple Update\");\n\t\tfUpdateButton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n if (fSimpleUpdate)\n setBufferedDisplayUpdate();\n else\n setSimpleDisplayUpdate();\n\t\t }\n\t\t }\n\t\t);\n\n // panel.add(fUpdateButton); // not shown currently\n }", "private void createButtons() {\n\t\tfor (int x = 0; x < buttons.length; x++)\n\t\t\tfor (int y = 0; y < buttons[x].length; y++) {\n\t\t\t\tif ((x % 2 == 0 && y % 2 == 0) || (x % 2 == 1 && y % 2 == 1))\n\t\t\t\t\tbuttons[x][y] = new DarkButton();\n\t\t\t\telse\n\t\t\t\t\tbuttons[x][y] = new LightButton();\n\n\t\t\t\tbuttonListener(x, y);\n\t\t\t}\n\t\t\t\n\t\t\tinitButtonIcons();\n\t}", "public void drawButtons(){\r\n\t\tGuiBooleanButton showDirection = new GuiBooleanButton(1, 10, 20, 150, 20, \"Show Direction\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowdir(), \"showdir\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showdir\").split(\";\"));\r\n\t\tGuiChooseStringButton dirpos = new GuiChooseStringButton(2, width/2+50, 20, 150, 20, \"Dir-Position\", GuiPositions.getPosList(), \"posdir\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosDir()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showFPS= new GuiBooleanButton(3, 10, 45, 150, 20, \"Show FPS\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowfps(), \"showfps\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfps\").split(\";\"));\r\n\t\tGuiChooseStringButton fpspos = new GuiChooseStringButton(4, width/2+50, 45, 150, 20, \"FPS-Position\", GuiPositions.getPosList(), \"posfps\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosFPS()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showCoor = new GuiBooleanButton(5, 10, 70, 150, 20, \"Show Coor\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowcoor(), \"showcoor\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showcoor\").split(\";\"));\r\n\t\tGuiChooseStringButton coorpos = new GuiChooseStringButton(6, width/2+50, 70, 150, 20, \"Coor-Position\", GuiPositions.getPosList(), \"poscoor\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosCoor()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showworldage = new GuiBooleanButton(7, 10, 95, 150, 20, \"Show WorldAge\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowWorldAge(), \"showworldage\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showworldage\").split(\";\"));\r\n\t\tGuiChooseStringButton worldagepos = new GuiChooseStringButton(8, width/2+50, 95, 150, 20, \"WorldAge-Position\", GuiPositions.getPosList(), \"posworldage\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosWorldAge()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\tGuiBooleanButton showFriendly = new GuiBooleanButton(7, 10, 120, 150, 20, \"Mark friendly spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingFriendlySpawns(), \"showfmobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfriendlymobspawn\").split(\";\"));\r\n\t\tGuiBooleanButton showAggressiv = new GuiBooleanButton(7, 10, 145, 150, 20, \"Mark aggressiv spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingAggressivSpawns(), \"showamobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showaggressivmobspawn\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton dynamic = new GuiBooleanButton(7, width/2+50, 120, 150, 20, \"dynamic selection\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isDynamic(), \"dynamichsel\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.dynamicselection\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tGuiButton back = new GuiButton(9, width/2-100,height-50 , \"back to game\");\r\n\t\t\r\n\t\tbuttonList.add(showworldage);\r\n\t\tbuttonList.add(worldagepos);\r\n\t\tbuttonList.add(dirpos);\r\n\t\tbuttonList.add(fpspos);\r\n\t\tbuttonList.add(coorpos);\r\n\t\tbuttonList.add(showCoor);\r\n\t\tbuttonList.add(showFPS);\r\n\t\tbuttonList.add(showDirection);\r\n\t\t\r\n\t\tbuttonList.add(showFriendly);\r\n\t\tbuttonList.add(showAggressiv);\r\n\t\tbuttonList.add(dynamic);\r\n\t\t\r\n\t\tbuttonList.add(back);\r\n\t}", "int bubbleBeam();", "@Override\r\n public void mouseClicked(MouseEvent e) {\n System.out.println(e.getButton());\r\n\r\n // MouseEvent.BUTTON3 es el boton derecho\r\n }", "private JButton getDalejTlacitko() {\n\t\tif (dalejTlacitko == null) {\n\t\t\tdalejTlacitko = new JButton();\n\t\t\tdalejTlacitko.setFont(new Font(\"Dialog\", Font.BOLD, 8));\n\t\t\tdalejTlacitko.setSize(new Dimension(42, 25));\n\t\t\tdalejTlacitko.setLocation(new Point(429, 83));\n\t\t\tdalejTlacitko.setText(\">\");\n\t\t\tdalejTlacitko\n\t\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\n\t\t\t\t\t\t\tif (potvrdil == false) {\n\t\t\t\t\t\t\t\tspravne = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpotvrdil = false;\n\n\t\t\t\t\t\t\tif (suzvukText.getText().equals(\"interval 1/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"interval 2/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"interval 2/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"interval 3/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"interval 3/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"interval 4/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"interval 4/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"interval 5/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"interval 5/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"interval 6/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"interval 6/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"interval 7/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"interval 7/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"interval 8/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"interval 8/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"interval 9/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"interval 9/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"interval 10/10\");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (suzvukText.getText().equals(\"trojzvuk 1/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"trojzvuk 2/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"trojzvuk 2/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"trojzvuk 3/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"trojzvuk 3/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"trojzvuk 4/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"trojzvuk 4/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"trojzvuk 5/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"trojzvuk 5/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"trojzvuk 6/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"trojzvuk 6/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"trojzvuk 7/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"trojzvuk 7/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"trojzvuk 8/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"trojzvuk 8/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"trojzvuk 9/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"trojzvuk 9/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"trojzvuk 10/10\");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (suzvukText.getText().equals(\"súzvuk 1/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"súzvuk 2/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"súzvuk 2/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"súzvuk 3/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"súzvuk 3/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"súzvuk 4/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"súzvuk 4/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"súzvuk 5/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"súzvuk 5/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"súzvuk 6/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"súzvuk 6/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"súzvuk 7/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"súzvuk 7/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"súzvuk 8/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"súzvuk 8/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"súzvuk 9/10\");\n\t\t\t\t\t\t\t} else if (suzvukText.getText().equals(\n\t\t\t\t\t\t\t\t\t\"súzvuk 9/10\")) {\n\t\t\t\t\t\t\t\tsuzvukText.setText(\"súzvuk 10/10\");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (mod.equals(\"1v\")) {\n\t\t\t\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\t\t\t\tint[] p;\n\n\t\t\t\t\t\t\t\tint r = rand.nextInt(3);\n\t\t\t\t\t\t\t\tr = 0;\n\t\t\t\t\t\t\t\tswitch (r) {\n\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\tpriklad = new Dvojzvuk(\n\t\t\t\t\t\t\t\t\t\t\trand.nextInt(49) + 36, rand\n\t\t\t\t\t\t\t\t\t\t\t\t\t.nextInt(13));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\tp = new int[2];\n\t\t\t\t\t\t\t\t\twhile (p[0] == p[1]) {\n\t\t\t\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(\n\t\t\t\t\t\t\t\t\t\t\trand.nextInt(49) + 36, p[0], p[1]);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\tp = new int[3];\n\t\t\t\t\t\t\t\t\twhile ((p[0] == p[1]) || (p[1] == p[2])\n\t\t\t\t\t\t\t\t\t\t\t|| (p[0] == p[2])) {\n\t\t\t\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t\tp[2] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\t\t\t\tpriklad = new Stvorzvuk(\n\t\t\t\t\t\t\t\t\t\t\trand.nextInt(49) + 36, p[0], p[1],\n\t\t\t\t\t\t\t\t\t\t\tp[2]);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else if (mod.equals(\"1s\")) {\n\t\t\t\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\t\t\t\tint r = rand.nextInt(49) + 36;\n\t\t\t\t\t\t\t\tif (priklad.equals(new Dvojzvuk(r, 5))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Dvojzvuk(r, 8);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Dvojzvuk(r, 8))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Dvojzvuk(r, 7);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Dvojzvuk(r, 7))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Dvojzvuk(r, 4);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Dvojzvuk(r, 4))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Dvojzvuk(r, 11);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Dvojzvuk(r, 11))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Dvojzvuk(r, 12);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Dvojzvuk(r, 12))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Dvojzvuk(r, 2);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Dvojzvuk(r, 2))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Dvojzvuk(r, 10);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Dvojzvuk(r, 10))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Dvojzvuk(r, 9);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Dvojzvuk(r, 9))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Dvojzvuk(r, 6);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Dvojzvuk(r, 6))) {\n\n\t\t\t\t\t\t\t\t\tif (spravne == true) {\n\t\t\t\t\t\t\t\t\t\tLinkedList<String> temp = new LinkedList<String>();\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"GRATUĽUJEME!!!!\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"-------------------------------------\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"Vaša úroveň je:\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"-------------- 1 --------------\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"teraz zvoĺte návrat\");\n\t\t\t\t\t\t\t\t\t\tanalyzaList.setListData(temp.toArray());\n\t\t\t\t\t\t\t\t\t\tif ((uroven.equals(\"2\") == false)\n\t\t\t\t\t\t\t\t\t\t\t\t&& (uroven.equals(\"3\") == false)) {\n\t\t\t\t\t\t\t\t\t\t\turoven = \"1\";\n\t\t\t\t\t\t\t\t\t\t\tcvicenieText1112.setText(uroven);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tLinkedList<String> temp = new LinkedList<String>();\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" SKÚŠKU STE NESPRAVILI!\");\n\t\t\t\t\t\t\t\t\t\ttemp\n\t\t\t\t\t\t\t\t\t\t\t\t.add(\"-------------------------------------\");\n\t\t\t\t\t\t\t\t\t\ttemp\n\t\t\t\t\t\t\t\t\t\t\t\t.add(\" Nezodpovedali ste správne všetky príklady\");\n\t\t\t\t\t\t\t\t\t\ttemp\n\t\t\t\t\t\t\t\t\t\t\t\t.add(\"-------------------------------------\");\n\t\t\t\t\t\t\t\t\t\ttemp\n\t\t\t\t\t\t\t\t\t\t\t\t.add(\" Vaša úroveň zostáva nezmenená\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"---------------------------\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" Teraz zvoľte návrat\");\n\t\t\t\t\t\t\t\t\t\tanalyzaList.setListData(temp.toArray());\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tanalyzaList.setListData(temp.toArray());\n\t\t\t\t\t\t\t\t\t\tif ((uroven.equals(\"2\") == false)\n\t\t\t\t\t\t\t\t\t\t\t\t&& (uroven.equals(\"3\") == false)) {\n\t\t\t\t\t\t\t\t\t\t\turoven = \"1\";\n\t\t\t\t\t\t\t\t\t\t\tcvicenieText1112.setText(uroven);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else if (mod.equals(\"2v\")) {\n\t\t\t\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\t\t\t\tint[] p;\n\n\t\t\t\t\t\t\t\tint r = rand.nextInt(2);\n\t\t\t\t\t\t\t\tr = 1;\n\t\t\t\t\t\t\t\t// if (r == 0) {\n\t\t\t\t\t\t\t\t// r = 1;\n\t\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\t\tswitch (r) {\n\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\tpriklad = new Dvojzvuk(\n\t\t\t\t\t\t\t\t\t\t\trand.nextInt(49) + 36, rand\n\t\t\t\t\t\t\t\t\t\t\t\t\t.nextInt(13));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\tp = new int[2];\n\t\t\t\t\t\t\t\t\twhile (p[0] == p[1]) {\n\t\t\t\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(\n\t\t\t\t\t\t\t\t\t\t\trand.nextInt(49) + 36, p[0], p[1]);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\tp = new int[3];\n\t\t\t\t\t\t\t\t\twhile ((p[0] == p[1]) || (p[1] == p[2])\n\t\t\t\t\t\t\t\t\t\t\t|| (p[0] == p[2])) {\n\t\t\t\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t\tp[2] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\t\t\t\tpriklad = new Stvorzvuk(\n\t\t\t\t\t\t\t\t\t\t\trand.nextInt(49) + 36, p[0], p[1],\n\t\t\t\t\t\t\t\t\t\t\tp[2]);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else if (mod.equals(\"2s\")) {\n\t\t\t\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\t\t\t\tint r = rand.nextInt(49) + 36;\n\t\t\t\t\t\t\t\tif (priklad.equals(new Trojzvuk(r, 3, 7))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(r, 4, 7);\n\t\t\t\t\t\t\t\t} else if (priklad\n\t\t\t\t\t\t\t\t\t\t.equals(new Trojzvuk(r, 4, 7))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(r, 3, 8);\n\t\t\t\t\t\t\t\t} else if (priklad\n\t\t\t\t\t\t\t\t\t\t.equals(new Trojzvuk(r, 3, 8))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(r, 4, 8);\n\t\t\t\t\t\t\t\t} else if (priklad\n\t\t\t\t\t\t\t\t\t\t.equals(new Trojzvuk(r, 4, 8))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(r, 5, 9);\n\t\t\t\t\t\t\t\t} else if (priklad\n\t\t\t\t\t\t\t\t\t\t.equals(new Trojzvuk(r, 5, 9))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(r, 6, 9);\n\t\t\t\t\t\t\t\t} else if (priklad\n\t\t\t\t\t\t\t\t\t\t.equals(new Trojzvuk(r, 6, 9))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(r, 7, 10);\n\t\t\t\t\t\t\t\t} else if (priklad\n\t\t\t\t\t\t\t\t\t\t.equals(new Trojzvuk(r, 7, 10))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(r, 2, 6);\n\t\t\t\t\t\t\t\t} else if (priklad\n\t\t\t\t\t\t\t\t\t\t.equals(new Trojzvuk(r, 2, 6))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(r, 1, 9);\n\t\t\t\t\t\t\t\t} else if (priklad\n\t\t\t\t\t\t\t\t\t\t.equals(new Trojzvuk(r, 1, 9))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(r, 8, 9);\n\t\t\t\t\t\t\t\t} else if (priklad\n\t\t\t\t\t\t\t\t\t\t.equals(new Trojzvuk(r, 8, 9))) {\n\n\t\t\t\t\t\t\t\t\tif (spravne == true) {\n\t\t\t\t\t\t\t\t\t\tLinkedList<String> temp = new LinkedList<String>();\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" GRATUĽUJEME!!!!\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"-------------------------------------\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" Vaša úroveň je:\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"---------------- 2 -----------------\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" Teraz zvoľte návrat\");\n\t\t\t\t\t\t\t\t\t\tanalyzaList.setListData(temp.toArray());\n\t\t\t\t\t\t\t\t\t\tif (uroven.equals(\"3\") == false) {\n\t\t\t\t\t\t\t\t\t\t\turoven = \"2\";\n\t\t\t\t\t\t\t\t\t\t\tcvicenieText1112.setText(uroven);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tLinkedList<String> temp = new LinkedList<String>();\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" SKÚŠKU STE NESPRAVILI!\");\n\t\t\t\t\t\t\t\t\t\ttemp\n\t\t\t\t\t\t\t\t\t\t\t\t.add(\"-------------------------------------\");\n\t\t\t\t\t\t\t\t\t\ttemp\n\t\t\t\t\t\t\t\t\t\t\t\t.add(\" Nezodpovedali ste správne všetky príklady\");\n\t\t\t\t\t\t\t\t\t\ttemp\n\t\t\t\t\t\t\t\t\t\t\t\t.add(\"-------------------------------------\");\n\t\t\t\t\t\t\t\t\t\ttemp\n\t\t\t\t\t\t\t\t\t\t\t\t.add(\" Vaša úroveň zostáva nezmenená\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"---------------------------\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" Teraz zvoľte návrat\");\n\t\t\t\t\t\t\t\t\t\tanalyzaList.setListData(temp.toArray());\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else if (mod.equals(\"3v\")) {\n\t\t\t\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\t\t\t\tint[] p;\n\n\t\t\t\t\t\t\t\tint r = rand.nextInt(3);\n\t\t\t\t\t\t\t\t// r = 2;\n\t\t\t\t\t\t\t\tswitch (r) {\n\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\tpriklad = new Dvojzvuk(\n\t\t\t\t\t\t\t\t\t\t\trand.nextInt(49) + 36, rand\n\t\t\t\t\t\t\t\t\t\t\t\t\t.nextInt(13));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\tp = new int[2];\n\t\t\t\t\t\t\t\t\twhile (p[0] == p[1]) {\n\t\t\t\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(\n\t\t\t\t\t\t\t\t\t\t\trand.nextInt(49) + 36, p[0], p[1]);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\tp = new int[3];\n\t\t\t\t\t\t\t\t\twhile ((p[0] == p[1]) || (p[1] == p[2])\n\t\t\t\t\t\t\t\t\t\t\t|| (p[0] == p[2])) {\n\t\t\t\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t\tp[2] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\t\t\t\tpriklad = new Stvorzvuk(\n\t\t\t\t\t\t\t\t\t\t\trand.nextInt(49) + 36, p[0], p[1],\n\t\t\t\t\t\t\t\t\t\t\tp[2]);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else if (mod.equals(\"3s\")) {\n\t\t\t\t\t\t\t\tif (poc == 0) {\n\t\t\t\t\t\t\t\t\tpoc = 1;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tpoc = poc + 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\t\t\t\tint[] p;\n\n\t\t\t\t\t\t\t\tint r = rand.nextInt(3);\n\t\t\t\t\t\t\t\t// r = 2;\n\t\t\t\t\t\t\t\tswitch (r) {\n\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\tpriklad = new Dvojzvuk(\n\t\t\t\t\t\t\t\t\t\t\trand.nextInt(49) + 36, rand\n\t\t\t\t\t\t\t\t\t\t\t\t\t.nextInt(13));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\tp = new int[2];\n\t\t\t\t\t\t\t\t\twhile (p[0] == p[1]) {\n\t\t\t\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(\n\t\t\t\t\t\t\t\t\t\t\trand.nextInt(49) + 36, p[0], p[1]);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\tp = new int[3];\n\t\t\t\t\t\t\t\t\twhile ((p[0] == p[1]) || (p[1] == p[2])\n\t\t\t\t\t\t\t\t\t\t\t|| (p[0] == p[2])) {\n\t\t\t\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t\tp[2] = rand.nextInt(13);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\t\t\t\tpriklad = new Stvorzvuk(\n\t\t\t\t\t\t\t\t\t\t\trand.nextInt(49) + 36, p[0], p[1],\n\t\t\t\t\t\t\t\t\t\t\tp[2]);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (poc > 9) {\n\t\t\t\t\t\t\t\t\tif (spravne == true) {\n\t\t\t\t\t\t\t\t\t\tLinkedList<String> temp = new LinkedList<String>();\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" GRATUĽUJEME!!!!\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"-------------------------------------\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" Vaša úroveň je:\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"---------------- 3 -----------------\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" Teraz zvoľte návrat\");\n\t\t\t\t\t\t\t\t\t\tanalyzaList.setListData(temp.toArray());\n\t\t\t\t\t\t\t\t\t\turoven = \"3\";\n\t\t\t\t\t\t\t\t\t\tcvicenieText1112.setText(uroven);\n\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tLinkedList<String> temp = new LinkedList<String>();\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" SKÚŠKU STE NESPRAVILI!\");\n\t\t\t\t\t\t\t\t\t\ttemp\n\t\t\t\t\t\t\t\t\t\t\t\t.add(\"-------------------------------------\");\n\t\t\t\t\t\t\t\t\t\ttemp\n\t\t\t\t\t\t\t\t\t\t\t\t.add(\" Nezodpovedali ste správne všetky príklady\");\n\t\t\t\t\t\t\t\t\t\ttemp\n\t\t\t\t\t\t\t\t\t\t\t\t.add(\"-------------------------------------\");\n\t\t\t\t\t\t\t\t\t\ttemp\n\t\t\t\t\t\t\t\t\t\t\t\t.add(\" Vaša úroveň zostáva nezmenená\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"---------------------------\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" Teraz zvoľte návrat\");\n\t\t\t\t\t\t\t\t\t\tanalyzaList.setListData(temp.toArray());\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else if (mod.equals(\"p\")) {\n\t\t\t\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\t\t\t\tint r = rand.nextInt(49) + 36;\n\t\t\t\t\t\t\t\tif (priklad.equals(new Dvojzvuk(r, 5))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Dvojzvuk(r, 1);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Dvojzvuk(r, 1))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(r, 4, 8);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Trojzvuk(r, 4, 8))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(r, 5, 9);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Trojzvuk(r, 5, 9))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(r, 2, 7);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Trojzvuk(r, 2, 7))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Stvorzvuk(r, 3, 6, 10);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Stvorzvuk(r, 3, 6, 10))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Stvorzvuk(r, 2, 3, 5);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Stvorzvuk(r, 2, 3, 5))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Stvorzvuk(r, 4, 8, 9);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Stvorzvuk(r, 4, 8, 9))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Trojzvuk(r, 7, 12);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Trojzvuk(r, 7, 12))) {\n\t\t\t\t\t\t\t\t\tpriklad = new Stvorzvuk(r, 8, 10, 11);\n\t\t\t\t\t\t\t\t} else if (priklad.equals(new Stvorzvuk(r, 8, 10, 11))) {\n\n\t\t\t\t\t\t\t\t\tif (spravne == true) {\n\t\t\t\t\t\t\t\t\t\tLinkedList<String> temp = new LinkedList<String>();\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" :) ĎAKUJEME :)\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"-------------------------------------\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" a tiež GOOD JOB, všetko dobre!:\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"-----------------------------------\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" teraz zvoľte návrat\");\n\t\t\t\t\t\t\t\t\t\tanalyzaList.setListData(temp.toArray());\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tLinkedList<String> temp = new LinkedList<String>();\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" :) ĎAKUJEME :)\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"-------------------------------------\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" veľmi ste nám pomohli!!\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\"-----------------------------------\");\n\t\t\t\t\t\t\t\t\t\ttemp.add(\" teraz zvoľte návrat\");\n\t\t\t\t\t\t\t\t\t\tanalyzaList.setListData(temp.toArray());\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * java.util.Random rand = new Random(); int[] p;\n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t * int r = rand.nextInt(3); //r = 2; switch (r) {\n\t\t\t\t\t\t\t * case 0: priklad = new\n\t\t\t\t\t\t\t * Dvojzvuk(rand.nextInt(49)+36,rand.nextInt(13));\n\t\t\t\t\t\t\t * break; case 1: p = new int[2]; while (p[0] ==\n\t\t\t\t\t\t\t * p[1]) { p[0] = rand.nextInt(13); p[1] =\n\t\t\t\t\t\t\t * rand.nextInt(13); } Arrays.sort(p); priklad = new\n\t\t\t\t\t\t\t * Trojzvuk(rand.nextInt(49)+36,p[0],p[1]); break;\n\t\t\t\t\t\t\t * case 2: p = new int[3]; while ((p[0] == p[1]) ||\n\t\t\t\t\t\t\t * (p[1] == p[2]) || (p[0] == p[2])) { p[0] =\n\t\t\t\t\t\t\t * rand.nextInt(13); p[1] = rand.nextInt(13); p[2] =\n\t\t\t\t\t\t\t * rand.nextInt(13); } Arrays.sort(p); priklad = new\n\t\t\t\t\t\t\t * Stvorzvuk(rand.nextInt(49)+36,p[0],p[1],p[2]);\n\t\t\t\t\t\t\t * break; }\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t}\n\t\treturn dalejTlacitko;\n\t}", "private void configureButtons() {\n\n\t\t// Set button listeners\n\t\tfor(SLChannelControllerViews views : mChannelViews) {\n\t\t\tviews.getChannelButton().setOnTouchListener(new SLSeekBarOnTouchListener(views.getChannelSeekBar()));\n\t\t}\n\t}", "public JButton getBoton1(){\n return this.perfilBT;\n }" ]
[ "0.63648856", "0.6186156", "0.61422235", "0.6139473", "0.61120564", "0.60973215", "0.60414857", "0.6023609", "0.60147357", "0.6007374", "0.5988213", "0.59302264", "0.59150845", "0.58994997", "0.58717024", "0.5867906", "0.5829799", "0.5780262", "0.5772319", "0.576355", "0.57518816", "0.57428735", "0.5721559", "0.57108235", "0.5701462", "0.56658983", "0.56643677", "0.5659996", "0.5651886", "0.5640099", "0.5639126", "0.5638666", "0.5613532", "0.56135076", "0.5591723", "0.5588777", "0.55831945", "0.55815995", "0.558043", "0.55726033", "0.5572386", "0.5537292", "0.55196494", "0.55184346", "0.5505329", "0.5503839", "0.5503752", "0.54748785", "0.54652715", "0.5464262", "0.54617304", "0.54572546", "0.54519147", "0.5448638", "0.5443774", "0.54380506", "0.5431007", "0.5430229", "0.54009855", "0.53897315", "0.5370579", "0.5370186", "0.5365233", "0.5365193", "0.5363477", "0.53596115", "0.53596115", "0.53596115", "0.53596115", "0.53596115", "0.53596115", "0.53596115", "0.53596115", "0.53596115", "0.53596115", "0.53596115", "0.53596026", "0.535641", "0.5350666", "0.53506595", "0.53498864", "0.53476596", "0.53452754", "0.5343875", "0.5340577", "0.53272265", "0.5323056", "0.5322336", "0.5315062", "0.53023547", "0.52960914", "0.52903825", "0.5286718", "0.52829164", "0.52828825", "0.52806383", "0.5276656", "0.5255853", "0.52412975", "0.52399635" ]
0.8210843
0
Makes the Line Chart button
public void MakeLine() { LineButton = new JButton( new ImageIcon(getClass().getResource(GetLineChartImage()))); LineButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { GetHost().instructionText.setVisible(false); GetHost().ExportEnabled(); if(GetHost().GetTitle() == UNSET) { GetHost().LeftPanelContent(new LineChart( GetHost().GetGraphData(), "Line Chart", GetHost().GetColourScheme(),GetHost())); }else { GetHost().LeftPanelContent(new LineChart( GetHost().GetGraphData(), GetHost().GetTitle(), GetHost().GetColourScheme(),GetHost())); } } }); ChartTypeInterface.add(LineButton); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void MakeXYSpline() {\n\t\tXYSplineButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetXYSplineChartImage())));\n\t\tXYSplineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new XYSplineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"XYSpline Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new XYSplineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(XYSplineButton);\t\n\t}", "@Override\n BackgroundLineChart generateLineChart() {\n\n final BackgroundLineChart lineChart;\n final NumberAxis xAxis = new NumberAxis();\n xAxis.setLabel(\"Time\");\n\n List<XYChart.Series<Number, Number>> seriesList = FXCollections.observableArrayList();\n\n for (DataPoint.Type type : DataPoint.Types.values()) {\n XYChart.Series<Number, Number> series = new XYChart.Series<>();\n series.setName(type.getName());\n seriesList.add(series);\n this.getSeriesMap().put(type, series);\n }\n\n lineChart = new BackgroundLineChart(this.captureSession, xAxis, new NumberAxis(), FXCollections.observableArrayList(seriesList));\n\n //@Source - https://stackoverflow.com/a/44957354 - Enables Toggle of Data Series by clicking on their icon in the legend\n for (Node n : lineChart.getChildrenUnmodifiable()) {\n if (n instanceof Legend) {\n Legend l = (Legend) n;\n for (Legend.LegendItem li : l.getItems()) {\n for (XYChart.Series<Number, Number> s : lineChart.getData()) {\n if (s.getName().equals(li.getText())) {\n li.getSymbol().setCursor(Cursor.HAND); // Hint user that legend symbol is clickable\n li.setText(li.getText() + \" On\");\n li.getSymbol().setOnMouseClicked(me -> {\n if (me.getButton() == MouseButton.PRIMARY) {\n s.getNode().setVisible(!s.getNode().isVisible()); // Toggle visibility of line\n\n String[] displayName = li.getText().split(\" \");\n li.setText(String.format(\"%s %s\", String.join(\" \", Arrays.copyOfRange(displayName, 0, displayName.length - 1)), (s.getNode().isVisible() ? \"On\" : \"Off\")));\n for (XYChart.Data<Number, Number> d : s.getData()) {\n if (d.getNode() != null) {\n d.getNode().setVisible(s.getNode().isVisible()); // Toggle visibility of every node in the series\n }\n }\n lineChart.redraw();\n }\n });\n break;\n }\n }\n }\n }\n }\n //---\n\n return lineChart;\n }", "public LineChart() {\n init();\n }", "public void button1Pushed(ActionEvent event)\r\n {\n GraphicsContext gc = canvas.getGraphicsContext2D();\r\n \r\n //clear any content out of the canvas\r\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from upper-left to lower-right of the canvas\r\n gc.strokeLine(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from upper-right to lower-left corner\r\n gc.strokeLine(canvas.getWidth(), 0, 0, canvas.getHeight());\r\n \r\n }", "private void createChart() {\n LineChart lineChart = (LineChart) findViewById(R.id.line_chart);\n\n // LineChart DataSet\n ArrayList<LineDataSet> dataSets = new ArrayList<>();\n\n // x-coordinate format value\n XAxis xAxis = lineChart.getXAxis();\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setGranularity(1f); // only intervals of 1 day\n// xAxis.setValueFormatter(new DayAxisValueFormatter(lineChart));\n\n\n // x-coordinate value\n ArrayList<String> xValues = new ArrayList<>();\n xValues.add(\"No.1\");\n xValues.add(\"No.2\");\n xValues.add(\"No.3\");\n xValues.add(\"No.4\");\n xValues.add(\"No.5\");\n\n // value\n ArrayList<Entry> value = new ArrayList<>();\n String measureItemName = \"\";\n value.add(new Entry(100, 0));\n value.add(new Entry(120, 1));\n value.add(new Entry(150, 2));\n value.add(new Entry(250, 3));\n value.add(new Entry(500, 4));\n\n\n // add value to LineChart's DataSet\n LineDataSet valueDataSet = new LineDataSet(value, measureItemName);\n dataSets.add(valueDataSet);\n\n // set LineChart's DataSet to LineChart\n// lineChart.setData(new LineData(xValues, dataSets));\n lineChart.setData(new LineData(valueDataSet));\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\n public void createNewLineChart() {\n\n ArrayList<Entry> yValues = new ArrayList<>();\n yValues.clear();\n\n //Todays Date\n Date date = new Date();\n LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n// String currentMonth = getMonthForInt(localDate.getMonthValue());\n if (monthSelectedAsInt > localDate.getMonthValue()){\n yValues.add(new Entry(0, 0));\n } else if (monthSelectedAsInt == localDate.getMonthValue()){\n for (int i = 1; i <= localDate.getDayOfMonth() ; i++) {\n yValues.add(new Entry(i, occupancyRate[i]));\n }\n } else {\n for (int i = 1; i <= numberOfDays ; i++) {\n yValues.add(new Entry(i, occupancyRate[i]));\n }\n }\n\n //chart.setOnChartValueSelectedListener(this);\n\n // enable scaling and dragging\n chart.setDragEnabled(true);\n chart.setScaleEnabled(true);\n\n // if disabled, scaling can be done on x- and y-axis separately\n chart.setPinchZoom(false);\n\n LineDataSet set1;\n\n set1 = new LineDataSet(yValues, \"Occupany Rate \");\n set1.setDrawCircles(false);\n set1.setDrawValues(false);\n set1.setColor(Color.RED);\n\n ArrayList <ILineDataSet> dataSets = new ArrayList<>();\n dataSets.add(set1);\n LineData dataLine = new LineData(set1);\n chart.getDescription().setEnabled(false);\n chart.getXAxis().setTextSize(10f);\n chart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);\n\n chart.getAxisLeft().setAxisMinimum(0);\n chart.getAxisLeft().setAxisMaximum(100);\n chart.getAxisRight().setAxisMinimum(0);\n chart.getAxisRight().setAxisMaximum(100);\n chart.getXAxis().setAxisMinimum(1);\n chart.getXAxis().setAxisMaximum(numberOfDays);\n\n chart.setData(dataLine);\n chart.invalidate();\n }", "public void setGraph(ActionEvent event)\n {\n theLineGraph.getData().clear();\n double temporary=0;\n theLineGraph.getXAxis().setLabel(\"Days\");\n\n XYChart.Series<String, Number> theGraph = new XYChart.Series<String, Number>();\n\n for (int i=0; i<Driver.save.getLog().size();i++)\n {\n String myI=i+\"\";\n\n if (event.getSource()==caloriesButton)\n {\n temporary=Driver.save.getDayCalories(i);\n theLineGraph.getYAxis().setLabel(\"Calories\");\n\n } else if(event.getSource()==protienButton)\n {\n temporary=Driver.save.getDayProtein(i);\n theLineGraph.getYAxis().setLabel(\"protien\");\n }\n else if (event.getSource()==carbsButton)\n {\n temporary=Driver.save.getDayCarbo(i);\n theLineGraph.getYAxis().setLabel(\"Carbs\");\n }\n else if (event.getSource()==fatsButton)\n {\n temporary=Driver.save.getDayFats(i);\n theLineGraph.getYAxis().setLabel(\"Fats\");\n }\n else if (event.getSource()==bevButton)\n {\n temporary=Driver.save.getDayBevarage(i);\n theLineGraph.getYAxis().setLabel(\"Drinks in ml\");\n }\n\n theGraph.getData().add(new XYChart.Data<String, Number>(myI ,temporary));\n }\n theLineGraph.getData().addAll(theGraph);\n\n }", "@FXML\n public void drawXButtonPressed()\n {\n //get the GraphicsContent, which is used to draw on the canvas\n GraphicsContext gc = clearCanvasAndGetGraphicsContext();\n\n //draw line from top corner to bottom corner\n gc.strokeLine(\n 0,\n 0,\n canvas.getWidth(),\n canvas.getHeight()\n );\n\n //draw line from bottom left corner to upper right corner\n gc.strokeLine(\n 0,\n canvas.getHeight(),\n canvas.getWidth(),\n 0\n );\n }", "public void chartMouseClicked(ChartMouseEvent event) {\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tint month;\n\t\tdouble maxtempereture,monthlytempereture,mintempereture;\n\t\tResultSet rs;\n\t\tlib.MySQL mysql = new lib.MySQL();\n\t\trs = mysql.selectAll();\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\ttry{\n\t\t\twhile(rs.next()){\n\t\t\t\tmonth = rs.getInt(\"Month\");\n\t\t\t\tmaxtempereture = rs.getDouble(\"MaxTempereture\");\n\t\t\t\tmonthlytempereture = rs.getDouble(\"MonthkyTempereture\");\n\t\t\t\tmintempereture = rs.getDouble(\"MinTempereture\");\n System.out.println(\"月:\" + month);\n System.out.println(\"最高気温:\" + maxtempereture);\n System.out.println(\"月間平均気温:\" + monthlytempereture);\n System.out.println(\"最低気温:\" + mintempereture);\n data.addValue(maxtempereture,\"MaxTempereture\",month+\"\");\n data.addValue(monthlytempereture,\"MonthlyTempereture\",month+\"\");\n data.addValue(mintempereture,\"MinTempereture\",month+\"\");\n\t\t }\n\t\t}catch(SQLException et){}\n\t\t JFreeChart chart = \n\t\t\t ChartFactory.createLineChart(\"TOKYO TEMPERETURE\",\n\t\t\t \"month\",\n\t\t\t \"tempereture\",\n\t\t\t data,\n\t\t\t PlotOrientation.VERTICAL,\n\t\t\t true,\n\t\t\t false,\n\t\t\t false);\n \n\n ChartPanel cpanel = new ChartPanel(chart);\n panel1.add(cpanel);\n cardlayout.next(this);\n\t}", "@Override\n\t\t\t\tprotected LineChartPanel getLineChartPanel() {\n\t\t\t\t\treturn lineChartPanel;\n\t\t\t\t}", "@Override\n public void onValueSelected(Entry e, int dataSetIndex, Highlight h) {\n if (e == null)\n return;\n\n dataset_line.setDrawValues(true);\n dataset_line2.setDrawValues(true);\n PlaceholderFragment.toastLineChart(getContext(),arrayListKonsum.get(e.getXIndex()));\n //Toast.makeText(getActivity(), arrayListKonsum.get(e.getXIndex()), Toast.LENGTH_SHORT).show();\n }", "@Override\r\n public void chartMouseClicked(ChartMouseEvent cme) {\n }", "@Override\n public void run() {\n XYChart.Data<Number, Number> data = new XYChart.Data<>(-x, y);\n data.setNode(new Circle(5, javafx.scene.paint.Color.GREY));\n series.getData().add(data);\n lineChart.getData().add(series);\n }", "private void setDataLineChart() {\n\t\t\n\t\tchartLine.setTitle(\"Evolution du Solde\");\n\t\tchartLine.getData().clear();\n\t\t\n\t\tXYChart.Series series = new XYChart.Series();\n\t\tseries.getData().clear();\n\t\tseries.setName(\"Evolution du solde\");\n\t\t\n\t\tdouble solde = bal.getAmount();\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR);\n\t\tint currentMonth = Calendar.getInstance().get(Calendar.MONTH);\n\t\tint currentDay = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);\n\t\t\n\t\t\n\t\t// Create a calendar object and set year and month\n\t\tCalendar mycal = new GregorianCalendar(currentYear, currentMonth,\n\t\t\t\tcurrentDay);\n\t\t\n\t\t// Get the number of days in that month\n\t\tint daysInMonth = mycal.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\n\t\tif (!bal.getTransactions().isEmpty()) {\n\t\t\tfor (IOTransactionLogic transaction : bal.getTransactions()\n\t\t\t\t\t.get(currentYear)[currentMonth]) {\n\t\t\t\tsolde -= transaction.getAmount();\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < currentDay; ++i) {\n\t\t\tif (!bal.getTransactions().isEmpty()) {\n\t\t\t\tfor (IOTransactionLogic transaction : bal.getTransactions()\n\t\t\t\t\t\t.get(currentYear)[currentMonth]) {\n\t\t\t\t\tjava.sql.Date dat = transaction.getDate();\n\t\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\t\tcal.setTime(dat);\n\t\t\t\t\tif (cal.get(Calendar.DAY_OF_MONTH) - 1 == i) {\n\t\t\t\t\t\tsolde += transaction.getAmount();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tseries.getData()\n\t\t\t\t\t.add(new XYChart.Data(String.valueOf(i + 1), solde));\n\t\t}\n\t\t\n\t\tchartLine.getData().addAll(series);\n\t\tchartLine.setLegendVisible(false);\n\t}", "private void initChart() {\n Cartesian cartesian = AnyChart.line();\n\n cartesian.animation(true);\n\n cartesian.padding(10d, 20d, 5d, 20d);\n\n cartesian.crosshair().enabled(true);\n cartesian.crosshair()\n .yLabel(true)\n // TODO ystroke\n .yStroke((Stroke) null, null, null, (String) null, (String) null);\n\n cartesian.tooltip().positionMode(TooltipPositionMode.POINT);\n\n cartesian.title(\"Steps taken in this week and last week\");\n\n cartesian.yAxis(0).title(\"Steps\");\n cartesian.xAxis(0).labels().padding(5d, 5d, 5d, 5d);\n\n List<DataEntry> seriesData = new ArrayList<>();\n Log.d(\"Size This Week\",stepsTakenModelsThisWeek.size()+\"\");\n for(int i = 0 ; i<7 ; i++){\n CustomDataEntry c = new CustomDataEntry(days[i],stepsTakenModelsLastWeek.get(i).getSteps());\n if(i<stepsTakenModelsThisWeek.size()){\n c.setValue(\"value2\",stepsTakenModelsThisWeek.get(i).getSteps());\n }else{\n if(DateUtilities.getDayInAbbBySelectedDate(stepsTakenModelsLastWeek.get(i).getDate()).equals(\n DateUtilities.getCurrentDayInAbb()))\n {\n c.setValue(\"value2\",stepsToday);\n }else{\n c.setValue(\"value2\",0);\n }\n }\n seriesData.add(c);\n }\n\n Set set = Set.instantiate();\n set.data(seriesData);\n Mapping series1Mapping = set.mapAs(\"{ x: 'x', value: 'value' }\");\n Mapping series2Mapping = set.mapAs(\"{ x: 'x', value: 'value2' }\");\n\n Line series1 = cartesian.line(series1Mapping);\n series1.name(\"Last Week\");\n series1.hovered().markers().enabled(true);\n series1.hovered().markers()\n .type(MarkerType.CIRCLE)\n .size(4d);\n series1.tooltip()\n .position(\"right\")\n .anchor(Anchor.LEFT_CENTER)\n .offsetX(5d)\n .offsetY(5d);\n\n Line series2 = cartesian.line(series2Mapping);\n series2.name(\"This Week\");\n series2.hovered().markers().enabled(true);\n series2.hovered().markers()\n .type(MarkerType.CIRCLE)\n .size(4d);\n series2.tooltip()\n .position(\"right\")\n .anchor(Anchor.LEFT_CENTER)\n .offsetX(5d)\n .offsetY(5d);\n\n\n cartesian.legend().enabled(true);\n cartesian.legend().fontSize(13d);\n cartesian.legend().padding(0d, 0d, 10d, 0d);\n\n chart.setChart(cartesian);\n }", "public void button2Pushed(ActionEvent event)\r\n {\n GraphicsContext gc = canvas.getGraphicsContext2D();\r\n \r\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from 0,0 to lower right\r\n for (int start = 0; start <= canvas.getWidth(); start += 20)\r\n gc.strokeLine(start, canvas.getHeight()-start, canvas.getWidth(), canvas.getHeight());\r\n \r\n \r\n for (int start = 0; start <= canvas.getWidth(); start += 20)\r\n gc.strokeLine(0, 0, start, canvas.getHeight()-start);\r\n \r\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\t \n\t\t for(int g = 0;g<i;g++){\n\t\t String s = String.valueOf(datas[1][g]);\n\t\t data.addValue(this.datas[2][g], this.name[g], s);\n\t\t }\n\t\t \n\t\t if(e.getSource() == button1){\n\t\t JFreeChart chart = ChartFactory.createLineChart(\"Import Volume\",\n\t\t \"Year\",\n\t\t \"Ton\",\n\t\t data,\n\t\t PlotOrientation.VERTICAL,\n\t\t true,\n\t\t false,\n\t\t false);\n\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t add(cpanel, BorderLayout.CENTER);\n\t\t setVisible(true);\n\t\t } else if(e.getSource() == button2){\n\t\t\t JFreeChart chart = ChartFactory.createBarChart(\"Import Volume\",\n \"Year\",\n \"Ton\",\n data,\n PlotOrientation.VERTICAL,\n true,\n false,\n false);\n\t\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t\t add(cpanel, BorderLayout.CENTER);\n\t\t\t setVisible(true);\n} \n\n\t\t\n\t}", "public DrawLineGraph()\n\t{\n\t\tframe = new JFrame();\n\t\tframe.setTitle(\"Line Graph\");\n\t\tframe.setSize(600,400);\n\t\tframe.setLayout(new BorderLayout());\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\t\n\t\tseries = new XYSeries(\"Cross Entropy Cost Function\");\n\t\tXYSeriesCollection dataset = new XYSeriesCollection(series);\n\t\tchart = ChartFactory.createXYLineChart(\"Cross Entropy Cost Function\", \"Epoch\", \"Error\", dataset);\n\t\tframe.add(new ChartPanel(chart), BorderLayout.CENTER);\n\t\t\n\n\t}", "public void MakeScatter() {\n\t\tScatterButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(\n\t\t\t\tGetScatterPlotChartImage())));\n\t\tScatterButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Scatter Plot Chart \", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(ScatterButton);\n\t}", "public boolean getLineButton() {\n\t\treturn getRawButton(LINE_BUTTON);\n\t}", "@Override\n \tpublic void onClick(View arg0) {\n \t\ttry{\n \t\t\tSeriesSelection selectedPoint = lineGraph.getCurrentSeriesAndPoint();\n \n \t\t\tif(selectedPoint!=null)\n \t\t\t{\n \t\t\t\tString time = xAxisLabelsFinal[(int)selectedPoint.getXValue()];\n \n \t\t\t\tdouble amount=(double)selectedPoint.getValue();\n \t\t\t\t\n \t\t\t\tToast.makeText(caller.getBaseContext(), \"Crowdedness at \" + time + \": \" + amount + \"%\", Properties.TOAST_DEFAULT_DURATION).show();\n \t\t\t}\n \t\t} catch(Exception e){\n \t\t\t\n \t\t}\n \t}", "@Override\n\t protected void onResume() {\n\t super.onResume();\n\t if (mChartView == null) {\n\t LinearLayout layout = (LinearLayout) findViewById(R.id.chart);\n\t mChartView = ChartFactory.getLineChartView(this, mDataset, mRenderer);\n\t // enable the chart click events\n\t mRenderer.setClickEnabled(true);\n\t mRenderer.setSelectableBuffer(10);\n\t layout.addView(mChartView, new LayoutParams(LayoutParams.FILL_PARENT,\n\t LayoutParams.FILL_PARENT));\n\t } else {\n\t mChartView.repaint();\n\t }\n\t }", "@Action(selectedProperty = LINE_PAINTING)\r\n public void toggleLines (ActionEvent e)\r\n {\r\n }", "private void start () {\n NumberAxis xAxis = new NumberAxis();\n NumberAxis yAxis = new NumberAxis();\n\n xAxis.setForceZeroInRange(false);\n yAxis.setForceZeroInRange(false);\n xAxis.setAnimated(false);\n yAxis.setAnimated(false);\n\n xAxis.setLabel(\"Number of \" + cmc + \" Drops\");\n xAxis.setMinorTickVisible(false);\n\n chart = new LineChart<>(xAxis, yAxis);\n chart.setTitle(\"Changes in \" + cmc + \" Drops\");\n chart.setLegendSide(Side.LEFT);\n chart.setAnimated(false);\n\n this.getChildren().add(chart);\n this.setAlignment(Pos.CENTER_LEFT);\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n lineChart.setLegendVisible(false);\n lineChart.setAnimated(false);\n lineChart.setCreateSymbols(false);\n\n NumberAxis xAxis = (NumberAxis)lineChart.getXAxis();\n xAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(xAxis) {\n @Override\n public String toString(Number value) {\n //minus value FIXME if you can\n return String.format(\"%.1f\", -value.doubleValue());\n }\n });\n\n //-- Tooltip for lineChart\n mouseLocationInScene = new SimpleObjectProperty<>();\n tooltip = new Tooltip();\n \n lineChart.setOnMouseMoved((MouseEvent evt) -> { \n mouseLocationInScene.set(new Point2D(evt.getSceneX(), evt.getSceneY()));\n double x = getXMouseCoordinate();\n double y = getYMouseCoordinate();\n tooltip.show(lineChart, evt.getScreenX() + 50, evt.getScreenY());\n tooltip.setText(String.format(\"[%.4f; %.4f]\", -x, y));\n });\n }", "public void onPlot(View view) {\r\n\t\t// Respond to the button click\r\n\t\tIntent intent = new Intent(this, PlotActivity.class);\r\n\t\tstartActivity(intent);\t\r\n\t}", "public LineChart(String frameTitle) {\n\t\tsuper(frameTitle); // Display frame title\n\n\t\tfinal JFrame frame = new JFrame(frameTitle);\n\t\tframe.setDefaultCloseOperation(frame.getDefaultCloseOperation());\n\t\tJFreeChart lineChart = ChartFactory.createLineChart(\"Experiment : \"+ (expNum+1),\n\t\t\t\t\"Tournament\", \"Cummulative Pay-Off\", /** Modified from original code **/\n\t\t\t\tcreateDataset(), PlotOrientation.VERTICAL, true, true, false); // plot graph\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tlineChart.setBackgroundPaint(Color.white); // set background color\n\n\t\tChartPanel chartPanel = new ChartPanel(lineChart);\n\t\tchartPanel.setPreferredSize(new java.awt.Dimension(1200, 700)); \n\t\tsetContentPane(chartPanel);\n\t\tchartPanel.setLayout(null);\n\n\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n if (e.getButton() == MouseEvent.BUTTON3) {\n if (currentDrawing == null) {\n return;\n }\n currentDrawing = null;\n canvas.repaint();\n }\n\n// start drawing\n if (currentDrawing == null) {\n currentDrawing = new Line(e.getPoint(), e.getPoint(), outlineColorProvider.getCurrentColor());\n canvas.repaint();\n return;\n }\n\n// finish drawing\n currentDrawing.setEnd(e.getPoint());\n drawingModel.add(currentDrawing);\n currentDrawing = null;\n }", "private void updateChart() {\n //Declare needed variables\n final DateFormat dateFormat = new SimpleDateFormat(\"dd-MM\", Locale.getDefault());\n final LineChart chart = findViewById(R.id.chartWeight);\n List<Entry> weightEntries = new ArrayList<>();\n mUser.weight.sortListByDate();\n ArrayList<WeightValue> weightHistory = mUser.weight.getWeightHistory();\n\n //Set entries to entry list from weight history list\n for (int i = 0; i < weightHistory.size(); i++) {\n //Get the current weight weight value and intialize the current variables\n WeightValue weightValue = weightHistory.get(i);\n Date date = weightValue.getDate();\n float weight = (float) weightValue.getWeight();\n\n //Add the entries to the entries list\n weightEntries.add(new Entry(date.getTime(), weight));\n }\n\n //Setup XAxis\n XAxis xAxis = chart.getXAxis();\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setDrawGridLines(false);\n xAxis.setGranularity(1f);\n xAxis.setGranularityEnabled(true);\n xAxis.setLabelCount(weightHistory.size(), false);\n xAxis.setValueFormatter(new IndexAxisValueFormatter() {\n @Override\n public String getFormattedValue(float value) {\n return dateFormat.format(value);\n }\n });\n\n //Setups YAxis\n YAxis rightYAxis = chart.getAxisRight();\n rightYAxis.setEnabled(false);\n\n //Create linedata from the entries list\n final LineDataSet weightDataSet = new LineDataSet(weightEntries, \"Paino\");\n\n //Customize chart\n Description desc = new Description();\n desc.setEnabled(false);\n chart.setDescription(desc);\n chart.setMaxHighlightDistance(20);\n\n weightDataSet.setValueTextSize(10);\n weightDataSet.setColor(Color.BLUE);\n weightDataSet.setFillAlpha(10);\n weightDataSet.setLineWidth(3f);\n weightDataSet.setCircleRadius(4);\n\n\n\n //Shows the values as integers rather than floats\n weightDataSet.setValueFormatter(new ValueFormatter() {\n @Override\n public String getFormattedValue(float value) {\n return String.format(Locale.getDefault(), \"%.1f\", value);\n }\n });\n\n chart.setOnChartValueSelectedListener(new OnChartValueSelectedListener() {\n @Override\n public void onValueSelected(final Entry e, Highlight h) {\n AlertDialog.Builder builder = new AlertDialog.Builder(WeightActivity.this);\n builder.setTitle(\"Poista arvo\")\n .setMessage(\"Oletko varma?\")\n .setNegativeButton(\"Peruuta\", null)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n weightDataSet.removeEntry(e);\n chart.invalidate();\n\n mUser.weight.removeWeightByDate(e.getX());\n updateText();\n }\n });\n\n AlertDialog alert = builder.create();\n alert.show();\n }\n\n @Override\n public void onNothingSelected() {\n\n }\n });\n\n //Add the values to the chart and intialize it\n LineData weightLineData = new LineData(weightDataSet);\n chart.setData(weightLineData);\n chart.invalidate();\n }", "private void btnRenderActionPerformed(java.awt.event.ActionEvent evt) {\n \r\n String x = jcbX_Axis.getSelectedItem().toString();\r\n String y = jcbY_Axis.getSelectedItem().toString();\r\n \r\n if(y.equals(\"Depth\")){\r\n //log plot\r\n \r\n WitsmlLogCurve ydata = currentCurves.get(0);\r\n WitsmlLogCurve xdata = null;\r\n // the selected value by looping through the curve object\r\n \r\n for(int i = 1; i < currentCurves.size(); i ++){\r\n if(x.equals(currentCurves.get(i).getDescription())){\r\n xdata = currentCurves.get(i);\r\n // System.out.println(\"got \"+currentCurves.get(i).getDescription());\r\n break;\r\n }\r\n }\r\n \r\n \r\n List<Object> yvalues = ydata.getValues();\r\n List<Object> xvalues = xdata.getValues();\r\n \r\n \r\n String title = \"Depth against \"+xdata.getDescription();\r\n XYSeries series = new XYSeries(title);\r\n for(int i = 0; i<yvalues.size(); i++){\r\n Object vx = xvalues.get(i);\r\n Object vy = yvalues.get(i);\r\n double dx = Double.parseDouble(vx.toString());\r\n double dy = Double.parseDouble(vy.toString());\r\n // System.out.println(\"depth : \"+dy +\" : \"+title+\" : \"+dx);\r\n series.add(dx, dy);\r\n }\r\n XYSeriesCollection data = new XYSeriesCollection();\r\n data.addSeries(series);\r\n \r\n // create a chart using the createYLineChart method...\r\n JFreeChart chart = ChartFactory.createXYLineChart(title, // chart title\r\n xdata.getDescription(), \"Depth\", // x and y axis labels\r\n data); // data\r\n \r\n XYPlot plot = (XYPlot) chart.getPlot();\r\n XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();\r\n renderer.setSeriesLinesVisible(0, true);\r\n renderer.setSeriesShapesVisible(0, false);\r\n renderer.setSeriesLinesVisible(1, false);\r\n renderer.setSeriesShapesVisible(1, true); \r\n plot.setRenderer(renderer);\r\n ChartPanel cp = new ChartPanel(chart);\r\n setDisplayArea(cp);\r\n \r\n }else{\r\n // trajectory\r\n \r\n ArrayList<Double> ax = getValues(x);\r\n ArrayList<Double> ay = getValues(y);\r\n \r\n XYSeries series = new XYSeries(trajName);\r\n for(int i = 0; i < ax.size(); i++){\r\n series.add(ax.get(i), ay.get(i));\r\n }\r\n XYSeriesCollection data = new XYSeriesCollection();\r\n data.addSeries(series);\r\n JFreeChart chart = ChartFactory.createXYLineChart(trajName, // chart title\r\n x, y, // x and y axis labels\r\n data);\r\n ChartPanel cp = new ChartPanel(chart);\r\n setDisplayArea(cp);\r\n// call a method to select the method here \r\n }\r\n }", "public GUIVerbrauchsdiagramm(String title, EnergyData energyData) {\n super(title);\n this.energyData = energyData;\n setExtendedState(JFrame.MAXIMIZED_BOTH);\n ChartPanel chartPanel = (ChartPanel) createPanel(energyData);\n\n buttonGroup.add(verbrauchDiagramm);\n buttonGroup.add(zaehlerDiagramm);\n pRadiobuttons.add(verbrauchDiagramm);\n pRadiobuttons.add(zaehlerDiagramm);\n pRadiobuttons.setBorder(new EmptyBorder(0, 20, 0, 0));\n verbrauchDiagramm.setSelected(true);\n tDate.setForeground(Color.gray);\n\n pSkipDay.setLayout(new GridLayout(1, 7, 5, 0));\n pSkipDay.add(bBackwardsM);\n pSkipDay.add(bBackwardsW);\n pSkipDay.add(bBackwards);\n pSkipDay.add(tDate);\n pSkipDay.add(bForwards);\n pSkipDay.add(bForwardsW);\n pSkipDay.add(bForwardsM);\n\n pDate.add(lCurrentDate);\n pDate.add(lEmpty2);\n pDate.add(pSkipDay);\n\n\n pCsv.add(bExportCSV);\n pCsv.add(lEmpty);\n pCsv.add(bExportJSON);\n\n\n pHeader.add(pRadiobuttons);\n pHeader.add(pDate);\n pHeader.add(pCsv);\n\n this.add(chartPanel, BorderLayout.CENTER);\n this.add(pHeader, BorderLayout.NORTH);\n\n //Actionlistener\n ActionListener actionListenerDiagramm = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (verbrauchDiagramm.isSelected()) {\n System.out.println(\"Verbrauchsdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetVerbrauchsdiagramm(energyData);\n chart.setTitle(\"Stromzählerübersicht\");\n }\n if (zaehlerDiagramm.isSelected()) {\n System.out.println(\"Zählerdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetZaehlerdiagramm(energyData);\n chart.setTitle(\"Zählerstand\");\n }\n }\n };\n\n bExportCSV.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n try {\n JFileChooser fileChooser = new JFileChooser(\"./CSV\");\n fileChooser.setDialogTitle(\"CSV-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.csv\",\"csv\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".csv\")){\n path = path +\".csv\";\n }\n FileHandler.writeCSV(map,path);\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden in ein CSV-File exportiert\");\n }\n });\n\n bExportJSON.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n FileHandler.saveJSON(map);\n\n try {\n JFileChooser fileChooser = new JFileChooser(\"./JSON\");\n fileChooser.setDialogTitle(\"JSON-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.json\",\"json\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".json\")){\n path = path +\".json\";\n }\n FileWriter fileWriter = new FileWriter(path);\n fileWriter.write(FileHandler.saveJSON(map));\n fileWriter.flush();\n fileWriter.close();\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden zum JSON exportiert \\n\" + \"https://api.npoint.io/0dc854da1619aca3be45\");\n }\n });\n\n bForwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, true);\n }\n });\n\n bBackwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, false);\n }\n });\n bBackwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, false);\n }\n });\n bForwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, true);\n }\n });\n bBackwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, false);\n }\n });\n bForwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, true);\n }\n });\n\n /*chart.getXYPlot().addChangeListener(new PlotChangeListener() {\n @Override\n public void plotChanged(PlotChangeEvent plotChangeEvent) {\n XYPlot plot = plotChangeEvent.getPlot().getChart().getXYPlot();\n PlotChangeListener plotChangeListener = this;\n\n plot.removeChangeListener(plotChangeListener);\n long upperBound = (long) plot.getDomainAxis().getUpperBound();\n long lowerBound = (long) plot.getDomainAxis().getLowerBound();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(upperBound / 900000 * 900000);\n upperBound = calendar.getTimeInMillis();\n\n calendar.setTimeInMillis(lowerBound / 900000 * 900000);\n lowerBound = calendar.getTimeInMillis();\n System.out.println(new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\").format(new Date(lowerBound)));\n\n System.out.println(getEnergyData().getSdatData().containsKey(lowerBound));\n\n double highestValue = 0;\n if (getEnergyData().getSdatData().containsKey(lowerBound)) {\n for (long i = lowerBound; i < upperBound; i = i + 86400000) {\n if (getEnergyData().getSdatData().get(i).getRelativBezug() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getRelativBezug();\n\n }\n if (getEnergyData().getSdatData().get(i).getRelativeEinspeisung() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getZaehlerstandEinspeisung();\n }\n }\n\n System.out.println(highestValue);\n System.out.println(highestValue + 1);\n\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(highestValue + 1);\n }else {\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(plot.getRangeAxis().getUpperBound());\n }\n plot.addChangeListener(plotChangeListener);\n\n }\n\n });\n */\n\n tDate.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent e) {\n checkDate(e);\n }\n\n @Override\n public void keyPressed(KeyEvent e) {\n\n }\n\n @Override\n public void keyReleased(KeyEvent e) {\n\n }\n });\n\n tDate.addFocusListener(new FocusListener() {\n @Override\n public void focusGained(FocusEvent e) {\n if (tDate.getText().equals(\"Datum:\")) {\n tDate.setText(\"\");\n tDate.setForeground(Color.BLACK);\n }\n }\n\n @Override\n public void focusLost(FocusEvent e) {\n if (tDate.getText().isEmpty()) {\n tDate.setForeground(Color.GRAY);\n tDate.setText(\"Datum:\");\n }\n }\n });\n\n\n verbrauchDiagramm.addActionListener(actionListenerDiagramm);\n zaehlerDiagramm.addActionListener(actionListenerDiagramm);\n }", "public void updateLineChart()\r\n {\r\n hoursLoggedSeries = new XYChart.Series<>();\r\n hoursLoggedSeries.setName(Integer.toString(LocalDate.now().getYear()));\r\n lineChart.getData().clear();\r\n \r\n try{\r\n populateSeriesFromDB();\r\n }\r\n catch(SQLException e)\r\n {\r\n System.err.println(e.getMessage());\r\n }\r\n lineChart.getData().addAll(hoursLoggedSeries);\r\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource() == button1){\n\t\t\tint id,number;\n\t\t\tString year;\n\t\t\tResultSet rs;\n\t\t\tMySQL mysql = new MySQL();\n\t\t\trs = mysql.selectAll();\n\t\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\twhile(rs.next()){\n\t\t\t\tid = rs.getInt(\"id\");\n\t\t\t\tyear = rs.getString(\"year\");\n\t\t\t number = rs.getInt(\"number\");\n\t\t\t data.addValue(number,\"出生数\",year); \n\t \t\t\tpanelA.add(new Label(\"id:\"+id+\" / year\"+year+\" / number\"+number)); \n\t\t\t\t}\n\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\t JFreeChart chart = \n\t\t\t ChartFactory.createLineChart(\"出生率\",\n\t\t\t \"年度\",\n\t\t\t \"万(人)\",\n\t\t\t data,\n\t\t\t PlotOrientation.VERTICAL,\n\t\t\t true,\n\t\t\t false,\n\t\t\t false);\n\n\t\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t\t panelA.add(cpanel);\n\t\t\t cardlayout.next(this);\n\n\t\t}\n\t}", "@Override\n public void onClick(View view) {\n float initFreq = Float.parseFloat(alleleInitFreq.getText().toString());\n float AAfit = Float.parseFloat(alleleFitAA.getText().toString());\n float Aafit = Float.parseFloat(alleleFitAa.getText().toString());\n float aafit = Float.parseFloat(alleleFitaa.getText().toString());\n int pop = Integer.parseInt(allelePop.getText().toString());\n float inbreed = Float.parseFloat(alleleInbreeding.getText().toString());\n int gens = Integer.parseInt(alleleGenerations.getText().toString());\n\n GraphLine allele = new GraphLine(initFreq, AAfit, Aafit, aafit, pop, inbreed, gens);\n ArrayList<Entry> line = allele.createData();\n mListener.onGraphSelected(line);\n }", "private void plotDato() {\n List<Entry> entriesMedidas = new ArrayList<Entry>();\n entriesMedidas.add(new Entry((float) dato.getYears(), (float) dato.getMeasures()[mag]));\n LineDataSet lineaMedidas = new LineDataSet(entriesMedidas, \"Medida\");\n lineaMedidas.setAxisDependency(YAxis.AxisDependency.LEFT);\n lineaMedidas.setColor(ColorTemplate.rgb(\"0A0A0A\"));\n lineaMedidas.setCircleColor(ColorTemplate.rgb(\"0A0A0A\"));\n todasMedidas.add(lineaMedidas);\n }", "private static JFreeChart createChart(CategoryDataset dataset) {\n JFreeChart chart = ChartFactory.createLineChart(\n \"Line Chart\", null /* x-axis label*/, \n \"Range\" /* y-axis label */, dataset);\n chart.addSubtitle(new TextTitle(\" Its is generated to show patient History \" \n ));\n chart.setBackgroundPaint(Color.white);\n CategoryPlot plot = (CategoryPlot) chart.getPlot();\n\tNumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();\n rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n // Line renderer = (BarRenderer) plot.getRenderer();\n // renderer.setDrawBarOutline(false);\n // LineAndShapeRenderer renderer = (LineAndShapeRenderer) plot.getRenderer(); \n//renderer.setItemMargin(3); \n//renderer.setItemLabelsVisible(true);\n chart.getLegend().setFrame(BlockBorder.NONE);\n return chart;\n }", "public void chart() {\r\n setLayout(new FlowLayout());\r\n String[] testNumbers = {\"LINEAR SEARCH\", \"TEST 1\", \"TEST 2\", \"TEST 3\", \"TEST 4\", \"TEST 5\", \"TEST 6\", \"TEST 7\", \"TEST 8\", \"TEST 9\", \"TEST 10\", \"AVERAGE\", \"STANDARD DEV.\"};\r\n Object[][] testResult = {{\"500\", lin[0][0], lin[0][1], lin[0][2], lin[0][3], lin[0][4], lin[0][5], lin[0][6], lin[0][7], lin[0][8], lin[0][0], linAvAndDev[0][0], linAvAndDev[0][1]},\r\n {\"10,000\", lin[1][0], lin[1][1], lin[1][2], lin[1][3], lin[1][4], lin[1][5], lin[1][6], lin[1][7], lin[1][8], lin[1][9], linAvAndDev[1][0], linAvAndDev[1][1]},\r\n {\"100,000\", lin[2][0], lin[2][1], lin[2][2], lin[2][3], lin[2][4], lin[2][5], lin[2][6], lin[2][7], lin[2][8], lin[2][9], linAvAndDev[2][0], linAvAndDev[2][1]},\r\n {\"1,000,000\", lin[3][0], lin[3][1], lin[3][2], lin[3][3], lin[3][4], lin[3][5], lin[3][6], lin[3][7], lin[3][8], lin[3][9], linAvAndDev[3][0], linAvAndDev[3][1]},\r\n {\"5,000,000\", lin[4][0], lin[4][1], lin[4][2], lin[4][3], lin[4][4], lin[4][5], lin[4][6], lin[4][7], lin[4][8], lin[4][9], linAvAndDev[4][0], linAvAndDev[4][1]},\r\n {\"7,000,000\", lin[5][0], lin[5][1], lin[5][2], lin[5][3], lin[5][4], lin[5][5], lin[5][6], lin[5][7], lin[5][8], lin[5][9], linAvAndDev[5][0], linAvAndDev[5][1]},\r\n {\"10,000,000\", lin[6][0], lin[6][1], lin[6][2], lin[6][3], lin[6][4], lin[6][5], lin[6][6], lin[6][7], lin[6][8], lin[6][9], linAvAndDev[6][0], linAvAndDev[6][1]},\r\n {\"BINARY SEARCH\", \"TEST 1\", \"TEST 2\", \"TEST 3\", \"TEST 4\", \"TEST 5\", \"TEST 6\", \"TEST 7\", \"TEST 8\", \"TEST 9\", \"TEST 10\", \"AVERAGE\", \"STANDARD DEV.\"},\r\n {\"500\", bin[0][0], bin[0][1], bin[0][2], bin[0][3], bin[0][4], bin[0][5], bin[0][6], bin[0][7], bin[0][8], bin[0][9], linAvAndDev[7][0], linAvAndDev[7][1]},\r\n {\"10,000\", bin[1][0], bin[1][1], bin[1][2], bin[1][3], bin[1][4], bin[1][5], bin[1][6], bin[1][7], bin[1][8], bin[1][9], linAvAndDev[8][0], linAvAndDev[8][1]},\r\n {\"100,000\", bin[2][0], bin[2][1], bin[2][2], bin[2][3], bin[2][4], bin[2][5], bin[2][6], bin[2][7], bin[2][8], bin[2][9], linAvAndDev[9][0], linAvAndDev[9][1]},\r\n {\"1,000,000\", bin[3][0], bin[3][1], bin[3][2], bin[3][3], bin[3][4], bin[3][5], bin[3][6], bin[3][7], bin[3][8], bin[3][9], linAvAndDev[10][0], linAvAndDev[10][1]},\r\n {\"5,000,000\", bin[4][0], bin[4][1], bin[4][2], bin[4][3], bin[4][4], bin[4][5], bin[4][6], bin[4][7], bin[4][8], bin[4][9], linAvAndDev[11][0], linAvAndDev[11][1]},\r\n {\"7,000,000\", bin[5][0], bin[5][1], bin[5][2], bin[5][3], bin[5][4], bin[5][5], bin[5][6], bin[5][7], bin[5][8], bin[5][9], linAvAndDev[12][0], linAvAndDev[12][1]},\r\n {\"10,000,000\", bin[6][0], bin[6][1], bin[6][2], bin[6][3], bin[6][4], bin[6][5], bin[6][6], bin[6][7], bin[6][8], bin[6][9], linAvAndDev[13][0], linAvAndDev[13][1]}};\r\n chart = new JTable(testResult, testNumbers);\r\n chart.setPreferredScrollableViewportSize(new Dimension(1500, 500)); // SETS SIZE OF CHART.\r\n chart.setFillsViewportHeight(true);\r\n JScrollPane scrollPane = new JScrollPane(chart);\r\n add(scrollPane);\r\n }", "void toggleButton_actionPerformed(ActionEvent e) {\n this.togglePlot();\n }", "public void initializeChart(String subtitle) {\n JFreeChart jfreechart = ChartFactory.createXYLineChart(\n subtitle, \"X\", \"Y\", this.dataset.getXYDataset(),\n PlotOrientation.VERTICAL, true, true, false);\n XYPlot xyplot = (XYPlot) jfreechart.getPlot();\n XYLineAndShapeRenderer xylineandshaperenderer = new XYLineAndShapeRenderer();\n xylineandshaperenderer.setBaseLinesVisible(true);\n\n // System.out.println(\"date set series count: \" + xydataset.getSeriesCount());\n // set visible or not shapes of series\n// System.out.printf(\"sets in the dataset: \"); // TODO delete this \"print\" if necessary\n for (int i = 0; i < this.dataset.seriesCount(); i++) {\n// System.out.printf(this.dataset.getSeries(i).getKey() + \" \");\n xylineandshaperenderer.setSeriesLinesVisible(i, false);\n xylineandshaperenderer.setSeriesShapesVisible(i, this.dataset.shapeVisible(i));\n }\n xylineandshaperenderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator());\n xyplot.setRenderer(xylineandshaperenderer);\n NumberAxis numberaxis = (NumberAxis) xyplot.getRangeAxis();\n numberaxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n this.jPanel = new ChartPanel(jfreechart);\n }", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tclicks++;\n\t\t\n\t\tif(clicks % 2 != 0) {\n\t\t\tstart = new Point2D(e.getX(), e.getY());\n\t\t\tend = new Point2D(e.getX(), e.getY());\n\t\t\tline = new Line(colorProvider, start, end);\n\t\t\tmodel.add(line);\n\t\t}\n\t}", "public GraphController(GUI view){\r\n\t\tview.setGvWindowListener(new GvWindowListener(){\r\n\t\t\tpublic void buttonClicked(GraphingEvent ge){\r\n\t\t\t\tmodel = ge.getDJAI_GV();\r\n\t\t\t\tmodel.setDate(ge.getDJAI_GV().getDate());\r\n\t\t\t\tmodel.setValue(ge.getDJAI_GV().getValue());\r\n\t\t\t\tSystem.out.println(ge.getSource());\r\n\t\t\t\t\r\n\t\t\t\tData = new ArrayList<String>();\r\n\t\t\t\tData = DataSaver.dowArray_C;\r\n\t\t\t\t\r\n\t\t\t\tvalue = new double[Data.size()];\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < Data.size(); i++){\r\n\t\t\t\t\tvalue[i] = Double.parseDouble(Data.get(i).substring(10));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tParent root;\r\n\t\t\t\tStage stage = new Stage();\r\n\t\t\t\tstage.setTitle(\"Graph Data\");\r\n\t\t\t\t\r\n\t\t\t\tfinal CategoryAxis xAxis = new CategoryAxis();\r\n\t\t\t final NumberAxis yAxis = new NumberAxis();\r\n\t\t\t xAxis.setLabel(\"Number of Month\");\r\n\t\t\t final LineChart<String, Number> lineChart = new LineChart<String, Number>(\r\n\t\t\t xAxis, yAxis);\t\t \r\n\t\t\t xAxis.setLabel(\"Date\");\r\n\t\t\t xAxis.setTickMarkVisible(false);\r\n\t\t\t \r\n\t\t\t yAxis.setLabel(\"DJAI Value\");\r\n\t\t\t yAxis.setAutoRanging(false);\r\n\t\t\t yAxis.setTickMarkVisible(false);\r\n\t\t\t yAxis.setUpperBound(20000);\r\n\t\t\t yAxis.setLowerBound(6000);\r\n\t\t\t yAxis.setTickUnit(2000);\r\n\t\t\t yAxis.setMinorTickCount(14);\r\n\t\t\t XYChart.Series<String, Number> series = new XYChart.Series<String, Number>();\r\n\t\t\t series.setName(\"DJAI Chart \");\r\n\t\t\t\r\n\t\t\t for(int i = 0; i < Data.size(); i++){\r\n\t\t\t \tseries.getData().add(new XYChart.Data<String, Number>(Data.get(i).substring(0, 10),\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t value[i]));\r\n\t\t\t }\r\n\t\t\t lineChart.setCreateSymbols(false);\r\n\t\t\t lineChart.getData().add(series);\r\n\t\t\t\tlineChart.isResizable();\r\n\t\t\t Scene scene = new Scene(lineChart,14000,600);\r\n\t\t\t stage.setScene(scene);\r\n\t\t\t\tstage.show();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void drawChart() {\n ArrayList<Entry> confuse = new ArrayList<>();\n ArrayList<Entry> attention = new ArrayList<>();\n ArrayList<Entry> engagement = new ArrayList<>();\n ArrayList<Entry> joy = new ArrayList<>();\n ArrayList<Entry> valence = new ArrayList<>();\n // point = \"Brow Furrow: \\n\";\n String dum = null, dum2 = null;\n for (int i = 0; i < size; i++) {\n //point += (\"\" + Emotion.getBrowFurrow(i).getL() + \" seconds reading of \" + Emotion.getBrowFurrow(i).getR() + \"\\n\");\n dum2 = Emotion.getBrowFurrow(i).getL().toString();\n dum = Emotion.getBrowFurrow(i).getR().toString();\n confuse.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getAttention(i).getL().toString();\n dum = Emotion.getAttention(i).getR().toString();\n attention.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getEngagement(i).getL().toString();\n dum = Emotion.getEngagement(i).getR().toString();\n engagement.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getJoy(i).getL().toString();\n dum = Emotion.getJoy(i).getR().toString();\n joy.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getValence(i).getL().toString();\n dum = Emotion.getValence(i).getR().toString();\n valence.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n }\n\n LineDataSet data1 = new LineDataSet(confuse,\"Confuse\");\n LineDataSet data2 = new LineDataSet(attention,\"Attention\");\n LineDataSet data3 = new LineDataSet(engagement,\"Engagement\");\n LineDataSet data4 = new LineDataSet(joy,\"Engagement\");\n LineDataSet data5 = new LineDataSet(valence,\"Valence\");\n data1.setColor(Color.BLUE);\n data1.setDrawCircles(false);\n data2.setColor(Color.YELLOW);\n data2.setDrawCircles(false);\n data3.setColor(Color.GRAY);\n data3.setDrawCircles(false);\n data4.setColor(Color.MAGENTA);\n data4.setDrawCircles(false);\n data5.setColor(Color.GREEN);\n data5.setDrawCircles(false);\n\n\n dataSets.add(data1);\n dataSets.add(data2);\n dataSets.add(data3);\n dataSets.add(data4);\n dataSets.add(data5);\n }", "public CreateLineCanvas(CanvasApp canvasApp) {\n\t\tthis.cmdAppliedCanvas=canvasApp;\n\t}", "public void onClick(View v) {\n checkFields();\n generateChart();\n }", "private void setupChart(LineChart chart, LineData data, int color) {\n chart.setData(data);\n\n // get the legend (only possible after setting data)\n // Legend l = chart.getLegend();\n // l.setEnabled(false);\n // chart.getAxisLeft().setEnabled(true);\n // chart.getAxisLeft().setDrawLabels(true);\n // chart.getAxisRight().setEnabled(true);\n // chart.getAxisRight().setDrawLabels(true);\n // chart.getAxisLeft().setSpaceTop(40);\n // chart.getAxisLeft().setSpaceBottom(40);\n /* chart.getAxisLeft().setLabelCount(10,true);\n chart.getAxisRight().setEnabled(false);\n chart.getXAxis().setEnabled(true);\n chart.getXAxis().setDrawAxisLine(true);\n chart.getXAxis().setDrawLabels(true);\n chart.getXAxis().setLabelCount(10,true);*/\n // animate calls invalidate()...\n // chart.animateX(2500);\n lpg_fragment.MyMarkerView markerView = new lpg_fragment.MyMarkerView(getContext(),R.layout.aqimarker);\n chart.setMarkerView(markerView);\n chart.invalidate();\n }", "@Override\r\n public void onClick(View v) {\n Intent intent = new Intent(getActivity(), SimpleXYPlotActivity.class);\r\n startActivity(intent);\r\n }", "protected void onUpdateGraphPressed(View view) {\n int count = 0;\n gHistoricalPPM.removeAllSeries();\n if (spGraphType.getSelectedItem() == \"Virus\") {\n DataPoint[] dpArray = new DataPoint[selectedReport.getPrList().size()];\n for (PurityReport pr : selectedReport.getPrList()) {\n DataPoint dp = new DataPoint(pr.getMonthSubmitted(), pr.getVirusPPM());\n dpArray[count++] = dp;\n }\n LineGraphSeries<DataPoint> series = new LineGraphSeries<>(dpArray);\n gHistoricalPPM.addSeries(series);\n } else {\n DataPoint[] dpArray = new DataPoint[selectedReport.getPrList().size()];\n for (PurityReport pr : selectedReport.getPrList()) {\n DataPoint dp = new DataPoint(pr.getMonthSubmitted(), pr.getContaminantPPM());\n dpArray[count++] = dp;\n }\n LineGraphSeries<DataPoint> series = new LineGraphSeries<>(dpArray);\n gHistoricalPPM.addSeries(series);\n }\n gHistoricalPPM.getViewport().setMinX(1);\n gHistoricalPPM.getViewport().setMaxX(12);\n gHistoricalPPM.getViewport().setXAxisBoundsManual(true);\n }", "public LineGraph(final String title) {\n super(title);\n final CategoryDataset dataset = createSampleDataset();\n final JFreeChart chart = createChart(dataset);\n final ChartPanel chartPanel = new ChartPanel(chart);\n chartPanel.setPreferredSize(new Dimension(500, 270));\n setContentPane(chartPanel);\n }", "public void MakeStacked() {\n\t\tStackedButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetStackedAreaChartImage())));\n\t\tStackedButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Stacked Area Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(StackedButton);\n\t}", "public void MakeBubble() {\n\t\tBubbleButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetBubbleChartImage())));\n\t\tBubbleButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetColumns().length >= 3){\n\t\t\t\t\t\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\tGetHost().LeftPanelContent(new BubbleChart(\n\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\"Bubble Chart\", \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost()));\n\t\t\t\t\t}else {\n\t\t\t\t\t\tGetHost().LeftPanelContent(new BubbleChart(\n\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost()));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"You must have three columns selected to use this chart\", \n\t\t\t\t\t\"Bubble Chart Format\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BubbleButton);\n\t}", "public void addLineChartToComposite(String header,String Xaxis,String Yaxis){\r\n\t\tXYSeriesCollection xyDataset = getDataset();\r\n\t\t\r\n\t\tJFreeChart chart = ChartFactory.createXYLineChart(\r\n\t\t\t\theader,\r\n\t\t\t\tXaxis,\r\n\t\t\t\tYaxis,\r\n\t\t\t\txyDataset,\r\n\t\t\t\tPlotOrientation.VERTICAL, \r\n\t\t\t\ttrue, \r\n\t\t\t\ttrue, \r\n\t\t\t\tfalse);\r\n\t\t\r\n\t\taddChartToComposite(Xaxis, Yaxis, chart);\r\n\t}", "@NotifyChange(\"lineChartData\")\r\n\t@Command(\"charts$getLineBarData\")\r\n\tpublic void getLineBarData() {\r\n\t\tthis.lineChartData = new ArrayList<Collection<Integer>>();\r\n\t\tlineChartData.add(CalendarService.get().getCountEventsByYear(2016)\r\n\t\t\t\t.values());\r\n\t}", "@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)\n @Override\n public void onGlobalLayout() {\n\n lineChart.getViewTreeObserver().removeOnGlobalLayoutListener(this);\n\n /**An offset is used to calculate linear graph translation\n * along X and Y directions\n * */\n int offset = (lineChart.getHeight() - lineChart.getWidth()) / 2;\n\n FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) lineChart.getLayoutParams();\n layoutParams.width = lineChart.getHeight();\n layoutParams.height = lineChart.getWidth();\n\n /**The linechart layout parameters are converted to a frame.\n * Specifically, the width and height of the lineChart are reset\n * to dimensions that can create a FrameLayout*/\n lineChart.setLayoutParams(layoutParams);\n\n lineChart.setTranslationX(-offset);\n\n lineChart.setTranslationY(offset);\n ChartType chartType = Enum.valueOf(ChartType.class, chart_type);\n initLineChart(frag_type, chartType);\n// initLineChart(graph_type,device_id, axis_type);\n }", "private void constructChartPanel() {\n chartPanel = new JPanel();\n chartPanel.setBorder(BorderFactory.createTitledBorder(\"Price Chart\"));\n chartPanel.setPreferredSize(relativeSize(0.4f, 0.35f));\n \n displayChartButton = new JButton(\"Click to Display Price Chart\");\n displayChartButton.setEnabled(false);\n displayChartButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n JPanel cPanel = chart.getChartPanel();\n chartPanel.removeAll();\n chartPanel.add(cPanel);\n cPanel.setPreferredSize(relativeSize(0.4f, 0.35f));\n \n pack();\n repaint();\n }\n });\n \n chartPanel.add(displayChartButton);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_statistics_month, container, false);\n\n// create dbsteps instance\n dbSteps = new DBSteps(getActivity());\n\n// creating linechart\n lineChart = rootView.findViewById(R.id.line_chart);\n// creating barchart object to manipulate instance in the layout\n ArrayList<Entry> lineEntries = new ArrayList<Entry>();\n int iterator = 0;\n for (int steps : dbSteps.getDataWholeMonth()) {\n lineEntries.add(new Entry(iterator, steps));\n iterator++;\n }\n\n lineChart.getXAxis().setDrawGridLines(false);\n lineChart.getAxisLeft().setEnabled(false);\n lineChart.getAxisRight().setEnabled(false);\n lineChart.getDescription().setEnabled(false);\n\n\n LineDataSet lineDataSet = new LineDataSet(lineEntries, \"Month Steps\");\n lineDataSet.setAxisDependency(YAxis.AxisDependency.LEFT);\n lineDataSet.setHighlightEnabled(true);\n lineDataSet.setLineWidth(2);\n// lineDataSet.setColor(getActivity().getColor(\"defaultBlue\"));\n// lineDataSet.setCircleColor(getActivity().getColor(\"defaultOrange\"));\n// lineDataSet.setCircleRadius(6);\n// lineDataSet.setCircleHoleRadius(3);\n lineDataSet.setDrawHighlightIndicators(true);\n lineDataSet.setHighLightColor(Color.RED);\n lineDataSet.setDrawValues(false);\n lineDataSet.setValueTextSize(12);\n// lineDataSet.setValueTextColor(getActivity().getColor(\"primaryDark\"));\n\n LineData lineData = new LineData(lineDataSet);\n\n// lineChart.getDescription().setText(\"Price in last 12 days\");\n// lineChart.getDescription().setTextSize(12);\n// lineChart.setDrawMarkers(true);\n// lineChart.setMarker(markerView(context));\n// lineChart.getAxisLeft().addLimitLine(lowerLimitLine(2,\"Lower Limit\",2,12,getColor(\"defaultOrange\"),getColor(\"defaultOrange\")));\n// lineChart.getAxisLeft().addLimitLine(upperLimitLine(5,\"Upper Limit\",2,12,getColor(\"defaultGreen\"),getColor(\"defaultGreen\")));\n// lineChart.getXAxis().setPosition(XAxis.XAxisPosition.BOTH_SIDED);\n lineChart.animateY(1000);\n// lineChart.getXAxis().setGranularityEnabled(true);\n// lineChart.getXAxis().setGranularity(1.0f);\n// lineChart.getXAxis().setLabelCount(lineDataSet.getEntryCount());\n lineChart.setData(lineData);\n\n// create pie chart\n PieChart pieChart = (PieChart) rootView.findViewById(R.id.week_piechart);\n ArrayList<PieEntry> pieEntries = new ArrayList<>();\n pieEntries.add(new PieEntry(4f, 0));\n pieEntries.add(new PieEntry(12f, 0));\n pieEntries.add(new PieEntry(2f, 0));\n pieEntries.add(new PieEntry(8f, 0));\n\n PieDataSet pieDataSet = new PieDataSet(pieEntries, \"Activites\");\n pieDataSet.setColors(getResources().getColor(R.color.blue_pie), getResources().getColor(R.color.yellow_pie), getResources().getColor(R.color.red_pie), getResources().getColor(R.color.green_pie));\n PieData pieData = new PieData(pieDataSet);\n pieChart.setData(pieData);\n pieChart.setCenterText(\"Activities\");\n return rootView;\n }", "private void setGraphDataAndStyle() {\n graphView.addSeries(new LineGraphSeries(getSeriesData()));\n graphView.setTitle(\"配速\");\n graphView.getGridLabelRenderer().setLabelFormatter(new DateAxisLabelFormatter(getActivity()));\n graphView.getGridLabelRenderer().setNumVerticalLabels(locations.size());\n graphView.getViewport().setMinX(locations.get(0).getTime());\n graphView.getViewport().setMaxX(locations.get(locations.size()-1).getTime());\n graphView.getViewport().setXAxisBoundsManual(true);\n\n }", "public lineas() {\n initComponents();\n \n }", "public void onClick(View v) {\n\t \t\t\tSeriesSelection seriesSelection = mChartView.getCurrentSeriesAndPoint();\n\t \t\t\tif (seriesSelection == null) {\n\t \t\t\t\tToast.makeText(XYChartActivity.this, \"No chart element\", Toast.LENGTH_SHORT).show();\n\t \t\t\t} else {\n\t \t\t\t\t// display information of the clicked point\n\t \t\t\t\tToast.makeText(\n\t \t\t\t\t\t\tXYChartActivity.this,\n\t \t\t\t\t\t\t\"Chart element in series index \" + seriesSelection.getSeriesIndex()\n\t \t\t\t\t\t\t+ \" data point index \" + seriesSelection.getPointIndex() + \" was clicked\"\n\t \t\t\t\t\t\t+ \" closest point value X=\" + seriesSelection.getXValue() + \", Y=\"\n\t \t\t\t\t\t\t+ seriesSelection.getValue(), Toast.LENGTH_SHORT).show();\n\t \t\t\t}\n\t \t\t}", "public Parent createLineGraph(ObservableList<HappinessReport> data) {\n xAxis = new CategoryAxis();\n xAxis.setLabel(\"Country\");\n //Yaxis Creation\n yAxis = new NumberAxis();\n yAxis.setLabel(\"Life Expectancy (Years)\");\n //Chart Creation\n linechart = new LineChart<>(xAxis, yAxis);\n linechart.setTitle(\"Linechart\");\n //Country and Score Data load into chart\n for (int intx = 0; intx < data.size(); intx++) {\n XYChart.Series LineChartSeries = new XYChart.Series<>();\n LineChartSeries.getData().add(new XYChart.Data(String.valueOf(data.get(intx).getCountry()), data.get(intx).getExpectancy()));\n linechart.getData().add(LineChartSeries);\n }\n linechart.setTitle(\"Horizontal Bar Chart Example\");\n linechart.setVerticalGridLinesVisible(false);\n linechart.setLegendVisible(false);\n return linechart;\n }", "@FXML \n\tprivate void handleTriButtonCH0() throws Exception {\n\t\tif(triButtonCH0.isSelected()){\n\t\t\t//draw the chart\n\t\t\tdutyFieldCH0.setDisable(true);\n\t\t\tchartDrawer.drawTri();\n\t\t}\n\t\telse{\n\t\t\t//clear the chart\n\t\t\tdutyFieldCH0.setDisable(false);\n\t\t\tchartDrawer.clear();\n\t\t}\n\t}", "public void createChart(StatisticPreviewChartViewModel statistic, Chart chart){\n\t chart.getTitle().setText(mainUser.getUsername());\r\n\t chart.getAxisSet().getXAxis(0).getTitle().setText(\"Dzień\");\r\n\t chart.getAxisSet().getYAxis(0).getTitle().setText(\"Kwoty\");\r\n\t // create scatter series\r\n\t ILineSeries series = (ILineSeries) chart.getSeriesSet().createSeries(SeriesType.LINE, \"Wartość\");\r\n\t series.setLineStyle(LineStyle.SOLID);\r\n\r\n\t Date[] days = statistic.getDays().stream().toArray(Date[]::new);\r\n\t series.setYSeries(statistic.getPrices());\r\n\t series.setXDateSeries(days); // xSeries is an array of java.util.Date\r\n\t IAxisTick xTick = chart.getAxisSet().getXAxis(0).getTick();\r\n\t \r\n\t IAxis yAxis = chart.getAxisSet().getYAxis(0);\r\n\t yAxis.adjustRange();\r\n\t \r\n\t yAxis.scrollUp();\r\n\t yAxis.scrollDown();\r\n\t Color color = new Color(Display.getDefault(), 255, 0, 0);\r\n\t series.setSymbolColor(color);\r\n\t \r\n\r\n\t DateFormat format = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n\t xTick.setFormat(format);\r\n\t \r\n\t \r\n\t // adjust the axis range\r\n\t chart.getAxisSet().adjustRange();\r\n\t \r\n\t chart.getParent().layout();\r\n\t comp.getParent().layout();\r\n\t \r\n\r\n\t comp.getParent().layout();\r\n\t chart.setVisible(true);\r\n\t}", "public static void main(String[] args) {\n showChart(createLineChart(), \"LineChartExample\");\n }", "private void getChartPoints(ArrayList<Map<String,Object>> result) {\n lineChart = (LineChart) findViewById(R.id.temperature_chart);\n\n chartPoints = new ArrayList<>();\n chartXLabels = new ArrayList<>();\n\n for (int i = result.size()-1; i >=0; i--) {\n chartPoints.add(new Entry((float) ((double)result.get(i).get(\"CurrentTemp\")), result.size()-1-i));\n chartXLabels.add(result.get(i).get(\"Time\").toString());\n }\n\n LineDataSet dataSet = new LineDataSet(chartPoints, getResources().getString(R.string.temperature_screen_chartLineLabel));\n dataSet.setAxisDependency(YAxis.AxisDependency.LEFT);\n dataSet.setColor(R.color.temperature_chart_line_color);\n dataSet.setCircleColor(R.color.temperature_chart_circle_color);\n\n LineData data = new LineData(chartXLabels, dataSet);\n lineChart.setData(data);\n\n //Chart interaction settings\n lineChart.setTouchEnabled(true);\n\n //Chart layout settings\n lineChart.setDrawGridBackground(false);\n lineChart.setBackgroundColor(getResources().getColor(R.color.temperature_chart_background_color));\n\n lineChart.getXAxis().setEnabled(true);\n lineChart.getXAxis().setDrawGridLines(true);\n lineChart.getXAxis().setTextColor(getResources().getColor(R.color.temperature_chart_XLabels_color));\n lineChart.getXAxis().setGridColor(getResources().getColor(R.color.temperature_chart_XGrid_color));\n lineChart.getXAxis().setAxisLineColor(getResources().getColor(R.color.temperature_chart_XAxis_color));\n lineChart.getXAxis().setTextSize(getResources().getDimensionPixelSize(R.dimen.temperature_chart_XAxis_labels_dimension));\n lineChart.getXAxis().setGridLineWidth(getResources().getDimension(R.dimen.temperature_chart_XAxis_GridWidth_dimension));\n lineChart.getXAxis().setAxisLineWidth(getResources().getDimension(R.dimen.temperature_chart_XAxis_AxisWidth_dimension));\n lineChart.getAxisLeft().setEnabled(true);\n lineChart.getAxisLeft().setDrawGridLines(true);\n lineChart.getAxisLeft().setTextColor(getResources().getColor(R.color.temperature_chart_YLabels_color));\n lineChart.getAxisLeft().setGridColor(getResources().getColor(R.color.temperature_chart_YGrid_color));\n lineChart.getAxisLeft().setAxisLineColor(getResources().getColor(R.color.temperature_chart_YAxis_color));\n lineChart.getAxisLeft().setTextSize(getResources().getDimensionPixelSize(R.dimen.temperature_chart_YAxis_labels_dimension));\n lineChart.getAxisLeft().setGridLineWidth(getResources().getDimension(R.dimen.temperature_chart_YAxis_GridWidth_dimension));\n lineChart.getAxisLeft().setAxisLineWidth(getResources().getDimension(R.dimen.temperature_chart_YAxis_AxisWidth_dimension));\n lineChart.getAxisRight().setEnabled(false);\n\n LimitLine minLimit = new LimitLine((float) minTemp, getResources().getString(R.string.temperature_screen_chartMinLimit));\n minLimit.setLineColor(getResources().getColor(R.color.temperature_chart_minLimit_color));\n minLimit.setTextColor(getResources().getColor(R.color.temperature_chart_minLimit_label_color));\n minLimit.setLineWidth(getResources().getDimensionPixelSize(R.dimen.temperature_chart_minLimit_width_dimension));\n minLimit.setTextSize(getResources().getDimensionPixelSize(R.dimen.temperature_chart_minLimit_label_dimension));\n LimitLine maxLimit=new LimitLine((float) maxTemp,getResources().getString(R.string.temperature_screen_chartMaxLimit));\n maxLimit.setLineColor(getResources().getColor(R.color.temperature_chart_maxLimit_color));\n maxLimit.setTextColor(getResources().getColor(R.color.temperature_chart_maxLimit_label_color));\n maxLimit.setLineWidth(getResources().getDimensionPixelSize(R.dimen.temperature_chart_maxLimit_width_dimension));\n maxLimit.setTextSize(getResources().getDimensionPixelSize(R.dimen.temperature_chart_maxLimit_label_dimension));\n lineChart.getAxisLeft().addLimitLine(minLimit);\n lineChart.getAxisLeft().addLimitLine(maxLimit);\n\n //Refreshes chart\n lineChart.invalidate();\n\n //Gets the most recent temperature registered\n TextView currentTempTextView = (TextView)findViewById(R.id.temperature_currentTemp_TextView);\n currentTemp=chartPoints.get(chartPoints.size()-1).getVal();\n currentTempTextView.setText(Float.toString(currentTemp)+\"ºC\");\n\n //Gets the higher and lower temperatures registered\n float higherTemp=-900;\n float lowerTemp=900;\n for (Entry entry:chartPoints)\n {\n if(entry.getVal()>higherTemp)\n higherTemp=entry.getVal();\n if(entry.getVal()<lowerTemp)\n lowerTemp=entry.getVal();\n }\n TextView lowerTempTextView = (TextView)findViewById(R.id.temperature_minTemp2_TextView);\n lowerTempTextView.setText(Float.toString(lowerTemp)+\"ºC\");\n TextView higherTempTextView = (TextView)findViewById(R.id.temperature_maxTemp2_TextView);\n higherTempTextView.setText(Float.toString(higherTemp)+\"ºC\");\n }", "private void makeChart() {\n\n Log.d(\"Chart\",\"Start Chart\");\n\n ArrayList<Entry> speedList = new ArrayList<>();\n ArrayList<Entry> avgSpeedList = new ArrayList<>();\n ArrayList<Entry> avgAltList = new ArrayList<>();\n\n int numberOfValues = trackingList.size();\n\n //Fills the data in the Arrays Entry (xValue,yValue)\n for(int i = 0; i < numberOfValues;i++){\n float avgSpeed = (float)averageSpeed;\n float avgAlt = (float)averageAlt;\n float curSpeed = (float)trackingList.get(i).getSpeed();\n\n Log.d(\"Chart\",\"CurSpeed: \" +curSpeed);\n\n avgSpeedList.add(new Entry(i*3,avgSpeed));\n speedList.add(new Entry(i*3,curSpeed));\n avgAltList.add(new Entry(i*3,avgAlt));\n }\n\n ArrayList<String> xAXES = new ArrayList<>();\n\n\n String[] xaxes = new String[xAXES.size()];\n for(int i=0; i<xAXES.size();i++){\n xaxes[i] = xAXES.get(i);\n }\n\n // More than one Array (Line in the Graph)\n ArrayList<ILineDataSet> lineDataSets = new ArrayList<>();\n\n //Speed Graph setup\n LineDataSet lineDataSet1 = new LineDataSet(speedList,\"Speed\");\n lineDataSet1.setDrawCircles(false);\n lineDataSet1.setColor(Color.BLUE);\n lineDataSet1.setLineWidth(2);\n\n //AvgSpeed setup\n LineDataSet lineDataSet2 = new LineDataSet(avgSpeedList,\"AvgSpeedLine\");\n lineDataSet2.setDrawCircles(false);\n lineDataSet2.setColor(Color.RED);\n lineDataSet2.setLineWidth(3);\n\n //AvgAlt setup\n LineDataSet lineDataSet3 = new LineDataSet(avgAltList,\"AvgAltLine\");\n lineDataSet3.setDrawCircles(false);\n lineDataSet3.setColor(Color.MAGENTA);\n lineDataSet3.setLineWidth(3);\n\n //Add them to the List\n lineDataSets.add(lineDataSet1);\n lineDataSets.add(lineDataSet2);\n lineDataSets.add(lineDataSet3);\n\n //setup for the xAxis\n XAxis xAxis = lineChart.getXAxis();\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n\n //Puts the data in the Graph\n lineChart.setData(new LineData(lineDataSets));\n lineChart.setVisibleXRangeMaximum(65f);\n\n //Chart description\n lineChart.getDescription().setText(\"All Speed\");\n\n //Shows timer information when clicked\n lineChart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getApplicationContext(), \"Its measured every 3 seconds\",Toast.LENGTH_LONG).show();\n }\n });\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n panelChart = new javax.swing.JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jButton1.setText(\"Balansas\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n panelChart.setBackground(new java.awt.Color(255, 255, 255));\n panelChart.setLayout(new java.awt.BorderLayout());\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelChart, javax.swing.GroupLayout.DEFAULT_SIZE, 686, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGap(306, 306, 306)\n .addComponent(jButton1)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(panelChart, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addContainerGap())\n );\n\n pack();\n }", "private void initializeChart(final List<DateCounter> data)\n {\n final XYSeries series = new XYSeries(TITLE_XY_SERIES);\n\n //Adding data to the chart\n addDataToXYSeries(data, series);\n\n //Finalizing the chart\n final XYSeriesCollection coll = new XYSeriesCollection(series);\n final JFreeChart chart = ChartFactory.createXYLineChart(TITLE_CHART, X_AXIS_TITLE,\n Y_AXIS_TITLE, coll, PlotOrientation.VERTICAL, true, true, false);\n final ChartPanel chartPanel = new ChartPanel(chart);\n chartPanel.setPreferredSize(new java.awt.Dimension(SIZE_CHART_PANEL, SIZE_CHART_PANEL));\n this.add(chartPanel, BorderLayout.CENTER);\n }", "private void btn_stockMouseClicked(java.awt.event.MouseEvent evt) {\n \n }", "@FXML\n public void drawLPatternButtonPressed()\n {\n GraphicsContext gc = clearCanvasAndGetGraphicsContext();\n\n // loop to draw lines for each number of lines\n for(int i = 0; i <= lines; i++) {\n\n // draw L shape in bottom left\n gc.strokeLine(\n 0,\n (canvas.getHeight()/lines)*i,\n (canvas.getWidth()/lines)*i,\n canvas.getHeight()\n );\n\n }\n }", "@Override\n public void handle(ActionEvent event) {\n canvasState.changeLineColor(bordercolor.getValue());\n redrawCanvas();\n }", "private void showChart(LineChart mChart, LineData mLineData, int rgb) {\n\t\tmChart.setDrawBorders(false); // 是否在折线图上添加边框\n\t\tmChart.fitScreen();\n\t\t// no description text\n\t\tmChart.setDescription(\"\");// 数据描述\n\t\t// 如果没有数据的时候,会显示这个,类似listview的emtpyview\n\t\tmChart.setNoDataTextDescription(\"You need to provide data for the chart.\");\n\n\t\t// enable / disable grid background\n\t\tmChart.setDrawGridBackground(false); // 是否显示表格颜色\n\n\t\tmChart.getAxisLeft().setEnabled(false);\n\t\tmChart.getAxisRight().setEnabled(false);\n\t\tmChart.getAxisRight().setDrawGridLines(false);\n\t\tmChart.getAxisRight().setTextColor(R.color.transparent_background);\n\t\t\n\t\tmChart.getXAxis().setPosition(XAxisPosition.BOTTOM); // 让x轴在下面\n\t\tmChart.getXAxis().setTextColor(Color.WHITE);\n\t\tmChart.getXAxis().setDrawAxisLine(false);\n\t\tmChart.getXAxis().setDrawGridLines(false);\n\t\t\n\n\t\t\n\t\tmChart.animateX(2500, Easing.EasingOption.EaseInOutQuart);\n\n\t \n\t\tmChart.getLegend().setEnabled(false);\n\t\t\n\t\tmChart.setData(mLineData);\n\n\t}", "private static JFreeChart createChart(XYDataset dataset) {\n\n chart = ChartFactory.createTimeSeriesChart(\n \"Stromzählerübersicht\", // Titel\n \"Datum\", // x-Achse label\n \"kWh\", // y-Achse label\n dataset);\n\n chart.setBackgroundPaint(Color.WHITE);\n\n XYPlot plot = (XYPlot) chart.getPlot();\n plot.setBackgroundPaint(Color.LIGHT_GRAY);\n plot.setDomainGridlinePaint(Color.WHITE);\n plot.setRangeGridlinePaint(Color.WHITE);\n plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));\n plot.setDomainCrosshairVisible(true);\n plot.setRangeCrosshairVisible(true);\n\n XYItemRenderer r = plot.getRenderer();\n if (r instanceof XYLineAndShapeRenderer) {\n XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) r;\n renderer.setDefaultShapesVisible(false);\n renderer.setDefaultShapesFilled(false);\n renderer.setDrawSeriesLineAsPath(true);\n }\n\n DateAxis axis = (DateAxis) plot.getDomainAxis();\n axis.setDateFormatOverride(new SimpleDateFormat(\"dd-MM-yyyy\"));\n\n return chart;\n\n }", "private void lineColor() {\n\n\t}", "public void AddNewGraph() {\n EQNum++;\n LineGraph line = new LineGraph();\n JButton GraphButton = new JButton(\"Graph\");\n JButton MakeRoot = new JButton(\"Bring To Top\");\n JTextField Eqinput = new JTextField();\n Eqinput.setPreferredSize(new Dimension(300, 20));\n JPanel EqPanel = new JPanel();\n EqPanel.add(new JLabel(\"f(x) =\"));\n EqPanel.add(Eqinput);\n GraphActionListener g = new GraphActionListener(this, Eqinput);\n Eqinput.addActionListener(g);\n Eqinput.setActionCommand(\"Graph\");\n EqPanel.add(GraphButton);\n EqPanel.add(MakeRoot);\n GraphButton.addActionListener(g);\n MakeRoot.addActionListener(g);\n EquationCardLayout.add(EqPanel, Integer.toString(EQNum));\n CardLayout c = (CardLayout) EquationCardLayout.getLayout();\n c.show(EquationCardLayout, Integer.toString(EQNum));\n EquationNum.setModel(new SpinnerNumberModel(EQNum, 1, EQNum, 1));\n lineGraphs.add(line);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawType = 1;\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawType = 2;\n\t\t\t}", "private JPanel createChartPanel(XYSeriesCollection li) {\n\n String chartTitle = \" Movement Chart\";\n String xAxisLabel = \"Matrix Size\";\n String yAxisLabel = \"time in ms\";\n\n XYSeriesCollection dataset = li;\n // System.out.println(\"tesst count \" + dataset.getSeriesCount());\n\n //XYDataset dataset = createDataset(li);\n JFreeChart chart = ChartFactory.createXYLineChart(chartTitle, xAxisLabel, yAxisLabel, dataset);\n XYPlot plot = chart.getXYPlot();\n XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();\n plot.setRenderer(renderer);\n\n return new ChartPanel(chart);\n }", "@Override\n public void lineTo(double x, double y) {\n graphicsEnvironmentImpl.lineTo(canvas, x, y);\n }", "@FXML\r\n protected void linechartStage() throws IOException {\r\n LineChartStage s\r\n = new LineChartStage(MainStage.getSclAnalysisFile());\r\n s.createStage();\r\n }", "private void addGraphButton() {\n\t\tgraphButton = new JButton(\"Graph\");\n\t\tadd (graphButton, SOUTH);\n\t\tgraphButton.addActionListener(this);\n\t}", "public void plotData(boolean appendingData, boolean mean) {\n\n // Add data to existing plaot if appending.\n if (appendingData && chartpanel != null) {\n appendData();\n } else {\n String xaxisname = \"Plane\";\n // Create an chart empty.\n if (mean) {\n xaxisname = \"Length\";\n }\n final JFreeChart chart = createChart(xaxisname);\n chart.setBackgroundPaint(Color.WHITE); //DJ: 09/22/2014\n\n // Get the data.\n if (mean) {\n data = getLineDataset();\n } else {\n data = getDataset();\n }\n\n // Apply data to the plot\n MimsXYPlot xyplot = (MimsXYPlot) chart.getPlot();\n\n xyplot.setBackgroundPaint(Color.WHITE); //DJ: 09/22/2014\n\n xyplot.setDataset(data);\n xyplot.setRois(rois);\n xyplot.setParent(this);\n\n //DJ 09/22/2014\n final int numberOfSeries = xyplot.getSeriesCount();\n //System.out.println(\"number-of-series = \" + numberOfSeries);\n\n /*\n System.out.println(\"range up limit = \" + xyplot.getRangeAxis().getRange().getUpperBound());\n System.out.println(\"range down limit = \" + xyplot.getRangeAxis().getRange().getLowerBound());\n System.out.println(\"domain up limit = \" + xyplot.getDomainAxis().getRange().getUpperBound());\n System.out.println(\"domain down limit = \" + xyplot.getDomainAxis().getRange().getLowerBound());\n */\n // Generate the layout.\n //chartpanel = new MimsChartPanel(chart);\n chartpanel = new MimsChartPanel(chart);\n chartpanel.addMouseListener(this);\n chartpanel.setPreferredSize(new java.awt.Dimension(600, 400));\n String lastFolder = ui.getLastFolder();\n if (lastFolder != null) {\n if (new File(lastFolder).exists()) {\n chartpanel.setDefaultDirectoryForSaveAs(new File(lastFolder));\n }\n }\n this.add(chartpanel);\n\n chartpanel.setNumberOfSeries(numberOfSeries);\n\n // DJ: 09/22/2014\n // Add menu item for thikining or the plot lines\n // increase lines thikness\n JMenuItem incresaseLinesThikness = new JMenuItem(\"Increase Lines Thickness\");\n incresaseLinesThikness.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n //DJ\n\n lineThikness = chartpanel.getLineThikness();\n\n if (chartpanel.setLineThikness(lineThikness + 0.5f)) {\n lineThikness = chartpanel.getLineThikness();\n //if (lineThikness + 1.0f <= maxThikness) {\n // lineThikness += 1.0f;\n\n BasicStroke stroke = new BasicStroke(lineThikness);\n Plot plot = chart.getXYPlot();\n\n if (plot instanceof CategoryPlot) {\n CategoryPlot categoryPlot = chart.getCategoryPlot();\n CategoryItemRenderer cir = categoryPlot.getRenderer();\n try {\n for (int i = 0; i < numberOfSeries; i++) {\n cir.setSeriesStroke(i, stroke); //series line style\n }\n } catch (Exception ex) {\n System.err.println(ex);\n }\n } else if (plot instanceof XYPlot) {\n\n XYPlot xyPlot = chart.getXYPlot();\n XYItemRenderer xyir = xyPlot.getRenderer();\n try {\n for (int i = 0; i < numberOfSeries; i++) {\n xyir.setSeriesStroke(i, stroke); //series line style\n }\n } catch (Exception ex) {\n System.err.println(ex);\n }\n }\n }\n }\n });\n\n // increase lines thikness\n JMenuItem decreaseLinesThikness = new JMenuItem(\"Decrease Lines Thickness\");\n decreaseLinesThikness.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n //DJ\n lineThikness = chartpanel.getLineThikness();\n\n if (chartpanel.setLineThikness(lineThikness - 0.5f)) {\n lineThikness = chartpanel.getLineThikness();\n //if (lineThikness - 1.0f >= minThikness) {\n // lineThikness -= 1.0f;\n\n BasicStroke stroke = new BasicStroke(lineThikness);\n Plot plot = chart.getXYPlot();\n\n if (plot instanceof CategoryPlot) {\n CategoryPlot categoryPlot = chart.getCategoryPlot();\n CategoryItemRenderer cir = categoryPlot.getRenderer();\n try {\n for (int i = 0; i < numberOfSeries; i++) {\n cir.setSeriesStroke(i, stroke); //series line style\n }\n } catch (Exception ex) {\n System.err.println(ex);\n }\n } else if (plot instanceof XYPlot) {\n\n XYPlot xyPlot = chart.getXYPlot();\n XYItemRenderer xyir = xyPlot.getRenderer();\n try {\n for (int i = 0; i < numberOfSeries; i++) {\n xyir.setSeriesStroke(i, stroke); //series line style\n }\n } catch (Exception ex) {\n System.err.println(ex);\n }\n }\n }\n }\n });\n\n chartpanel.getPopupMenu().addSeparator();\n chartpanel.getPopupMenu().add(incresaseLinesThikness);\n chartpanel.getPopupMenu().add(decreaseLinesThikness);\n\n JMenu changePlotColor = new JMenu(\"Change Plot Color\");\n final JMenuItem black = new JMenuItem(\"BLACK\");\n final JMenuItem blue = new JMenuItem(\"BLUE\");\n final JMenuItem grey = new JMenuItem(\"GRAY\");\n final JMenuItem green = new JMenuItem(\"GREEN\");\n final JMenuItem red = new JMenuItem(\"RED\");\n final JMenuItem yellow = new JMenuItem(\"YELLOW\");\n final JMenuItem purple = new JMenuItem(\"PURPLE\");\n final JMenuItem brown = new JMenuItem(\"BROWN\");\n final JMenuItem orange = new JMenuItem(\"ORANGE\");\n final JMenuItem darkGreen = new JMenuItem(\"DARK GREEN\");\n final JMenuItem lightBlue = new JMenuItem(\"LIGHT BLUE\");\n\n black.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(black.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 97, 'a');\n chartpanel.keyPressed(ev);\n }\n });\n blue.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(blue.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 98, 'b');\n chartpanel.keyPressed(ev);\n }\n });\n grey.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(grey.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 101, 'e');\n chartpanel.keyPressed(ev);\n }\n });\n green.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(green.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 103, 'g');\n chartpanel.keyPressed(ev);\n }\n });\n red.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(red.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 114, 'r');\n chartpanel.keyPressed(ev);\n }\n });\n yellow.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(yellow.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 121, 'y');\n chartpanel.keyPressed(ev);\n }\n });\n purple.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(purple.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 112, 'p');\n chartpanel.keyPressed(ev);\n }\n });\n brown.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(brown.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 119, 'w');\n chartpanel.keyPressed(ev);\n }\n });\n orange.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(orange.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 111, 'o');\n chartpanel.keyPressed(ev);\n }\n });\n darkGreen.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(darkGreen.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 100, 'd');\n chartpanel.keyPressed(ev);\n }\n });\n lightBlue.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(lightBlue.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 108, 'l');\n chartpanel.keyPressed(ev);\n }\n });\n\n changePlotColor.add(black);\n changePlotColor.add(blue);\n changePlotColor.add(grey);\n changePlotColor.add(green);\n changePlotColor.add(red);\n changePlotColor.add(yellow);\n changePlotColor.add(purple);\n changePlotColor.add(brown);\n changePlotColor.add(orange);\n changePlotColor.add(darkGreen);\n changePlotColor.add(lightBlue);\n\n chartpanel.getPopupMenu().add(changePlotColor);\n\n // Add menu item for showing/hiding crosshairs.\n JMenuItem xhairs = new JMenuItem(\"Show/Hide Crosshairs\");\n xhairs.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n showHideCrossHairs(chartpanel);\n }\n });\n chartpanel.getPopupMenu().addSeparator();\n chartpanel.getPopupMenu().add(xhairs);\n // Add menu item for showing/hiding crosshairs.\n JMenuItem pointhairs = new JMenuItem(\"Add point roi at crosshairs\");\n pointhairs.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n if (pointX > 0 && pointY > 0) {\n ui.getRoiManager().add(new PointRoi(pointX, pointY));\n ui.updateAllImages();\n }\n }\n });\n chartpanel.getPopupMenu().add(pointhairs);\n // Add menu item for toggling between linear and log scales.\n JMenuItem logscale = new JMenuItem(\"Log/Linear scale\");\n logscale.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n MimsJFreeChart.logLinScale(chartpanel);\n }\n });\n chartpanel.getPopupMenu().add(logscale);\n\n // Add menu item for exporting plot to report.\n /*JMenuItem genreport = new JMenuItem(\"Generate Report\");\n genreport.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n generateReport();\n }\n });\n chartpanel.getPopupMenu().add(genreport);*/\n JMenuItem libreoffice = new JMenuItem(\"Add to Libreoffice\");\n libreoffice.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mimsUno.insertGraph(getImage(), \"test\", \"test\", \"test\");\n }\n });\n chartpanel.getPopupMenu().add(libreoffice);\n\n // Replace Save As... menu item.\n chartpanel.getPopupMenu().remove(3);\n JMenuItem saveas = new JMenuItem(\"Save as...\");\n saveas.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n saveAs();\n }\n });\n chartpanel.getPopupMenu().add(saveas, 3);\n\n // Add an option for getting the underlying data\n JMenuItem asTextMenuItem = new javax.swing.JMenuItem(\"Display text\");\n asTextMenuItem.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n displayProfileData();\n }\n });\n chartpanel.getPopupMenu().add(asTextMenuItem, 2);\n\n // Add key listener.\n KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new KeyEventDispatcher() {\n public boolean dispatchKeyEvent(KeyEvent e) {\n if (e.getID() == KeyEvent.KEY_PRESSED && thisHasFocus()) {\n chartpanel.keyPressed(e);\n }\n return false;\n }\n });\n\n pack();\n setVisible(true);\n\n }\n }", "@Override\n public void setLineColor(int linen, Color color) {\n assemblyView.setLineColor(linen, color);\n }", "@FXML \n\tprivate void handleSerraButtonCH0() throws Exception {\n\t\tif(serraButtonCH0.isSelected()){\n\t\t\t//draw the chart\n\t\t\tdutyFieldCH0.setDisable(true);\n\t\t\tchartDrawer.drawSerra();\n\t\t}\n\t\telse{\n\t\t\t//clear the chart\n\t\t\tdutyFieldCH0.setDisable(false);\n\t\t\tchartDrawer.clear();\n\t\t}\n\t}", "public void setLineData(ArrayList<Integer> allDay) {\r\n\r\n ArrayList<String> xVals = new ArrayList<String>();\r\n for (int i = 1; i <= 24; i++) {\r\n xVals.add((i) + \"\");\r\n }\r\n\r\n ArrayList<Entry> vals1 = new ArrayList<Entry>();\r\n\r\n for (int i = 1; i <= 24; i++) {\r\n vals1.add(new Entry(allDay.get(i-1), i));\r\n }\r\n Log.v(\"vals1\",vals1.toString());\r\n \t\r\n \t\r\n// \tint count = 45;\r\n// \tint range = 100; \r\n// \tArrayList<String> xVals = new ArrayList<String>();\r\n// for (int i = 0; i < count; i++) {\r\n// xVals.add((1990 +i) + \"\");\r\n// }\r\n//\r\n// ArrayList<Entry> vals1 = new ArrayList<Entry>();\r\n//\r\n// for (int i = 0; i < count; i++) {\r\n// float mult = (range + 1);\r\n// float val = (float) (Math.random() * mult) + 20;// + (float)\r\n// // ((mult *\r\n// // 0.1) / 10);\r\n// vals1.add(new Entry(val, i));\r\n// }\r\n// \r\n \t\r\n // create a dataset and give it a type\r\n LineDataSet set1 = new LineDataSet(vals1, \"DataSet 1\");\r\n set1.setDrawCubic(true);\r\n set1.setCubicIntensity(0.2f);\r\n set1.setDrawFilled(true);\r\n set1.setDrawCircles(false); \r\n set1.setLineWidth(2f);\r\n set1.setCircleSize(5f);\r\n set1.setHighLightColor(Color.rgb(244, 117, 117));\r\n set1.setColor(Color.rgb(104, 241, 175));\r\n\r\n ArrayList<LineDataSet> dataSets = new ArrayList<LineDataSet>();\r\n dataSets.add(set1);\r\n\r\n // create a data object with the datasets\r\n LineData data = new LineData(xVals, dataSets);\r\n\r\n // set data\r\n nChart.setData(data);\r\n }", "private void initialize() {\r\n\t\t//frame = new JFrame();\r\n\t\tframe.setSize(725, 482);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t//frame.getContentPane().setLayout(null);\r\n\t\t\r\n\t\t\r\n\t\tDefaultCategoryDataset dataset= new DefaultCategoryDataset();\r\n\t\t//JOptionPane.showMessageDialog(null, \"BUTTON CLICKED!!!\");\r\n\t\t//LableMessage.setText(\"BUTTON CLICKED!!!\");\r\n\t\t\r\n\t\t//Pain, Drowsiness, Nausea, Anxiety, and Depression\r\n\t\tdataset.setValue(2, \"day1\",\"Pain\");\r\n\t\tdataset.setValue(5, \"day2\",\"Pain\");\r\n\t\tdataset.setValue(4, \"day3\",\"Pain\");\r\n\t\tdataset.setValue(6, \"day1\", \"Drowsiness\");\r\n\t\tdataset.setValue(10, \"day2\", \"Drowsiness\");\r\n\t\tdataset.setValue(8, \"day3\", \"Drowsiness\");\r\n\t\tdataset.setValue(1, \"day1\", \"Nausea\");\r\n\t\tdataset.setValue(7, \"day2\", \"Nausea\");\r\n\t\tdataset.setValue(5, \"day3\", \"Nausea\");\r\n\t\tdataset.setValue(3,\"day1\",\"Anxiety\");\t\r\n\t\tdataset.setValue(8,\"day2\",\"Anxiety\");\r\n\t\tdataset.setValue(9,\"day3\",\"Anxiety\");\r\n\t\tdataset.setValue(8, \"day1\", \"Depression\");\r\n\t\tdataset.setValue(7, \"day2\", \"Depression\");\r\n\t\tdataset.setValue(9, \"day3\", \"Depression\");\r\n\t\tint test[] = new int[7];\r\n\t\tfor (int i=0;i<7; i++)\r\n\t\t{\r\n\t\t\ttest[i]=5;\r\n\t\t}\r\n\t\tDefaultCategoryDataset dataset2= new DefaultCategoryDataset();\r\n\t\t//dataset2 = dataSetInit(P1.getEnterSymptomLevel(),P1.getPreviousSymptomLevel1(),P1.getPreviousSymptomLevel2());\r\n\t\tdataset2 = dataSetInit(test,test,test);\r\n\t\t//P1.getEnter\r\n\t\t//DefaultCategoryDataset dataset2= new DefaultCategoryDataset();\r\n\r\n\t\t//JFreeChart chart= ChartFactory.createBarChart(P1.firstName+\" \"+P1.lastName,\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\r\n\t\tJFreeChart chart= ChartFactory.createBarChart3D(\"Symptom Report\",\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,true,true,true);\r\n\t\t//JFreeChart chart2= ChartFactory.createBarChart(\"Symptom Report\",\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\t\tchart.setBackgroundPaint(Color.lightGray);\r\n\t\t//JFreeChart chart2= ChartFactory.createBarChart(\"Grade Report\",\"Student Name\", \"Marks\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\t\t\r\n\t\tChartPanel chartPanel = new ChartPanel(chart);\r\n\t\tchartPanel.setPreferredSize(new Dimension(700,350));\r\n\t\tPan.add(chartPanel);\r\n\t\t\r\n\t\tframe.getContentPane().add(Pan);\r\n\t\tCategoryPlot p=chart.getCategoryPlot();\r\n\t\tp.setRangeGridlinePaint(Color.red);\r\n\t\tp.setBackgroundPaint(Color.WHITE);\r\n\t\tframe.setVisible(true);\r\n//\t\tChartFrame frame= new ChartFrame(\"Bar Graph Test\",chart,false);\r\n//\t\t\r\n//\t\tframe.setVisible(true);\r\n//\t\tframe.setSize(700,350);\r\n//\t\tframe.setResizable(false);\r\n\t\t//frame2 =new JFrame()\r\n\t}", "@Override\n public void onPolylineClick(Polyline polyline) {\n selectPolyline(polyline);\n }", "public void onOutputLineAdded(Window window, OutputLine line) {\n\t\t\t\n\t\t\tlinesLayout.addLine(line);\n\t\t}", "public static JFreeChart createChart(final CategoryDataset dataset) {\n \n // create the chart...\n final JFreeChart chart = ChartFactory.createLineChart(\n \"Line Chart\", // chart title\n \"Type\", // domain axis label\n \"Value\", // range axis label\n dataset, // data\n PlotOrientation.VERTICAL, // orientation\n true, // include legend\n true, // tooltips\n false // urls\n );\n\n // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...\n //final StandardLegend legend = (StandardLegend) chart.getLegend();\n //legend.setDisplaySeriesShapes(true);\n //legend.setShapeScaleX(1.5);\n //legend.setShapeScaleY(1.5);\n //legend.setDisplaySeriesLines(true);\n\n chart.setBackgroundPaint(Color.white);\n\n final CategoryPlot plot = (CategoryPlot) chart.getPlot();\n plot.setBackgroundPaint(Color.lightGray);\n plot.setRangeGridlinePaint(Color.white);\n\n // customise the range axis...\n final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();\n rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n rangeAxis.setAutoRangeIncludesZero(true);\n\n \n \n \n // customise the renderer...\n final LineAndShapeRenderer renderer = (LineAndShapeRenderer) plot.getRenderer();\n //renderer.setDrawShapes(true);\n\n renderer.setSeriesStroke(\n 0, new BasicStroke(\n 2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,\n 1.0f, new float[] {10.0f, 6.0f}, 0.0f\n )\n );\n renderer.setSeriesStroke(\n 1, new BasicStroke(\n 2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,\n 1.0f, new float[] {6.0f, 6.0f}, 0.0f\n )\n );\n renderer.setSeriesStroke(\n 2, new BasicStroke(\n 2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,\n 1.0f, new float[] {2.0f, 6.0f}, 0.0f\n )\n );\n // OPTIONAL CUSTOMISATION COMPLETED.\n \n return chart;\n }", "private void initialization(Stage primaryStage) throws Exception{\r\n\t\t\t//NumberAxis(lower limit, upper limit, interval)\r\n\t\t xAxis = new NumberAxis(0, MAX_DATA_POINTS, MAX_DATA_POINTS / 100);\r\n\t\t xAxis.setForceZeroInRange(false);\r\n\t\t xAxis.setAutoRanging(false);\r\n\t\t \r\n\t\t \r\n\t\t NumberAxis yAxis = new NumberAxis(0.3,0.5, 20);\r\n\t\t yAxis.setAutoRanging(false);\r\n\t\t\r\n\t\t final LineChart<Number, Number> sc = new LineChart<Number, Number>(xAxis, yAxis) {\r\n\t\t // Override to remove symbols on each data point \r\n\t\t @Override\r\n\t\t protected void dataItemAdded(Series<Number, Number> series, int itemIndex, Data<Number, Number> item) {\r\n\r\n\t\t }\r\n\t\t };\r\n\t\t sc.setAnimated(false);\r\n\t\t sc.setId(\"liveAreaChart\");\r\n\t\t sc.setTitle(\"RealTime Stock Chart\");\r\n\t\t series = new LineChart.Series<Number, Number>();\r\n\t\t series.setName(\"Area Chart Series\");\r\n\t\t sc.getData().add(series);\r\n\t\t primaryStage.setScene(new Scene(sc));\r\n\r\n\t}", "@VTID(10)\n @UseDefaultValues(paramIndexMapping = {9}, optParamIndex = {0, 1, 2, 3, 4, 5, 6, 7, 8}, javaType = {com.exceljava.com4j.excel.XlTrendlineType.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.Int32, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_I4, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {\"-4132\", \"80020004\", \"80020004\", \"80020004\", \"80020004\", \"80020004\", \"80020004\", \"80020004\", \"80020004\"})\n @ReturnValue(index=9)\n com.exceljava.com4j.excel.Trendline add();", "public void insertPriceChart(Vector priceChart) {\n try {\n chart = new PriceChart();\n chart.setSecurities(priceChart);\n java.awt.EventQueue.invokeLater(new Runnable() {\n\n public void run() {\n chartPanel.removeAll();\n chartPanel.add(displayChartButton);\n displayChartButton.setEnabled(true);\n chartPanel.repaint();\n }\n });\n /*\n Runnable doUpdate = new Runnable() {\n public void run() {\n chartPanel.removeAll();\n chartPanel.add(displayChartButton);\n displayChartButton.setEnabled(true);\n }\n };\n SwingUtilities.invokeAndWait(doUpdate);\n * */\n }catch(Exception e) {\n e.printStackTrace();\n }\n }", "public void addPolyLine() {\n abstractEditor.drawNewShape(new ELineDT());\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tString command = e.getActionCommand();\n\t\t\tSystem.out.println(command);\n\t\t\tif (command.equals(BEFORE_DATA_COMMAND)) {\n\t\t\t\tdoImportBeforeData();\n\t\t\t} else if (command.equals(AFTER_DATA_COMMAND)) {\n\t\t\t\tdoImportAfterData();\n\t\t\t} else if (command.equals(CANCEL_BEFORE_DATA_COMMAND)) {\n\t\t\t\tbeforeHeavyChart.chartPanel.restoreAutoBounds();\n//\t\t\t\tbeforeHeavyChart.deleteSeries(\"first\");\n\t\t\t\tbeforeHeavyChart.deleteSeries(\"second\");\n\t\t\t\tbeforeMouseHandle.xline = beforeMouseHandle.firstXline;\n\t\t\t\tbeforeMouseHandle.ifdoubleClick = false;\n\t\t\t\n\t\t\t} else if (command.equals(CANCEL_AFTER_DATA_COMMAND)) {\n\t\t\t\tafterHeavyChart.chartPanel.restoreAutoBounds();\n//\t\t\t\tbeforeHeavyChart.deleteSeries(\"first\");\n\t\t\t\tafterHeavyChart.deleteSeries(\"second\");\n\t\t\t\tafterMouseHandle.xline = afterMouseHandle.firstXline;\n\t\t\t\tafterMouseHandle.ifdoubleClick = false;\n\t\t\t\t\n\t\t\t}\n\t\t}", "private void drawGraph() {\n // you can show warning messages now\n imrGuiBean.showWarningMessages(true);\n addGraphPanel();\n setButtonsEnable(true);\n }", "public abstract void lineTo(double x, double y);", "public void onBtnGenerateClick() {\n taskSpan2s = dataManager.load(TaskSpan2.class)\n .query(\"select t from gantt_TaskSpan2 t\")\n .view(\"taskSpan2-view\")\n .list();\n // prepare the new dataProvider\n ListDataProvider dataProvider = new ListDataProvider();\n\n // fetch the list of -selected- taskSpan\n for (TaskSpan2 taskSpan2: taskSpan2s) {\n // 1. create the list to hold the dynSegments\n List<DynSegment> dynSegments = new ArrayList<>();\n\n // 2. get the list of attached segments\n List<Segment2> segment2s = taskSpan2.getSegments();\n\n // 3. fetch the list of Segments\n for (Segment2 segment2: segment2s) {\n System.out.println(segment2.getTask() + \" \" + segment2.getStart().compareTo(Objects.requireNonNull(dateFrom.getValue())));\n // filters on the dates\n if (\n (segment2.getStart().compareTo(Objects.requireNonNull(dateFrom.getValue())) >= 0)\n &&\n (segment2.getEnd().compareTo(Objects.requireNonNull(dateTo.getValue())) <= 0)\n ) {\n // 3.a create the new dynSegment\n DynSegment dynSegment = new DynSegment(\n segment2.getColor(),\n segment2.getTask(),\n segment2.getStart(),\n segment2.getEnd());\n // 3.b add the new dynSegment to the lis\n dynSegments.add(dynSegment);\n }\n }\n\n // 4. create the dynTaskSpan\n DynTaskSpan dynTaskSpan = new DynTaskSpan(\n taskSpan2.getCategory(),\n dynSegments);\n\n // 5. adds the new dynTaskSpan to the dataProvider\n dataProvider.addItem(new SimpleDataItem(dynTaskSpan));\n }\n\n // sets the dataProvider for the chart\n chart.setDataProvider(dataProvider);\n chart.repaint();\n }", "private void setData() {\n LineDataSet set1 = new LineDataSet(valuesTemperature, \"Temperature\");\n\n set1.setColor(Color.RED);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n LineData data = new LineData(set1);\n\n // set data\n chartTemperature.setData(data);\n\n // get the legend (only possible after setting data)\n Legend l = chartTemperature.getLegend();\n l.setEnabled(true);\n\n\n // create a dataset and give it a type\n set1 = new LineDataSet(valuesPressure, \"Pressure\");\n\n set1.setColor(Color.GREEN);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n data = new LineData(set1);\n\n // set data\n chartPressure.setData(data);\n\n // get the legend (only possible after setting data)\n l = chartPressure.getLegend();\n l.setEnabled(true);\n\n\n\n // create a dataset and give it a type\n set1 = new LineDataSet(valuesAltitude, \"Altitude\");\n\n set1.setColor(Color.BLUE);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n data = new LineData(set1);\n\n // set data\n chartAltitude.setData(data);\n\n // get the legend (only possible after setting data)\n l = chartAltitude.getLegend();\n l.setEnabled(true);\n }", "public void drawGraph(){\n this.post(new Runnable(){\n @Override\n public void run(){\n removeAllSeries();\n addSeries(xySeries);\n addSeries(currentPoint);\n //addSeries(currentPoint);\n }\n });\n }", "private Chart(){}", "@Override\r\n\tpublic void BuildLegLeft() {\n\t\tg.drawLine(60, 100, 45, 150);\r\n\t}" ]
[ "0.70307225", "0.647292", "0.64485735", "0.6385231", "0.63795716", "0.6362159", "0.63503826", "0.6338117", "0.63087004", "0.62872386", "0.627067", "0.62460715", "0.61921495", "0.61386216", "0.61225027", "0.6109019", "0.6036225", "0.60110694", "0.5986483", "0.5972759", "0.5968622", "0.58876884", "0.5872158", "0.586371", "0.585074", "0.5839012", "0.58243674", "0.5814", "0.57843614", "0.5754353", "0.57411814", "0.5740103", "0.573768", "0.57232916", "0.5722093", "0.5708737", "0.5707521", "0.5661775", "0.5655895", "0.5641239", "0.5631978", "0.562937", "0.562476", "0.56213605", "0.5596503", "0.55923617", "0.5589441", "0.55748004", "0.55663836", "0.5563221", "0.555853", "0.5520127", "0.55022573", "0.54831445", "0.5481535", "0.54798824", "0.5464866", "0.5458625", "0.5454333", "0.5451963", "0.5448434", "0.5438866", "0.5423486", "0.5415208", "0.5406266", "0.5402581", "0.53975946", "0.5394716", "0.5393349", "0.5392306", "0.53922695", "0.53765255", "0.53662497", "0.53636944", "0.5360055", "0.5344925", "0.53288424", "0.53277874", "0.532303", "0.5318918", "0.5314146", "0.531208", "0.5311538", "0.53112257", "0.53070545", "0.53033566", "0.5300313", "0.5297008", "0.52809644", "0.5279005", "0.52756554", "0.52747434", "0.5271634", "0.5259101", "0.5257641", "0.5253719", "0.5251877", "0.5249443", "0.52492887", "0.52450323" ]
0.8071093
0
Makes the Pie Chart button
public void MakePie() { PieButton = new JButton( new ImageIcon(getClass().getResource(GetPieChartImage()))); PieButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { GetHost().instructionText.setVisible(false); GetHost().ExportEnabled(); JPanel piecharts = new JPanel(); piecharts.setLayout(new WrapLayout()); piecharts.setSize(new Dimension(600,400)); piecharts.setBackground(Color.WHITE); if(GetHost().GetColumns().length == 1){ if(GetHost().GetTitle() == UNSET) { piecharts.add(new PieChart(GetHost().GetGraphData(), "Pie Chart", GetHost().GetColourScheme(), GetHost(), 0)); }else { piecharts.add(new PieChart( GetHost().GetGraphData(), GetHost().GetTitle(), GetHost().GetColourScheme(), GetHost(), 0)); } }else { if(GetHost().GetTitle() == UNSET) { for(int i = 1; i<GetHost().GetColumns().length; i++){ SetIncrement(i); piecharts.add(new PieChart( GetHost().GetGraphData(), "Pie Chart", GetHost().GetColourScheme(), GetHost(), i)); } }else { for(int i=1;i<GetHost().GetColumns().length; i++){ SetIncrement(i); piecharts.add(new PieChart( GetHost().GetGraphData(), GetHost().GetTitle(), GetHost().GetColourScheme(), GetHost(), i)); } } } Holder = new JScrollPane(); Holder.setPreferredSize(new Dimension(800,450)); Holder.setViewportView(piecharts); Holder.setVisible(true); GetHost().LeftPanelContent(Holder); } }); ChartTypeInterface.add(PieButton); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setPiechart() {\r\n\t\tOrderA oa = new OrderA();\r\n\r\n\t\tMap<String, Integer> data = oa.getOrders();\r\n\t\tPieChart pieChart = new PieChart();\r\n\r\n\t\tlbltotalorder.setText(\"\" + oa.totalord);\r\n\r\n\t\tPieChart.Data slice1 = new PieChart.Data(\"Pending\", data.get(\"pen\"));\r\n\t\tPieChart.Data slice2 = new PieChart.Data(\"Recieved\", data.get(\"rec\"));\r\n\t\tPieChart.Data slice3 = new PieChart.Data(\"Running\", data.get(\"run\"));\r\n\t\tPieChart.Data slice4 = new PieChart.Data(\"Completed\", data.get(\"com\"));\r\n\r\n\t\tpieChart.getData().add(slice1);\r\n\t\tpieChart.getData().add(slice2);\r\n\t\tpieChart.getData().add(slice3);\r\n\t\tpieChart.getData().add(slice4);\r\n\r\n\t\tpieChart.setPrefSize(400, 250);\r\n\r\n\t\tpieChart.setLegendSide(Side.LEFT);\r\n\t\tpieChart.setStartAngle(30);\r\n\r\n\t\tpierect.getChildren().addAll(pieChart);\r\n\r\n\t}", "public ShannonsPieChart(ShannonsController ctl){\n\t\t controller = ctl;\n\t\tinitGUI();\n\t}", "@Override\r\n public void run() {\n chart = new PieChart();\r\n chart.setWidth(\"100px\");\r\n chart.setHeight(\"100px\");\r\n fp.add(chart);\r\n draw();\r\n }", "public void goToPieChart(ActionEvent event) throws SQLException {\n\t\tconn = MySqlConnection.ConnectDb();\n\n\t\tObservableList<Data> list = FXCollections.observableArrayList();\n\t\tString sql = \"select category, amount from Account\";\n\t\tps = conn.prepareStatement(sql);\n\t\trs = ps.executeQuery();\n\t\t\n\t\t\n\t\tfor(Account acc: lists) {\n\t\t\tlist.addAll(new PieChart.Data(acc.getCategory(), acc.getAmount()));\n\t\t}\n\t\t\n\t\tPieChart pieChart = new PieChart();\n\t\tpieChart.getData().addAll(list);\n\t\tpieChart.setTitle(\"Expense Distributon\");\n\n\t\tScene scene = new Scene(pieChart, 500, 500);\n\t\tStage stage = new Stage();\n\t\tstage.setScene(scene);\n\t\tstage.show();\n\t}", "private void initPieChart(){\n }", "private void setDataPieChart() {\n\t\t\n\t\tchartPie.setTitle(\"Dépense par catégorie\");\n\t\tObservableList<PieChart.Data> pieChartData = FXCollections\n\t\t\t\t.observableArrayList();\n\t\t\n\t\tfor (CategoryLogic cl : ClientLogic.getInstance().getCategories()) {\n\t\t\tint outgo = 0;\n\t\t\tif (IOTransactionLogic.getTransactionsByCategory()\n\t\t\t\t\t.containsKey(cl)) {\n\t\t\t\tfor (IOTransactionLogic tr : IOTransactionLogic\n\t\t\t\t\t\t.getTransactionsByCategory().get(cl)) {\n\t\t\t\t\tif (!tr.isIncome()) {\n\t\t\t\t\t\toutgo += tr.getAmount() * (-1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpieChartData.add(new PieChart.Data(cl.getName(), outgo));\n\t\t\t}\n\t\t}\n\t\t\n\t\tpieChartData.forEach(data -> data.nameProperty().bind(Bindings\n\t\t\t\t.concat(data.getName(), \" \", data.pieValueProperty(), \" CHF\")));\n\t\t\n\t\tchartPie.setData(pieChartData);\n\t\tchartPie.setLegendVisible(false);\n\t\t\n\t}", "private void initPieChart() {\n\t\tPieChart chartLinguagens = new PieChart();\n\t\tchartLinguagens.setTitle(\"Ranking de Linguagens de Programação Mar/2013\");\n\t\tObservableList<PieChart.Data> datas = FXCollections.observableArrayList(\n\t\t\t\tnew PieChart.Data(\"Java\", 18.156),\n\t\t\t\tnew PieChart.Data(\"C\", 17.141), \n\t\t\t\tnew PieChart.Data(\"Objective-C\", 10.230),\n\t\t\t\tnew PieChart.Data(\"C++\", 9.115), \n\t\t\t\tnew PieChart.Data(\"C#\", 6.597), \n\t\t\t\tnew PieChart.Data(\"Outros\", 38.761));\n\t\tchartLinguagens.setData(datas);\n\t\tpane.getChildren().add(chartLinguagens);\n\t}", "private void TabbedPaneMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_TabbedPaneMouseClicked\n DefaultPieDataset pieDataset = new DefaultPieDataset();\n // import spending data\n getSpendingData();\n // assign data a title & add to chart\n pieDataset.setValue(\"mortgage\", mort);\n pieDataset.setValue(\"credit\", cred);\n pieDataset.setValue(\"loans\", loan);\n pieDataset.setValue(\"auto\", auto);\n pieDataset.setValue(\"grocery\", groc);\n pieDataset.setValue(\"medical\", medi);\n pieDataset.setValue(\"utilities\", util);\n pieDataset.setValue(\"entertainment\", ente);\n pieDataset.setValue(\"other\", othe);\n\n JFreeChart chart = ChartFactory.createPieChart3D(\"How You Spend Your Money\",\n pieDataset, true, true, true);\n PiePlot3D P = (PiePlot3D) chart.getPlot();\n // Add chart to existing JPanel...\n chartPanel.setLayout(new java.awt.BorderLayout());\n ChartPanel CP = new ChartPanel(chart);\n chartPanel.add(CP, BorderLayout.CENTER);\n chartPanel.validate();\n }", "public void fillPieChart(){\n pieChartData = FXCollections.observableArrayList();\n for (Map.Entry<String, Integer> entry : nameToWins.entrySet()) {\n double percentage = (entry.getValue() * 100) / Integer.valueOf(totalGames).doubleValue();\n String strPercentage = formatDec(percentage);\n pieChartData.add(new PieChart.Data(entry.getKey() + \" (\" + strPercentage + \"%)\", entry.getValue()));\n }\n if (gamesWithoutWinner > 0) {\n pieChartData.add(new PieChart.Data(\"No winner\", gamesWithoutWinner));\n }\n chart.setData(pieChartData);\n chart.setTitle(\"Winners by percentage\");\n\n\n lblCaption.setTextFill(Color.web(\"#404040\", 1.0));\n lblCaption.setStyle(\"-fx-font: 24 arial;\");\n\n // set percentages\n for (PieChart.Data data : chart.getData()) {\n data.getNode().addEventHandler(MouseEvent.MOUSE_PRESSED,\n new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent e) {\n lblCaption.setTranslateX(e.getSceneX());\n lblCaption.setTranslateY(e.getSceneY());\n double percentage = (data.getPieValue() * 100) / Integer.valueOf(totalGames).doubleValue();\n String strPercentage = formatDec(percentage);\n lblCaption.setText(String.valueOf(strPercentage + \"%\"));\n }\n });\n }\n // add pieChart and caption\n if (!diagramBox.getChildren().contains(chart))\n diagramBox.getChildren().add(chart);\n if (!root.getChildren().contains(lblCaption))\n root.getChildren().add(lblCaption);\n }", "public void createPieChart(HashMap<String,Integer> mapValues) {\n\t PieDataset dataset = createDataset(mapValues);\n\t JFreeChart chart = ChartFactory.createPieChart(\n\t \"Quality of Detection Pie Chart\",\n\t dataset,\n\t true, \n\t true,\n\t false);\n\t PieSectionLabelGenerator labelGenerator = new StandardPieSectionLabelGenerator(\n\t \"Quality {0} : ({2})\", new DecimalFormat(\"0\"), new DecimalFormat(\"0%\"));\n\t ((PiePlot) chart.getPlot()).setLabelGenerator(labelGenerator);\n\t ChartPanel panel = new ChartPanel(chart); \n\t JFrame jframe = new JFrame();\n\t jframe.add(panel);\n\t jframe.setVisible(true);\n\t jframe.pack();\n\t jframe.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n\t }", "public static void main(String[]args){\n JFrame frame = new JFrame(\"Pie Chart\"); \n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n Pie chart1 = new Pie();\n frame.getContentPane().add (chart1);\n frame.pack();\n frame.setVisible(true);\n }", "@FXML private void affichePieChart() throws ClassNotFoundException, SQLException{\n piechart.getData().clear();\n ObservableList<Data> data = FXCollections.observableArrayList();\n LocalDate dt = LocalDate.now();\n int annee = Integer.parseInt(dt.format(DateTimeFormatter.ofPattern(\"yyyy\")))-10;\n XYChart.Series<String, Number> series = new XYChart.Series<>();\n for(int i=1 ; i<=10 ; i++){\n data.add(new PieChart.Data(String.valueOf(annee+i), daoreglements.findSomme(String.valueOf(annee+i))));\n }\n piechart.setData(data);\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\t \n\t\t for(int g = 0;g<i;g++){\n\t\t String s = String.valueOf(datas[1][g]);\n\t\t data.addValue(this.datas[2][g], this.name[g], s);\n\t\t }\n\t\t \n\t\t if(e.getSource() == button1){\n\t\t JFreeChart chart = ChartFactory.createLineChart(\"Import Volume\",\n\t\t \"Year\",\n\t\t \"Ton\",\n\t\t data,\n\t\t PlotOrientation.VERTICAL,\n\t\t true,\n\t\t false,\n\t\t false);\n\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t add(cpanel, BorderLayout.CENTER);\n\t\t setVisible(true);\n\t\t } else if(e.getSource() == button2){\n\t\t\t JFreeChart chart = ChartFactory.createBarChart(\"Import Volume\",\n \"Year\",\n \"Ton\",\n data,\n PlotOrientation.VERTICAL,\n true,\n false,\n false);\n\t\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t\t add(cpanel, BorderLayout.CENTER);\n\t\t\t setVisible(true);\n} \n\n\t\t\n\t}", "public void View()\n\t{\n\t\tDefaultPieDataset pieDataset = new DefaultPieDataset();\n\t\t\n\t\tfor(String key : result.keySet())\n\t\t{\n\t\t\tpieDataset.setValue(key, Double.parseDouble(result.get(key).toString()));\n\t\t}\n\t\t\n\t\tJFreeChart chart = ChartFactory.createPieChart(title, pieDataset, true, true, true);\n\t\t\n\t\tChartFrame frame = new ChartFrame(\"Pie Chart\", chart);\n\t\t\n\t\tframe.setVisible(true);\n\t\tframe.setSize(450,500);\n\t}", "public void chartMouseClicked(ChartMouseEvent event) {\n }", "public void MakeBubble() {\n\t\tBubbleButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetBubbleChartImage())));\n\t\tBubbleButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetColumns().length >= 3){\n\t\t\t\t\t\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\tGetHost().LeftPanelContent(new BubbleChart(\n\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\"Bubble Chart\", \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost()));\n\t\t\t\t\t}else {\n\t\t\t\t\t\tGetHost().LeftPanelContent(new BubbleChart(\n\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost()));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"You must have three columns selected to use this chart\", \n\t\t\t\t\t\"Bubble Chart Format\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BubbleButton);\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n panelChart = new javax.swing.JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jButton1.setText(\"Balansas\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n panelChart.setBackground(new java.awt.Color(255, 255, 255));\n panelChart.setLayout(new java.awt.BorderLayout());\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelChart, javax.swing.GroupLayout.DEFAULT_SIZE, 686, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGap(306, 306, 306)\n .addComponent(jButton1)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(panelChart, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addContainerGap())\n );\n\n pack();\n }", "private PanelTester()\n {\n /**/\n //f.add(new CardSelector(0, 0, width, height, \"TEST\"));\n\n // 73 Total\n// Slice[] slices2 = { new Slice(5, Color.BLACK,\"BLACK\"),\n// new Slice(33, Color.GREEN,\"GREEN\"),\n// new Slice(20, Color.YELLOW,\"YELLOW\"), new Slice(15, Color.RED,\"RED\") };\n//\n// Slice[] slices = { new Slice(0.64, Color.GREEN, \"Organic\"),\n// new Slice(52.6590008, Color.BLUE, \"Conventional\" ),\n// new Slice(46.7009992, Color.RED, \"GMO\" ) };\n//\n// ArrayList<Slice> sliceArray = new ArrayList<>();\n// for( int i = 0; i < slices.length ; i++)\n// {\n// sliceArray.add( slices[i] );\n// }\n// f.add(new PieChart( f.getBounds(), sliceArray ) );\n// Rectangle temp = new Rectangle(0,0,100,100);\n //f.add(new ChartKey(temp, sliceArray ));\n /**/\n\n\n\n f.add(new AvailableCropsBar(\"test\", new Color(134,255, 109,255),100,60,20,300,50));\n\n\n\n\n\n //f.pack();\n }", "private void createPieModel() {\n pieModel = new PieChartModel();\n for (GraficoEsCarrera items : listagraficada) {//recorre la lista de datos de alumnos segun la carrera\n pieModel.set(items.getCarrera(), items.getCantidad());\n }\n pieModel.setTitle(\"ESTUDIANTES RESGITRADOS POR CARRERA\");\n pieModel.setLegendPosition(\"e\");\n pieModel.setFill(false);\n pieModel.setShowDataLabels(true);\n pieModel.setDiameter(150);\n }", "private void setPieChart(PieChart pieChart, PieDataSet dataSet) {\n pieChart.setUsePercentValues(true);\n\n //set offests for the pie chart layout\n pieChart.setExtraOffsets(5, 5, 5, 5);\n\n //set the speed at which the graph decelerates after drag\n pieChart.setDragDecelerationFrictionCoef(0.9f);\n\n //sets the alpha value of the transparent inner circle\n pieChart.setTransparentCircleRadius(61f);\n\n //sets the color of the center hole of the graph\n pieChart.setHoleColor(mContext.getResources().getColor(R.color.transparent));\n\n pieChart.setHoleRadius(50f);\n\n //sets an animation when drawing the graph\n pieChart.animateY(1000, Easing.EasingOption.EaseInOutCubic);\n\n // disable the pie chart description label\n pieChart.getDescription().setEnabled(false);\n\n PieData pieData = new PieData(dataSet); //create a new instance of PieData passing the data set\n pieData.setValueFormatter(new PercentFormatter());\n\n pieData.setValueTextSize(10f); //set the text sie of the pie chart values\n\n pieData.setValueTextColor(Color.BLACK); //set the color of the pie chart text\n\n pieChart.setDrawCenterText(true);\n pieChart.setDrawEntryLabels(false);\n pieChart.getLegend().setOrientation(Legend.LegendOrientation.HORIZONTAL);\n pieChart.getLegend().setHorizontalAlignment(Legend.LegendHorizontalAlignment.CENTER);\n pieChart.getLegend().setWordWrapEnabled(true);\n pieChart.setData(pieData); //set the data to the pie chart\n\n //PieChart Ends Here\n }", "public void actionPerformed(ActionEvent ae)\n\t{\n\t\tif(ae.getSource()==ok)//ae.getActionCommand().equals(\" OK \")) // pie chart\n\t\t{\n\t\t\tif(!processTitles())\n\t\t\t\treturn;\n\t\t\tif(type==0)\n\t\t\t{\n\t\t\t\tvalues=ws.buildBarChart();\n\t\t\t\tif(values.length>15)\n\t\t\t\t{\n\t\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\t\tString checkRange1 = wordBundle.getString(\"checkRange1\");\n\t\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\t\tint select = map.showDialog(map,\"checkRange1\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tws.buildPieChart(titles,xvalues,map);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(type==1) // vertical bar chart\n\t\t\t{\n\t\t\t\tvalues=ws.buildBarChart();\n\t\t\t\tif(checkDataValidity(values))\n\t\t\t\t{\n\t\t\t\t\tif(values.length>10)\n\t\t\t\t\t{\n\t\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\t\tString checkRange = wordBundle.getString(\"checkRange\");\n\t\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\t\tint select = map.showDialog(map,\"checkRange\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tJFrame bcV =new barChartV(map,values,titles,xvalues);\n\t\t\t\t\t\tbcV.repaint();\n\t\t\t\t\t\tbcV.validate();\n\t\t\t\t\t\tbcV.show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"Chart can not be drawn\");\n\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\tString DataCheck = wordBundle.getString(\"DataCheck\");\n\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\tint select = map.showDialog(map,\"DataCheck\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(type==2)//horizontal bar chart\n\t\t\t{\n\t\t\t\tvalues=ws.buildBarChart();\n\t\t\t\t//arrValue av=new arrValue();\n\t\t\t\t//av.selValues=values;\n\t\t\t\tif(checkDataValidity(values))\n\t\t\t\t{\n\t\t\t\t\tif(values.length>10)\n\t\t\t\t\t{\n\t\t\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\t\t\tString checkRange = wordBundle.getString(\"checkRange\");\n\t\t\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\t\t\tint select = map.showDialog(map,\"checkRange\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tJFrame bcH =new barChartH(map,values,titles,xvalues);\n\t\t\t\t\t\tbcH.repaint();\n\t\t\t\t\t\tbcH.validate();\n\t\t\t\t\t\tbcH.show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\tString DataCheck = wordBundle.getString(\"DataCheck\");\n\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\tint select = map.showDialog(map,\"DataCheck\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tsetVisible(false);\n\t\t}\n\t\telse if(ae.getSource()==cancel)//getActionCommand().equals(\"CANCEL\"))\n\t\t\tsetVisible(false);\n\n\t}", "@Override\r\n public void chartMouseClicked(ChartMouseEvent cme) {\n }", "private void updatePieChart() {\n //If both EXPENSE and INCOME calculation are completed, do this\n if(isCategoryIncomeCalculationComplete && isCategoryExpenseCalculationComplete){\n List<Category> catList = new ArrayList<>();\n\n int[] colorList = new int[]{R.color.alizarin, R.color.nephritis};\n\n Category catExpense = new Category();\n catExpense.setName(\"Expense\");\n catExpense.setCost(Math.abs(totalExpenseCost));\n catExpense.setColor(getResources().getString(colorList[0]));\n\n Category catIncome = new Category();\n catIncome.setName(\"Income\");\n catIncome.setCost(Math.abs(totalIncomeCost));\n catIncome.setColor(getResources().getString(colorList[1]));\n\n catList.add(catIncome);\n catList.add(catExpense);\n\n pieChartFragment.setData(catList, true);\n }\n }", "public static void main(String[] args) throws SQLException {\n EventQueue.invokeLater(new Runnable() {\n @Override\n public void run() {\n try {\n int nilaiKiloan = 0;\n int nilaiSatuan = 0;\n\n pieChart frame = new pieChart();\n frame.setVisible(true);\n String queryKiloan = \"SELECT COUNT(*) FROM laundry WHERE jenis_layanan='Laundry Kiloan'\";\n String querySatuan = \"SELECT COUNT(*) FROM laundry WHERE jenis_layanan='Laundry Satuan'\";\n ConnectionDB.InstanceDB.openConnection();\n ResultSet rs = ConnectionDB.InstanceDB.RunSelectQuery(queryKiloan);\n while (rs.next()) {\n nilaiKiloan = rs.getInt(1);\n }\n System.out.println(nilaiKiloan);\n\n ResultSet rs1 = ConnectionDB.InstanceDB.RunSelectQuery(querySatuan);\n while (rs1.next()) {\n nilaiSatuan = rs1.getInt(1);\n }\n System.out.println(nilaiSatuan);\n DefaultPieDataset pieDataset = new DefaultPieDataset();\n pieDataset.setValue(\"Laundry Kiloan\", nilaiKiloan);\n pieDataset.setValue(\"Laundry Satuan\", nilaiSatuan);\n \n JFreeChart chart=ChartFactory.createPieChart3D(\n \"Perbandingan Pengguna Layanan Laundry\", \n pieDataset, \n true, \n true, \n false);\n ChartPanel cPanel = new ChartPanel(chart);\n frame.setContentPane(cPanel);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n }", "private void addDataSet() {\n Log.d(TAG, \"addDataSet started\");\n ArrayList<PieEntry> yEntrys = new ArrayList<>();\n ArrayList<String> xEntrys = new ArrayList<>();\n\n for(int i = 0; i < yData.length; i++){\n yEntrys.add(new PieEntry(yData[i] , i));\n }\n\n for(int i = 1; i < xData.length; i++){\n xEntrys.add(xData[i]);\n }\n\n //Create the data set\n PieDataSet pieDataSet = new PieDataSet(yEntrys, \"Popularity stat\");\n pieDataSet.setSliceSpace(2);\n pieDataSet.setValueTextSize(12);\n pieDataSet.setValueTextColor(Color.WHITE);\n\n\n\n //Add colors to dataset\n ArrayList<Integer> colors = new ArrayList<>();\n colors.add(Color.BLUE);\n colors.add(Color.RED);\n colors.add(Color.GREEN);\n colors.add(Color.CYAN);\n colors.add(Color.YELLOW);\n colors.add(Color.MAGENTA);\n\n pieDataSet.setColors(colors);\n\n //Add legend to chart\n Legend legend = pieChart.getLegend();\n legend.setForm(Legend.LegendForm.DEFAULT);\n legend.setPosition(Legend.LegendPosition.ABOVE_CHART_CENTER);\n\n //Create pie data object\n PieData pieData = new PieData(pieDataSet);\n pieChart.setData(pieData);\n pieChart.invalidate();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_piechart, container, false);\n view.setBackgroundColor(getResources().getColor(R.color.background));\n\n Log.d(TAG, \"onCreate: starting to create chart\");\n\n //Reference piechart in xml layout\n pieChart = (PieChart)view.findViewById(R.id.pieChart1);\n\n //Generate inner circle\n pieChart.setRotationEnabled(true);\n pieChart.setHoleRadius(25f);\n pieChart.setHoleColor(Color.BLACK);\n pieChart.setTransparentCircleAlpha(0);\n\n pieChart.setCenterText(\"Revenue(%)\");\n pieChart.setCenterTextColor(Color.WHITE);\n pieChart.setCenterTextSize(16);\n pieChart.setDescription(null);\n\n //Handles the population of chart data\n addDataSet();\n\n /*Handles the touch event for the chart slices (Displaying message info)*/\n pieChart.setOnChartValueSelectedListener(new OnChartValueSelectedListener() {\n @Override\n public void onValueSelected(Entry e, Highlight h) {\n\n Log.d(TAG,\"onValueSelected: Value select from chart\");\n Log.d(TAG,\"onValueSelected: \" + e.toString());\n Log.d(TAG,\"onValueSelected: \" + h.toString());\n\n int pos1=e.toString().indexOf(\"(sum): \");\n String sales = e.toString().substring(pos1 + 18);\n\n\n for(int i=0; i<yData.length; i++){\n\n if(yData[i] == Float.parseFloat(sales)){\n pos1 = i;\n break;\n }\n }\n\n String company = xData[pos1];\n Toast.makeText(getContext(), \"Store: \" + company + \"\\n\" +\"$\"\n +yValues[pos1]+ \" Billion\", Toast\n .LENGTH_SHORT)\n .show();\n\n\n }\n\n @Override\n public void onNothingSelected() {\n\n }\n });\n\n return view;\n\n }", "private void initGUI(){\n\t\tsetLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\n\t\tDefaultPieDataset dataset = new DefaultPieDataset();// use to set value of pie chart\n\t\tdataset.setValue(\"Bandwidth\",0);//set initial result of the Bandwidth\n\t\tdataset.setValue(\"Signal To Noise\",0);//set initial result of the Signal To Noise\n\t\tdataset.setValue(\"Max Data Rate\",0);//set initial result of the max data rate\n\t\tsetMaxDataRateLBL(dataset); //Set the content of initial result of max data rate \n\t\tJFreeChart pieChart = ChartFactory.createPieChart(\"Shannons Theorem\", dataset, true,true,false);\n\t\t//pie plot use to multiply the pattern and display of pie chart\n\t\tPiePlot plot = (PiePlot)pieChart.getPlot();\n\t\tplot.setLabelFont(new Font(\"SansSerif\", Font.PLAIN, 12));\n //show the message if there is no data available\n\t\tplot.setNoDataMessage(\"No data available\");\n \n // make the result show the numbers on the pie chart\n plot.setLabelGenerator(new StandardPieSectionLabelGenerator(\"{0}: {1} ({2})\", new DecimalFormat(\"0\"), new DecimalFormat(\"0%\")));\n plot.setCircular(false);\n plot.setLabelGap(0.02);\n\t\tChartPanel cp = new ChartPanel(pieChart); //use to put pie chart into JPanel \n\t\tadd(cp);\n\t\tadd(createResult());\n\t}", "private void setPieChartData(Poll aPoll) {\n \tObservableList<Poll> pieChartPoll;\n \tint numberofParties = Factory.getInstance().getPartyNames().length; //number of parties\n \tPieChart.Data[] data = new PieChart.Data[numberofParties];\n \tPieChart.Data[] dataVotes = new PieChart.Data[numberofParties];\n \tParty[] sortedBySeats = aPoll.getPartiesSortedBySeats();\n \tParty[] sortedByVotes = aPoll.getPartiesSortedByVotes();\n \t// make this a loop instead. Based on the size of sortedSeats\n \tint i = 0;\n \tfor (i = 0; i < data.length; i++) {\n \t\tdata[i] = new PieChart.Data(sortedBySeats[i].getName(), sortedBySeats[i].getProjectedNumberOfSeats());\n \t\tdataVotes[i] = new PieChart.Data(sortedByVotes[i].getName(), sortedByVotes[i].getProjectedPercentageOfVotes());\n \t}\n \tseatsPieChart.setData(FXCollections.observableArrayList(data)); \n \tprecentVotesPieChart.setData(FXCollections.observableArrayList(dataVotes));\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n // TODO\r\n \r\n //Stage stage = new Stage();\r\n //Scene scene = new Scene();\r\n /*stage.setTitle(\"Résultat sondage\");\r\n stage.setWidth(500);\r\n stage.setHeight(500);*/\r\n \r\n \r\n \r\n GestionStatistiques gs = new GestionStatistiques();\r\n int nbrTotalReponses = gs.countReponsesSondage(SondageController.sondage.getId());\r\n //System.out.println(nbrTotalReponses);\r\n GestionReponsesPossibles grp=new GestionReponsesPossibles();\r\n ArrayList<Integer> lrp=new ArrayList<>();\r\n for(ReponsesPossibles rp :grp.ListReponsesPossibles(SondageController.sondage.getId())){\r\n lrp.add(rp.getId_reponse());\r\n \r\n }\r\n \r\n \r\n \r\n ObservableList<PieChart.Data> pieChartData =\r\n FXCollections.observableArrayList(\r\n new PieChart.Data(\"★\", gs.countStat(SondageController.sondage.getId(), lrp.get(0))),\r\n new PieChart.Data(\"★★\", gs.countStat(SondageController.sondage.getId(), lrp.get(1))),\r\n new PieChart.Data(\"★★★\", gs.countStat(SondageController.sondage.getId(), lrp.get(2))),\r\n new PieChart.Data(\"★★★★\", gs.countStat(SondageController.sondage.getId(), lrp.get(3))),\r\n new PieChart.Data(\"★★★★★\", gs.countStat(SondageController.sondage.getId(), lrp.get(4))));\r\n final PieChart chart = new PieChart(pieChartData);\r\n chart.setTitle(SondageController.sondage.getNom()+\"\\n\"+\"Nombre total des réponses : \"+nbrTotalReponses);\r\n \r\n \r\n \r\n /**/\r\n Label caption = new Label(\"\");\r\n caption.setTextFill(Color.BLACK);\r\n caption.setStyle(\"-fx-font: 24 roboto;\");\r\n \r\n\r\n for (PieChart.Data data : chart.getData()) {\r\n data.getNode().addEventHandler(MouseEvent.MOUSE_CLICKED,\r\n new EventHandler<MouseEvent>() {\r\n @Override public void handle(MouseEvent e) {\r\n \r\n caption.setTranslateX(e.getSceneX()-240);\r\n caption.setTranslateY(e.getSceneY()-110);\r\n caption.setText(String.format(\"%.1f\",(data.getPieValue())/nbrTotalReponses*100) + \"%\");\r\n }\r\n });\r\n}\r\n \r\n \r\n \r\n \r\n /**/\r\n \r\n \r\n \r\n \r\n chart.setPrefWidth(600);\r\n chart.setPrefHeight(484);\r\n paneID.getChildren().add(chart);\r\n paneID.getChildren().add(caption);\r\n \r\n \r\n //scene.getRoot().getChildren().add(chart);\r\n /*stage.setScene(scene);\r\n stage.show();*/\r\n }", "public PieChartView(Model model) {\n\t\tsuper(model);\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource() == button1){\n\t\t\tint id,number;\n\t\t\tString year;\n\t\t\tResultSet rs;\n\t\t\tMySQL mysql = new MySQL();\n\t\t\trs = mysql.selectAll();\n\t\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\twhile(rs.next()){\n\t\t\t\tid = rs.getInt(\"id\");\n\t\t\t\tyear = rs.getString(\"year\");\n\t\t\t number = rs.getInt(\"number\");\n\t\t\t data.addValue(number,\"出生数\",year); \n\t \t\t\tpanelA.add(new Label(\"id:\"+id+\" / year\"+year+\" / number\"+number)); \n\t\t\t\t}\n\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\t JFreeChart chart = \n\t\t\t ChartFactory.createLineChart(\"出生率\",\n\t\t\t \"年度\",\n\t\t\t \"万(人)\",\n\t\t\t data,\n\t\t\t PlotOrientation.VERTICAL,\n\t\t\t true,\n\t\t\t false,\n\t\t\t false);\n\n\t\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t\t panelA.add(cpanel);\n\t\t\t cardlayout.next(this);\n\n\t\t}\n\t}", "private PieData setPieData(PieDataSet dataSet) {\n PieData pieData = new PieData(dataSet);\n pieData.setValueTextSize(10f);\n\n return pieData;\n }", "public Pie()\n\t{\n\t\tthis.setPreferredSize(new Dimension (1000, 1000));\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tint month;\n\t\tdouble maxtempereture,monthlytempereture,mintempereture;\n\t\tResultSet rs;\n\t\tlib.MySQL mysql = new lib.MySQL();\n\t\trs = mysql.selectAll();\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\ttry{\n\t\t\twhile(rs.next()){\n\t\t\t\tmonth = rs.getInt(\"Month\");\n\t\t\t\tmaxtempereture = rs.getDouble(\"MaxTempereture\");\n\t\t\t\tmonthlytempereture = rs.getDouble(\"MonthkyTempereture\");\n\t\t\t\tmintempereture = rs.getDouble(\"MinTempereture\");\n System.out.println(\"月:\" + month);\n System.out.println(\"最高気温:\" + maxtempereture);\n System.out.println(\"月間平均気温:\" + monthlytempereture);\n System.out.println(\"最低気温:\" + mintempereture);\n data.addValue(maxtempereture,\"MaxTempereture\",month+\"\");\n data.addValue(monthlytempereture,\"MonthlyTempereture\",month+\"\");\n data.addValue(mintempereture,\"MinTempereture\",month+\"\");\n\t\t }\n\t\t}catch(SQLException et){}\n\t\t JFreeChart chart = \n\t\t\t ChartFactory.createLineChart(\"TOKYO TEMPERETURE\",\n\t\t\t \"month\",\n\t\t\t \"tempereture\",\n\t\t\t data,\n\t\t\t PlotOrientation.VERTICAL,\n\t\t\t true,\n\t\t\t false,\n\t\t\t false);\n \n\n ChartPanel cpanel = new ChartPanel(chart);\n panel1.add(cpanel);\n cardlayout.next(this);\n\t}", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n btn_stat.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent event) {\r\n ReclamationService rs=new ReclamationService();\r\n int a=0;int b=0;int c=0;\r\n try {\r\n a=rs.getNombre(\"traitee\");\r\n b= rs.getNombre(\" en cours \");\r\n // c= rs.getNombre(\"En maintenance\");\r\n } catch (SQLException ex) {\r\n Logger.getLogger(StatisquereclamationController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n DefaultCategoryDataset dataset=new DefaultCategoryDataset();\r\n dataset.setValue(a, \"statut\", \"traitee\");\r\n dataset.setValue(b, \"statut\", \" en cours\");\r\n // dataset.setValue(c, \"equipements\", \"en maintenance\");\r\n JFreeChart chart=ChartFactory.createBarChart3D(\"statut de reclamation \", \"etat\", \"nombres\", dataset);\r\n chart.setBackgroundPaint(Color.YELLOW);\r\n chart.getTitle().setPaint(Color.red);\r\n CategoryPlot p=chart.getCategoryPlot();\r\n p.setRangeGridlinePaint(Color.BLUE);\r\n ChartFrame frame=new ChartFrame(\"bar de reclamation\",chart);\r\n frame.setVisible(true);\r\n frame.setSize(450, 350);\r\n System.out.println(a);\r\n System.out.println(b);\r\n\r\n }\r\n });\r\n btn_stat1.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent event) {\r\n ReclamationService rs=new ReclamationService();\r\n int a=0;int b=0;int c =0;\r\n try {\r\n \r\n a=rs.Afficher_listcat(Integer.parseInt(tx_id_patissier.getText()));\r\n b=rs.NombreRec();\r\n c=a/b;\r\n // c= rs.getNombre(\"En maintenance\");tx_id_patissier.getText()\r\n } catch (SQLException ex) {\r\n Logger.getLogger(StatisquereclamationController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n DefaultCategoryDataset dataset=new DefaultCategoryDataset();\r\n dataset.setValue(a, \"taux de reclamation\", \"Patissier n°\"+tx_id_patissier.getText());\r\n \r\n // dataset.setValue(c, \"equipements\", \"en maintenance\");\r\n JFreeChart chart=ChartFactory.createBarChart3D(\"Statistique de patissier\", \"patissier\", \"nombres\", dataset);\r\n chart.setBackgroundPaint(Color.YELLOW);\r\n chart.getTitle().setPaint(Color.red);\r\n CategoryPlot p=chart.getCategoryPlot();\r\n p.setRangeGridlinePaint(Color.BLUE);\r\n ChartFrame frame=new ChartFrame(\"bar de reclamation\",chart);\r\n frame.setVisible(true);\r\n frame.setSize(450, 350);\r\n System.out.println(a);\r\n \r\n }\r\n });\r\n\r\n }", "public void MakeScatter() {\n\t\tScatterButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(\n\t\t\t\tGetScatterPlotChartImage())));\n\t\tScatterButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Scatter Plot Chart \", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(ScatterButton);\n\t}", "public ChartController()\n {\n \tthis.pieModel = new PieChartModel();\n \tthis.pieModel.set(\"\", 0);\n \tthis.categoryModel = new CartesianChartModel() ;\n \tChartSeries fakultas = new ChartSeries() ;\n \tfakultas.set(\"\", 0);\n \tthis.categoryModel.addSeries(fakultas);\n }", "private void createchart() {\n int successcount = 0;\n int failedcount = 0;\n \n DefaultPieDataset barchartdata = new DefaultPieDataset();\n \n if(system == null && enterprise == null){\n for(Enterprise ent: network.getEnterpriseDirectory().getEnterpriseList()){\n for(WorkRequest request: ent.getWorkQueue().getWorkQueue()){\n if(request.getStatus() == WorkRequest.Status.ENTERPRISE2ADMINAPPROVED || request.getStatus() == WorkRequest.Status.ORGANIZATION3ADMINAPPROVED)\n successcount++;\n else if(request.getStatus() == WorkRequest.Status.TESTFAILED)\n failedcount++;\n }\n }\n }\n else if(network == null && enterprise == null){\n for(Network net: system.getNetworkList()){\n for(Enterprise ent: net.getEnterpriseDirectory().getEnterpriseList()){\n for(WorkRequest request: ent.getWorkQueue().getWorkQueue()){\n if(request.getStatus() == WorkRequest.Status.ENTERPRISE2ADMINAPPROVED || request.getStatus() == WorkRequest.Status.ORGANIZATION3ADMINAPPROVED)\n successcount++;\n else if(request.getStatus() == WorkRequest.Status.TESTFAILED)\n failedcount++;\n }\n }\n }\n }\n else{\n for(WorkRequest request: enterprise.getWorkQueue().getWorkQueue()){\n if(request.getStatus() == WorkRequest.Status.ENTERPRISE2ADMINAPPROVED || request.getStatus() == WorkRequest.Status.ORGANIZATION3ADMINAPPROVED)\n successcount++;\n else if(request.getStatus() == WorkRequest.Status.TESTFAILED)\n failedcount++;\n }\n }\n \n barchartdata.setValue( \"Successful Trials\",new Double(successcount));\n barchartdata.setValue(\"Failed trials\",new Double(failedcount));\n\n JFreeChart pieChart = ChartFactory.createPieChart(\"Successful versus failed trials\",barchartdata, false, true, false);\n final PiePlot plot=(PiePlot) pieChart.getPlot();\n ChartPanel barPanel = new ChartPanel(pieChart);\n\n dashboardpanel.removeAll();\n dashboardpanel.setLayout(new java.awt.BorderLayout());\n dashboardpanel.add(barPanel, BorderLayout.CENTER);\n dashboardpanel.validate();\n \n }", "private void initialize() {\r\n\t\t//frame = new JFrame();\r\n\t\tframe.setSize(725, 482);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t//frame.getContentPane().setLayout(null);\r\n\t\t\r\n\t\t\r\n\t\tDefaultCategoryDataset dataset= new DefaultCategoryDataset();\r\n\t\t//JOptionPane.showMessageDialog(null, \"BUTTON CLICKED!!!\");\r\n\t\t//LableMessage.setText(\"BUTTON CLICKED!!!\");\r\n\t\t\r\n\t\t//Pain, Drowsiness, Nausea, Anxiety, and Depression\r\n\t\tdataset.setValue(2, \"day1\",\"Pain\");\r\n\t\tdataset.setValue(5, \"day2\",\"Pain\");\r\n\t\tdataset.setValue(4, \"day3\",\"Pain\");\r\n\t\tdataset.setValue(6, \"day1\", \"Drowsiness\");\r\n\t\tdataset.setValue(10, \"day2\", \"Drowsiness\");\r\n\t\tdataset.setValue(8, \"day3\", \"Drowsiness\");\r\n\t\tdataset.setValue(1, \"day1\", \"Nausea\");\r\n\t\tdataset.setValue(7, \"day2\", \"Nausea\");\r\n\t\tdataset.setValue(5, \"day3\", \"Nausea\");\r\n\t\tdataset.setValue(3,\"day1\",\"Anxiety\");\t\r\n\t\tdataset.setValue(8,\"day2\",\"Anxiety\");\r\n\t\tdataset.setValue(9,\"day3\",\"Anxiety\");\r\n\t\tdataset.setValue(8, \"day1\", \"Depression\");\r\n\t\tdataset.setValue(7, \"day2\", \"Depression\");\r\n\t\tdataset.setValue(9, \"day3\", \"Depression\");\r\n\t\tint test[] = new int[7];\r\n\t\tfor (int i=0;i<7; i++)\r\n\t\t{\r\n\t\t\ttest[i]=5;\r\n\t\t}\r\n\t\tDefaultCategoryDataset dataset2= new DefaultCategoryDataset();\r\n\t\t//dataset2 = dataSetInit(P1.getEnterSymptomLevel(),P1.getPreviousSymptomLevel1(),P1.getPreviousSymptomLevel2());\r\n\t\tdataset2 = dataSetInit(test,test,test);\r\n\t\t//P1.getEnter\r\n\t\t//DefaultCategoryDataset dataset2= new DefaultCategoryDataset();\r\n\r\n\t\t//JFreeChart chart= ChartFactory.createBarChart(P1.firstName+\" \"+P1.lastName,\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\r\n\t\tJFreeChart chart= ChartFactory.createBarChart3D(\"Symptom Report\",\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,true,true,true);\r\n\t\t//JFreeChart chart2= ChartFactory.createBarChart(\"Symptom Report\",\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\t\tchart.setBackgroundPaint(Color.lightGray);\r\n\t\t//JFreeChart chart2= ChartFactory.createBarChart(\"Grade Report\",\"Student Name\", \"Marks\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\t\t\r\n\t\tChartPanel chartPanel = new ChartPanel(chart);\r\n\t\tchartPanel.setPreferredSize(new Dimension(700,350));\r\n\t\tPan.add(chartPanel);\r\n\t\t\r\n\t\tframe.getContentPane().add(Pan);\r\n\t\tCategoryPlot p=chart.getCategoryPlot();\r\n\t\tp.setRangeGridlinePaint(Color.red);\r\n\t\tp.setBackgroundPaint(Color.WHITE);\r\n\t\tframe.setVisible(true);\r\n//\t\tChartFrame frame= new ChartFrame(\"Bar Graph Test\",chart,false);\r\n//\t\t\r\n//\t\tframe.setVisible(true);\r\n//\t\tframe.setSize(700,350);\r\n//\t\tframe.setResizable(false);\r\n\t\t//frame2 =new JFrame()\r\n\t}", "private void constructChartPanel() {\n chartPanel = new JPanel();\n chartPanel.setBorder(BorderFactory.createTitledBorder(\"Price Chart\"));\n chartPanel.setPreferredSize(relativeSize(0.4f, 0.35f));\n \n displayChartButton = new JButton(\"Click to Display Price Chart\");\n displayChartButton.setEnabled(false);\n displayChartButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n JPanel cPanel = chart.getChartPanel();\n chartPanel.removeAll();\n chartPanel.add(cPanel);\n cPanel.setPreferredSize(relativeSize(0.4f, 0.35f));\n \n pack();\n repaint();\n }\n });\n \n chartPanel.add(displayChartButton);\n }", "void toggleButton_actionPerformed(ActionEvent e) {\n this.togglePlot();\n }", "private PieDataset createDataset() {\n JOptionPane.showMessageDialog(null, \"teste\"+dados.getEntrada());\r\n \r\n DefaultPieDataset result = new DefaultPieDataset();\r\n result.setValue(\"Entrada\", dados.getEntrada());\r\n result.setValue(\"Saida\", dados.getSaida());\r\n result.setValue(\"Saldo do Periodo\", dados.getSaldo());\r\n return result;\r\n\r\n }", "@Override\r\n public void handle(ActionEvent event) {\r\n whiteanchorpane.getChildren().clear();\r\n PieChart chart = new PieChart();\r\n /* Double noofusers = UserTableOperations.getInstance().numberOfOnlineUsers();\r\n Double noofuserson = UserTableOperations.getInstance().numberOfOfflineUsers();\r\n Double noofuserss = UserTableOperations.getInstance().numberOfFemaleUsers();\r\n Double nodd = UserTableOperations.getInstance().numberOfMaleUsers();\r\n Double nfd = UserTableOperations.getInstance().numberOfTotalUsers();\r\n System.out.println(\"online\" + noofusers + \" offline\" + noofuserson + \"females \"+ noofuserss + \" males \" + nodd + \"total \"+ nfd);\r\n*/ \r\n PieChart.Data pie = new PieChart.Data(\"online\",UserTableOperations.getInstance().numberOfOnlineUsers());\r\n pie.pieValueProperty().bind(onlineusers);\r\n PieChart.Data pie2 = new PieChart.Data(\"offline\",UserTableOperations.getInstance().numberOfOfflineUsers());\r\n pie2.pieValueProperty().bind(offlineusers);\r\n \r\n ObservableList<PieChart.Data> data = FXCollections.observableArrayList(pie,pie2);\r\n //data.add(new PieChart.Data(\"Online\",150));\r\n // data.add(new PieChart.Data(\"Offline\",55));\r\n //data.add(new PieChart.Data(\"Busy\",300));\r\n //data.add(new PieChart.Data(\"Away\",100));\r\n chart.setData(data);\r\n new Thread(new Task<Void>() {\r\n @Override\r\n protected Void call() throws Exception {\r\n while (true) { \r\n Thread.sleep(1000);\r\n onlineusers.set(UserTableOperations.getInstance().numberOfOnlineUsers());\r\n offlineusers.set(UserTableOperations.getInstance().numberOfOfflineUsers());\r\n //System.out.println(female.getValue());\r\n \r\n }\r\n \r\n \r\n //return null;\r\n }\r\n }).start();\r\n \r\n whiteanchorpane.getChildren().addAll(chart);\r\n }", "public PieChart(String applicationTitle, String chartTitle) {\r\n\t\tsuper(applicationTitle);\r\n\t\tinitGUI(chartTitle);\r\n\t}", "private void setupInitialPieChart(PieChart currentChart) {\n\n SharedPreferences variables = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor editor = variables.edit();\n float foodcost = variables.getFloat(\"food\",0);\n float utilcost = variables.getFloat(\"util\",0);\n float housingcost = variables.getFloat(\"housing\",0);\n float debtcost = variables.getFloat(\"debt\",0);\n float savingscost = variables.getFloat(\"savings\",0);\n float entertainmentcost = variables.getFloat(\"entertainment\",0);\n float personalCarecost = variables.getFloat(\"personalCare\",0);\n float healthCarecost = variables.getFloat(\"healthCare\",0);\n float surplus = variables.getFloat(\"surplus\", 0);\n editor.commit();\n\n\n float tempNums[] = {utilcost, foodcost, housingcost, debtcost, savingscost, entertainmentcost, personalCarecost, healthCarecost, surplus};\n String categories[] = {\"Utilities\", \"Food\", \"Housing\", \"Debt\", \"Savings\", \"Entertainment\",\n \"Personal Care\", \"Health Care\", \"Surplus\"};\n int chartColors[] = {Color.GREEN, Color.CYAN, Color.RED, Color.BLUE, Color.MAGENTA,\n Color.YELLOW, Color.GRAY, Color.CYAN, Color.DKGRAY};\n\n // Populate chart\n List<PieEntry> CatEntries = new ArrayList<>();\n for (int i = 0; i < categories.length; i++) {\n CatEntries.add(new PieEntry(tempNums[i], categories[i]));\n }\n\n PieDataSet CatDataSet = new PieDataSet(CatEntries, \"Categories\");\n CatDataSet.setColors(chartColors);\n PieData data = new PieData(CatDataSet);\n data.setValueTextSize(11);\n\n // Get chart\n currentChart.setRotationEnabled(true);\n currentChart.animateY(800);\n currentChart.setData(data);\n currentChart.setHoleRadius(14f);\n currentChart.setCenterTextSize(11);\n currentChart.setEntryLabelColor(Color.BLACK);\n currentChart.getDescription().setText(\"Starting Budget\");\n currentChart.getDescription().setTextSize(14);\n }", "private void resetPieChart() {\n diagramBox.getChildren().clear();\n }", "private void createChart() {\n // Preparing...\n String selectedDate = periodComboBox.getSelectedItem().toString();\n String selectedPeriod = periodComboBox.getSelectedItem().toString();\n String periodType = periodTypeComboBox.getSelectedItem().toString();\n periodList = new ArrayList<>();\n PieChart chart;\n\n switch (periodType) {\n case \"Monthly\":\n // Configuring panel\n chartPanel.removeAll();\n chartPanel.revalidate();\n\n // Gathering data\n periodList = new ArrayList<>();\n monthlyTotals.stream().filter((w) -> (w.getDate().equals(selectedDate))).forEach((w) -> {\n periodList.add(w);\n });\n\n // Creating chart\n if (pieChartRadioButton.isSelected()) {\n chart = new PieChart(selectedPeriod + \" Totals\", periodList);\n chartPanel.add(chart.getContentPane());\n chart.pack();\n } else if (barGraphRadioButton.isSelected()) {\n BarGraph bg = new BarGraph(\"\", selectedPeriod + \" Totals\", periodList);\n chartPanel.add(bg.getContentPane());\n bg.pack();\n }\n\n // Displaying\n chartPanel.repaint();\n break;\n case \"Yearly\":\n // Configuring panel\n chartPanel.removeAll();\n chartPanel.revalidate();\n\n // Gathering data\n periodList = new ArrayList<>();\n yearlyTotals.stream().filter((w) -> (w.getDate().equals(selectedDate))).forEach((w) -> {\n periodList.add(w);\n });\n\n // Creating chart\n if (pieChartRadioButton.isSelected()) {\n chart = new PieChart(selectedPeriod + \" Totals\", periodList);\n chartPanel.add(chart.getContentPane());\n chart.pack();\n } else if (barGraphRadioButton.isSelected()) {\n BarGraph bg = new BarGraph(\"\", selectedPeriod + \" Totals\", periodList);\n chartPanel.add(bg.getContentPane());\n bg.pack();\n }\n\n // Displaying\n chartPanel.repaint();\n break;\n case \"Historical\":\n // Configuring panel\n chartPanel.removeAll();\n chartPanel.revalidate();\n\n // Creating chart\n if (pieChartRadioButton.isSelected()) {\n chart = new PieChart(\"Historical Totals\", historicalTotals);\n chartPanel.add(chart.getContentPane());\n chart.pack();\n } else if (barGraphRadioButton.isSelected()) {\n BarGraph bg = new BarGraph(\"\", \"Historical Totals\", historicalTotals);\n chartPanel.add(bg.getContentPane());\n bg.pack();\n }\n\n // Displaying\n chartPanel.repaint();\n }\n }", "private JFreeChart getPieChart()\n {\n loadData();\n \n // Create a chart and return it\n final JFreeChart chart = ChartFactory.createPieChart(getTitle(), getPieDataset(),\n useLegend(), useTooltips(), useURLs());\n \n // Customize the labels and legend\n final PiePlot pieplot = (PiePlot) chart.getPlot();\n pieplot.setLabelGenerator(new StandardPieSectionLabelGenerator(\"{0} ({2})\"));\n // pieplot.setSimpleLabels(true);\n pieplot.setNoDataMessage(\"No data available\");\n \n if (useLegend())\n {\n pieplot.setLegendLabelGenerator(new StandardPieSectionLabelGenerator(\"{0} ({1})\"));\n chart.getLegend().setPosition(RectangleEdge.RIGHT);\n // pieplot.setLegendLabelToolTipGenerator(new StandardPieSectionLabelGenerator(\"{0}: {2}%\"));\n }\n \n return chart;\n }", "private JFreeChart createChart(PieDataset dataset, String title) {\n\n\t\tJFreeChart chart = ChartFactory.createPieChart3D(title, // chart title\n\t\t\t\tdataset, // data\n\t\t\t\ttrue, // include legend\n\t\t\t\ttrue, false);\n\n\t\tPiePlot3D plot = (PiePlot3D) chart.getPlot();\n\t\tplot.setStartAngle(290);\n\t\tplot.setDirection(Rotation.CLOCKWISE);\n\t\tplot.setForegroundAlpha(0.5f);\n\t\treturn chart;\n\n\t}", "public void onClick(View v) {\n checkFields();\n generateChart();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n panel = new javax.swing.JPanel();\n bt_close = new javax.swing.JButton();\n cb_sort = new javax.swing.JCheckBox();\n tabs = new javax.swing.JTabbedPane();\n piechartPanel = new javax.swing.JPanel();\n barschartPanel = new javax.swing.JPanel();\n bt_save = new javax.swing.JButton();\n bt_print = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n\n panel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n bt_close.setForeground(new java.awt.Color(204, 204, 204));\n bt_close.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/exit.png\"))); // NOI18N\n bt_close.setToolTipText(\"Κλείσιμο γραφήματος\");\n bt_close.setBorder(null);\n bt_close.setBorderPainted(false);\n bt_close.setContentAreaFilled(false);\n bt_close.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n bt_close.setFocusPainted(false);\n bt_close.setIconTextGap(1);\n bt_close.setRequestFocusEnabled(false);\n bt_close.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bt_closeActionPerformed(evt);\n }\n });\n\n cb_sort.setText(\"Ταξινόμιση ανά ποσό\");\n cb_sort.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cb_sortActionPerformed(evt);\n }\n });\n\n piechartPanel.setMinimumSize(new java.awt.Dimension(600, 400));\n\n javax.swing.GroupLayout piechartPanelLayout = new javax.swing.GroupLayout(piechartPanel);\n piechartPanel.setLayout(piechartPanelLayout);\n piechartPanelLayout.setHorizontalGroup(\n piechartPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 783, Short.MAX_VALUE)\n );\n piechartPanelLayout.setVerticalGroup(\n piechartPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 442, Short.MAX_VALUE)\n );\n\n tabs.addTab(\"Γράφημα πίτας\", new javax.swing.ImageIcon(getClass().getResource(\"/images/pie_chart.png\")), piechartPanel); // NOI18N\n\n javax.swing.GroupLayout barschartPanelLayout = new javax.swing.GroupLayout(barschartPanel);\n barschartPanel.setLayout(barschartPanelLayout);\n barschartPanelLayout.setHorizontalGroup(\n barschartPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 783, Short.MAX_VALUE)\n );\n barschartPanelLayout.setVerticalGroup(\n barschartPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 442, Short.MAX_VALUE)\n );\n\n tabs.addTab(\"Γράφημα μπάρας\", new javax.swing.ImageIcon(getClass().getResource(\"/images/chart.png\")), barschartPanel); // NOI18N\n\n bt_save.setForeground(new java.awt.Color(204, 204, 204));\n bt_save.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/save.png\"))); // NOI18N\n bt_save.setToolTipText(\"Αποθήκευση του γραφήματος ως εικόνα\");\n bt_save.setBorder(null);\n bt_save.setBorderPainted(false);\n bt_save.setContentAreaFilled(false);\n bt_save.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n bt_save.setFocusPainted(false);\n bt_save.setIconTextGap(1);\n bt_save.setRequestFocusEnabled(false);\n bt_save.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bt_saveActionPerformed(evt);\n }\n });\n\n bt_print.setForeground(new java.awt.Color(204, 204, 204));\n bt_print.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/printer.png\"))); // NOI18N\n bt_print.setToolTipText(\"Εκτύπωση του γραφήματος\");\n bt_print.setBorder(null);\n bt_print.setBorderPainted(false);\n bt_print.setContentAreaFilled(false);\n bt_print.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n bt_print.setFocusPainted(false);\n bt_print.setIconTextGap(1);\n bt_print.setRequestFocusEnabled(false);\n bt_print.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bt_printActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(jLabel1.getFont().deriveFont(jLabel1.getFont().getStyle() | java.awt.Font.BOLD, jLabel1.getFont().getSize()+2));\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"Στατιστικά Γραφήματα\");\n\n javax.swing.GroupLayout panelLayout = new javax.swing.GroupLayout(panel);\n panel.setLayout(panelLayout);\n panelLayout.setHorizontalGroup(\n panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 686, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(bt_print, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(bt_save, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(bt_close, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(tabs, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 788, Short.MAX_VALUE)\n .addComponent(cb_sort))\n .addContainerGap())))\n );\n panelLayout.setVerticalGroup(\n panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelLayout.createSequentialGroup()\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(bt_close, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(bt_save, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(bt_print, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(panelLayout.createSequentialGroup()\n .addGap(11, 11, 11)\n .addComponent(jLabel1)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cb_sort)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(tabs, javax.swing.GroupLayout.DEFAULT_SIZE, 478, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "public void onPlot(View view) {\r\n\t\t// Respond to the button click\r\n\t\tIntent intent = new Intent(this, PlotActivity.class);\r\n\t\tstartActivity(intent);\t\r\n\t}", "private PieData generateDataPie() {\n\n ArrayList<PieEntry> entries = new ArrayList<>();\n String year = year_txt.getText().toString();\n String month1 =Utilities.getMonth(months,month_txt.getText().toString());\n TransactionBeans transactionBeans = transactionDB.getTransactionRecordsYear(month1,year);\n if(transactionBeans!=null) {\n float income = 0;\n float expense = 0;\n try{\n income = (float) (Double.parseDouble(transactionBeans.getIncome()));\n }catch(Exception e){\n income = 0;\n }\n try{\n expense = (float) (Double.parseDouble(transactionBeans.getExpense()));\n }catch(Exception e){\n expense = 0;\n }\n entries.add(new PieEntry(income, \"Income \"));\n entries.add(new PieEntry(expense, \"Expense \"));\n }\n PieDataSet d = new PieDataSet(entries, \"\");\n\n // space between slices\n d.setSliceSpace(2f);\n d.setColors(ColorTemplate.VORDIPLOM_COLORS);\n\n return new PieData(d);\n }", "public CetakPenjualan() {\n initComponents();\ntampilDataPen();\nthis.setResizable(false);\n }", "public void setGraph(ActionEvent event)\n {\n theLineGraph.getData().clear();\n double temporary=0;\n theLineGraph.getXAxis().setLabel(\"Days\");\n\n XYChart.Series<String, Number> theGraph = new XYChart.Series<String, Number>();\n\n for (int i=0; i<Driver.save.getLog().size();i++)\n {\n String myI=i+\"\";\n\n if (event.getSource()==caloriesButton)\n {\n temporary=Driver.save.getDayCalories(i);\n theLineGraph.getYAxis().setLabel(\"Calories\");\n\n } else if(event.getSource()==protienButton)\n {\n temporary=Driver.save.getDayProtein(i);\n theLineGraph.getYAxis().setLabel(\"protien\");\n }\n else if (event.getSource()==carbsButton)\n {\n temporary=Driver.save.getDayCarbo(i);\n theLineGraph.getYAxis().setLabel(\"Carbs\");\n }\n else if (event.getSource()==fatsButton)\n {\n temporary=Driver.save.getDayFats(i);\n theLineGraph.getYAxis().setLabel(\"Fats\");\n }\n else if (event.getSource()==bevButton)\n {\n temporary=Driver.save.getDayBevarage(i);\n theLineGraph.getYAxis().setLabel(\"Drinks in ml\");\n }\n\n theGraph.getData().add(new XYChart.Data<String, Number>(myI ,temporary));\n }\n theLineGraph.getData().addAll(theGraph);\n\n }", "public static Chart createPieChart(String pieChartCaption, String[] texts,\r\n\t\t\tdouble[] values) {\n\t\tChartWithoutAxes chart = ChartWithoutAxesImpl.create();\r\n\t\tchart.setDimension(ChartDimension.TWO_DIMENSIONAL_LITERAL);\r\n\t\t// chart.setMinSlice(maxValue / 50);// 最大的十分之一\r\n\t\t// chart.setMinSliceLabel(\"其他\");\r\n\t\t// chart.setMinSlicePercent(true);\r\n\t\tText caption = chart.getTitle().getLabel().getCaption();\r\n\t\tcaption.setValue(pieChartCaption);\r\n\t\tadjustFont(caption.getFont(), STRONG_SIZE);\r\n\t\tLegend legend = chart.getLegend();\r\n\t\tlegend.setItemType(LegendItemType.CATEGORIES_LITERAL);\r\n\t\tlegend.setVisible(true);\r\n\t\tadjustFont(legend.getText().getFont(), NORMAL_SIZE);\r\n\t\tTextDataSet categoryValues = TextDataSetImpl.create(texts);//$NON-NLS-1$ //$NON-NLS-2$\r\n\t\tNumberDataSet seriesOneValues = NumberDataSetImpl.create(values);\r\n\t\t// Base Series\r\n\t\tSeries series = SeriesImpl.create();\r\n\t\tseries.setDataSet(categoryValues);\r\n\t\tSeriesDefinition sd = SeriesDefinitionImpl.create();\r\n\t\tchart.getSeriesDefinitions().add(sd);\r\n\t\tsd.getSeriesPalette().shift(0);\r\n\t\tsd.getSeries().add(series);\r\n\t\t// new colors\r\n\t\tsd.getSeriesPalette().getEntries().clear();\r\n\t\tfor (int i = 0; i < fiaBase.length; i++) {\r\n\t\t\tsd.getSeriesPalette().getEntries().add(fiaBase[i]);\r\n\t\t}\r\n\r\n\t\t// Orthogonal Series\r\n\t\tPieSeries sePie = (PieSeries) PieSeriesImpl.create();\r\n\t\tsePie.setDataSet(seriesOneValues);\r\n\t\tsePie.setExplosion(2);\r\n\t\tsePie.setRotation(40);\r\n\r\n\t\tsePie.setLabelPosition(Position.INSIDE_LITERAL);// 设置在内部显示数字\r\n\t\tadjustFont(sePie.getLabel().getCaption().getFont(), NORMAL_SIZE);// 设置字体\r\n\r\n\t\tSeriesDefinition sdef = SeriesDefinitionImpl.create();\r\n\t\tsd.getSeriesDefinitions().add(sdef);\r\n\t\tsdef.getSeries().add(sePie);\r\n\r\n\t\treturn chart;\r\n\t}", "private PieData generateDataPie(int cnt) {\n\n ArrayList<PieEntry> entries = new ArrayList<PieEntry>();\n\n for (int i = 0; i < 4; i++) {\n entries.add(new PieEntry((float) ((Math.random() * 70) + 30), \"Quarter \" + (i+1)));\n }\n\n PieDataSet d = new PieDataSet(entries, \"\");\n\n // space between slices\n d.setSliceSpace(2f);\n d.setColors(ColorTemplate.VORDIPLOM_COLORS);\n\n PieData cd = new PieData(d);\n return cd;\n }", "protected JFreeChart createChart(PieDataset dataset, String title) {\r\n\t\tJFreeChart chart = ChartFactory.createPieChart3D(title, dataset, true, true, false);\r\n\r\n\t\tPiePlot3D plot = (PiePlot3D) chart.getPlot();\r\n\t\tplot.setStartAngle(290);\r\n\t\tplot.setDirection(Rotation.CLOCKWISE);\r\n\t\tplot.setForegroundAlpha(0.5f);\r\n\t\t\r\n\t\treturn chart;\r\n\t}", "public void seleccionarPieza(java.awt.event.MouseEvent evt) {\n // Se pasa como parametro el evento\n CuadroPieza t = ((CuadroPieza) evt.getComponent());//Averiguo en que cuadro sucedio el evento\n if (t.getPieza() != null) {//Veo si el cuadro no esta vacio.\n if (t.getPieza().getColor() == getTurno()) {//Veo si es del mismo color del turno que actualmente le toca.\n cuadroSeleccionado = t;\n /*\n * Con esto hago que se resalten los posibles movimientos en todo el tablero.\n */\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n tablero[x][y].opacarPieza();//Si hay piezas seleccionadas, las opaco\n if (isSeleccionarAlternativas()) {//Resalto los posibles movimientos.\n if (cuadroSeleccionado.getPieza().validarMovimiento(tablero[x][y], this)) {\n tablero[x][y].resaltarPieza(tablero[x][y].getPieza() != null ? getAlerta() : null);\n }\n }\n }\n }\n /*\n * Resalto el cuadro que ha sido seleccionado para que el usuario sepa que cuadro selecciono\n */\n cuadroSeleccionado.resaltarPieza(getSeleccionado());\n /*\n * Establesco la imagen de la pieza que ha sido seleccionada al label.\n */\n tmp.setIcon(cuadroSeleccionado.getPieza().getImagenPieza());\n /*\n * borro la imagen de la pieza del cuadro.\n */\n cuadroSeleccionado.lbl.setIcon(null);\n /*\n * Establesco la nueva posicion del label, que tiene la imagen de la pieza.\n */\n tmp.setLocation(cuadroSeleccionado.getLocation().x + evt.getX() - 18, cuadroSeleccionado.getLocation().y + evt.getY() - 28);\n }\n }\n }", "public void chart() {\r\n setLayout(new FlowLayout());\r\n String[] testNumbers = {\"LINEAR SEARCH\", \"TEST 1\", \"TEST 2\", \"TEST 3\", \"TEST 4\", \"TEST 5\", \"TEST 6\", \"TEST 7\", \"TEST 8\", \"TEST 9\", \"TEST 10\", \"AVERAGE\", \"STANDARD DEV.\"};\r\n Object[][] testResult = {{\"500\", lin[0][0], lin[0][1], lin[0][2], lin[0][3], lin[0][4], lin[0][5], lin[0][6], lin[0][7], lin[0][8], lin[0][0], linAvAndDev[0][0], linAvAndDev[0][1]},\r\n {\"10,000\", lin[1][0], lin[1][1], lin[1][2], lin[1][3], lin[1][4], lin[1][5], lin[1][6], lin[1][7], lin[1][8], lin[1][9], linAvAndDev[1][0], linAvAndDev[1][1]},\r\n {\"100,000\", lin[2][0], lin[2][1], lin[2][2], lin[2][3], lin[2][4], lin[2][5], lin[2][6], lin[2][7], lin[2][8], lin[2][9], linAvAndDev[2][0], linAvAndDev[2][1]},\r\n {\"1,000,000\", lin[3][0], lin[3][1], lin[3][2], lin[3][3], lin[3][4], lin[3][5], lin[3][6], lin[3][7], lin[3][8], lin[3][9], linAvAndDev[3][0], linAvAndDev[3][1]},\r\n {\"5,000,000\", lin[4][0], lin[4][1], lin[4][2], lin[4][3], lin[4][4], lin[4][5], lin[4][6], lin[4][7], lin[4][8], lin[4][9], linAvAndDev[4][0], linAvAndDev[4][1]},\r\n {\"7,000,000\", lin[5][0], lin[5][1], lin[5][2], lin[5][3], lin[5][4], lin[5][5], lin[5][6], lin[5][7], lin[5][8], lin[5][9], linAvAndDev[5][0], linAvAndDev[5][1]},\r\n {\"10,000,000\", lin[6][0], lin[6][1], lin[6][2], lin[6][3], lin[6][4], lin[6][5], lin[6][6], lin[6][7], lin[6][8], lin[6][9], linAvAndDev[6][0], linAvAndDev[6][1]},\r\n {\"BINARY SEARCH\", \"TEST 1\", \"TEST 2\", \"TEST 3\", \"TEST 4\", \"TEST 5\", \"TEST 6\", \"TEST 7\", \"TEST 8\", \"TEST 9\", \"TEST 10\", \"AVERAGE\", \"STANDARD DEV.\"},\r\n {\"500\", bin[0][0], bin[0][1], bin[0][2], bin[0][3], bin[0][4], bin[0][5], bin[0][6], bin[0][7], bin[0][8], bin[0][9], linAvAndDev[7][0], linAvAndDev[7][1]},\r\n {\"10,000\", bin[1][0], bin[1][1], bin[1][2], bin[1][3], bin[1][4], bin[1][5], bin[1][6], bin[1][7], bin[1][8], bin[1][9], linAvAndDev[8][0], linAvAndDev[8][1]},\r\n {\"100,000\", bin[2][0], bin[2][1], bin[2][2], bin[2][3], bin[2][4], bin[2][5], bin[2][6], bin[2][7], bin[2][8], bin[2][9], linAvAndDev[9][0], linAvAndDev[9][1]},\r\n {\"1,000,000\", bin[3][0], bin[3][1], bin[3][2], bin[3][3], bin[3][4], bin[3][5], bin[3][6], bin[3][7], bin[3][8], bin[3][9], linAvAndDev[10][0], linAvAndDev[10][1]},\r\n {\"5,000,000\", bin[4][0], bin[4][1], bin[4][2], bin[4][3], bin[4][4], bin[4][5], bin[4][6], bin[4][7], bin[4][8], bin[4][9], linAvAndDev[11][0], linAvAndDev[11][1]},\r\n {\"7,000,000\", bin[5][0], bin[5][1], bin[5][2], bin[5][3], bin[5][4], bin[5][5], bin[5][6], bin[5][7], bin[5][8], bin[5][9], linAvAndDev[12][0], linAvAndDev[12][1]},\r\n {\"10,000,000\", bin[6][0], bin[6][1], bin[6][2], bin[6][3], bin[6][4], bin[6][5], bin[6][6], bin[6][7], bin[6][8], bin[6][9], linAvAndDev[13][0], linAvAndDev[13][1]}};\r\n chart = new JTable(testResult, testNumbers);\r\n chart.setPreferredScrollableViewportSize(new Dimension(1500, 500)); // SETS SIZE OF CHART.\r\n chart.setFillsViewportHeight(true);\r\n JScrollPane scrollPane = new JScrollPane(chart);\r\n add(scrollPane);\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n pnlChart = new javax.swing.JPanel();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n pnlChart.setBackground(new java.awt.Color(0, 0, 0));\n pnlChart.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n pnlChart.setForeground(new java.awt.Color(255, 255, 255));\n pnlChart.setAlignmentX(1.5F);\n pnlChart.setAlignmentY(0.35F);\n pnlChart.setMaximumSize(new java.awt.Dimension(1000, 1000));\n pnlChart.setMinimumSize(new java.awt.Dimension(1, 1));\n pnlChart.setPreferredSize(new java.awt.Dimension(1, 1));\n pnlChart.setLayout(new java.awt.BorderLayout());\n\n jButton2.setText(\"jButton2\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n pnlChart.add(jButton2, java.awt.BorderLayout.PAGE_START);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(pnlChart, javax.swing.GroupLayout.PREFERRED_SIZE, 631, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 993, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(pnlChart, javax.swing.GroupLayout.PREFERRED_SIZE, 595, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 801, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void MakeStacked() {\n\t\tStackedButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetStackedAreaChartImage())));\n\t\tStackedButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Stacked Area Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(StackedButton);\n\t}", "void piede() {\n try {\n\n Cell c;\n c = new Cell();\n set2(c);\n c.setColspan(4);\n datatable.addCell(c);\n c = new Cell(new Phrase(\"Totale \\u20ac \" + Db.formatValuta(totale), new Font(Font.HELVETICA, 8, Font.BOLD)));\n set2(c);\n c.setColspan(2);\n c.setHorizontalAlignment(c.ALIGN_RIGHT);\n datatable.addCell(c);\n document.add(datatable);\n } catch (Exception err) {\n err.printStackTrace();\n javax.swing.JOptionPane.showMessageDialog(null, err.toString());\n }\n }", "public void MakeXYSpline() {\n\t\tXYSplineButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetXYSplineChartImage())));\n\t\tXYSplineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new XYSplineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"XYSpline Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new XYSplineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(XYSplineButton);\t\n\t}", "private void setupCurrentPieChart(PieChart currentChart) {\n //values used for pie chart\n SharedPreferences variables = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor editor = variables.edit();\n float foodcost = variables.getFloat(\"foodCopy\",0);\n float utilcost = variables.getFloat(\"utilCopy\",0);\n float housingcost = variables.getFloat(\"housingCopy\",0);\n float debtcost = variables.getFloat(\"debtCopy\",0);\n float savingscost = variables.getFloat(\"savingsCopy\",0);\n float entertainmentcost = variables.getFloat(\"entertainmentCopy\",0);\n float personalCarecost = variables.getFloat(\"personalCareCopy\",0);\n float healthCarecost = variables.getFloat(\"healthCareCopy\",0);\n float surplus = variables.getFloat(\"surplusCopy\", 0);\n\n float tempNums[] = {utilcost, foodcost, housingcost, debtcost, savingscost, entertainmentcost, personalCarecost, healthCarecost, surplus};\n String categories[] = {\"Utilities\", \"Food\", \"Housing\", \"Debt\", \"Savings\", \"Entertainment\",\n \"Personal Care\", \"Health Care\", \"Surplus\"};\n int chartColors[] = {Color.GREEN, Color.CYAN, Color.RED, Color.BLUE, Color.MAGENTA,\n Color.YELLOW, Color.GRAY, Color.CYAN, Color.DKGRAY};\n\n // Populate chart\n List<PieEntry> CatEntries = new ArrayList<>();\n for (int i = 0; i < categories.length; i++) {\n CatEntries.add(new PieEntry(tempNums[i], categories[i]));\n }\n\n PieDataSet CatDataSet = new PieDataSet(CatEntries, \"Categories\");\n CatDataSet.setColors(chartColors);\n PieData data = new PieData(CatDataSet);\n data.setValueTextSize(11);\n\n // Get chart\n currentChart.setRotationEnabled(true);\n currentChart.animateY(800);\n currentChart.setData(data);\n currentChart.setHoleRadius(14f);\n currentChart.setCenterTextSize(11);\n currentChart.setEntryLabelColor(Color.BLACK);\n currentChart.getDescription().setText(\"Current Budget\");\n currentChart.getDescription().setTextSize(14);\n }", "public DatasetPieChartFiltersComponent() {\n\n //init icon\n this.setStyleName(\"filterbtn\");\n this.addStyleName(\"unselectedpiechart\");\n icon = new Image();\n icon.setSource(defaultTheam);\n this.addComponent(icon);\n icon.setWidth(100, Unit.PERCENTAGE);\n icon.setHeight(100, Unit.PERCENTAGE);\n this.addLayoutClickListener(DatasetPieChartFiltersComponent.this);\n this.setDescription(\"Dataset filters\");\n\n popupBody = new GridLayout(4, 1000);\n\n HorizontalLayout btnsFrame = new HorizontalLayout();\n popupWindow = new PopupWindowFrameWithFunctionsBtns(\"Dataset Explorer\", new VerticalLayout(popupBody), btnsFrame);\n popupWindow.setFrameWidth(screenWidth);\n popupWindow.setFrameHeight(screenHeight - 24);\n //init datasetructure\n activeDatasetMap = new HashMap<>();\n //init pie-chart filters\n this.initIntercativeDatasetFilters();\n HorizontalLayout leftsideWrapper = new HorizontalLayout();\n btnsFrame.addComponent(leftsideWrapper);\n btnsFrame.setComponentAlignment(leftsideWrapper, Alignment.TOP_LEFT);\n leftsideWrapper.setSpacing(true);\n\n InformationButton info = new InformationButton(\"The provided filters allow for the selection of subsets of the available data for the currently selected disease categories. A selection in one chart will result in the other charts updating to show only the remaining options. Click \\\"Apply\\\" to use the filters.\", true);\n leftsideWrapper.addComponent(info);\n\n HorizontalLayout btnLayout = new HorizontalLayout();\n btnLayout.setWidthUndefined();\n btnLayout.setSpacing(true);\n btnsFrame.addComponent(btnLayout);\n btnsFrame.setComponentAlignment(btnLayout, Alignment.MIDDLE_RIGHT);\n\n Button applyFilters = new Button(\"Apply\");\n applyFilters.setDescription(\"Apply the selected filters\");\n applyFilters.setStyleName(ValoTheme.BUTTON_TINY);\n\n btnLayout.addComponent(applyFilters);\n applyFilters.addClickListener((Button.ClickEvent event) -> {\n Set<Integer> filteredSelectionSet = filterSelectionUnit();\n DatasetPieChartFiltersComponent.this.updateSystem(filteredSelectionSet);\n if (selectedDatasetNumbers.size() > 1) {\n applyFilterIcon();\n } else {\n resetFilterIcon();\n }\n popupWindow.view();\n\n });\n\n Button unselectAllBtn = new Button(\"Clear\");\n unselectAllBtn.setStyleName(ValoTheme.BUTTON_TINY);\n btnLayout.addComponent(unselectAllBtn);\n btnLayout.setComponentAlignment(unselectAllBtn, Alignment.TOP_LEFT);\n unselectAllBtn.setDescription(\"Clear all selections\");\n unselectAllBtn.addClickListener((Button.ClickEvent event) -> {\n singlefilter = false;\n DatasetPieChartFiltersComponent.this.resetFilters();\n\n });\n\n }", "@Override\n public void run() {\n XYChart.Data<Number, Number> data = new XYChart.Data<>(-x, y);\n data.setNode(new Circle(5, javafx.scene.paint.Color.GREY));\n series.getData().add(data);\n lineChart.getData().add(series);\n }", "public static void main(String[] args) throws Exception {\n Presentation presentation = new Presentation();\r\n\r\n //Load the file from disk.\r\n presentation.loadFromFile(\"data/VaryColorsOfSameSeriesDataMarkers.pptx\");\r\n\r\n //Get the chart from the presentation.\r\n IChart chart = (IChart)presentation.getSlides().get(0).getShapes().get(0);\r\n\r\n //Create a ChartDataPoint object and specify the index.\r\n ChartDataPoint dataPoint = new ChartDataPoint(chart.getSeries().get(0));\r\n dataPoint.setIndex(0);\r\n\r\n //Set the fill color of the data marker.\r\n dataPoint.getMarkerFill().getFill().setFillType(FillFormatType.SOLID);\r\n dataPoint.getMarkerFill().getFill().getSolidColor().setColor(Color.RED);\r\n\r\n //Set the line color of the data marker.\r\n dataPoint.getMarkerFill().getLine().setFillType(FillFormatType.SOLID);\r\n dataPoint.getMarkerFill().getLine().getSolidFillColor().setColor(Color.RED);\r\n\r\n //Add the data point to the point collection of a series.\r\n chart.getSeries().get(0).getDataPoints().add(dataPoint);\r\n\r\n dataPoint = new ChartDataPoint(chart.getSeries().get(0));\r\n dataPoint.setIndex(1);\r\n //Set the fill color of the data marker.\r\n dataPoint.getMarkerFill().getFill().setFillType(FillFormatType.SOLID);\r\n dataPoint.getMarkerFill().getFill().getSolidColor().setColor(Color.BLACK);\r\n\r\n //Set the line color of the data marker.\r\n dataPoint.getMarkerFill().getLine().setFillType(FillFormatType.SOLID);\r\n dataPoint.getMarkerFill().getLine().getSolidFillColor().setColor(Color.BLACK);\r\n chart.getSeries().get(0).getDataPoints().add(dataPoint);\r\n\r\n dataPoint = new ChartDataPoint(chart.getSeries().get(0));\r\n dataPoint.setIndex(2);\r\n //Set the fill color of the data marker.\r\n dataPoint.getMarkerFill().getFill().setFillType(FillFormatType.SOLID);\r\n dataPoint.getMarkerFill().getFill().getSolidColor().setColor(Color.BLUE);\r\n\r\n //Set the line color of the data marker.\r\n dataPoint.getMarkerFill().getLine().setFillType(FillFormatType.SOLID);\r\n dataPoint.getMarkerFill().getLine().getSolidFillColor().setColor(Color.BLUE);\r\n chart.getSeries().get(0).getDataPoints().add(dataPoint);\r\n\r\n String result = \"output/varyColorsOfSameSeriesDataMarkers_result.pptx\";\r\n\r\n //Save to file.\r\n presentation.saveToFile(result, FileFormat.PPTX_2010);\r\n }", "public void MakeBar() {\n\t\tBarButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(GetBarChartImage())));\t\n\t\tBarButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Bar chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BarButton);\t\n\t}", "public GUIVerbrauchsdiagramm(String title, EnergyData energyData) {\n super(title);\n this.energyData = energyData;\n setExtendedState(JFrame.MAXIMIZED_BOTH);\n ChartPanel chartPanel = (ChartPanel) createPanel(energyData);\n\n buttonGroup.add(verbrauchDiagramm);\n buttonGroup.add(zaehlerDiagramm);\n pRadiobuttons.add(verbrauchDiagramm);\n pRadiobuttons.add(zaehlerDiagramm);\n pRadiobuttons.setBorder(new EmptyBorder(0, 20, 0, 0));\n verbrauchDiagramm.setSelected(true);\n tDate.setForeground(Color.gray);\n\n pSkipDay.setLayout(new GridLayout(1, 7, 5, 0));\n pSkipDay.add(bBackwardsM);\n pSkipDay.add(bBackwardsW);\n pSkipDay.add(bBackwards);\n pSkipDay.add(tDate);\n pSkipDay.add(bForwards);\n pSkipDay.add(bForwardsW);\n pSkipDay.add(bForwardsM);\n\n pDate.add(lCurrentDate);\n pDate.add(lEmpty2);\n pDate.add(pSkipDay);\n\n\n pCsv.add(bExportCSV);\n pCsv.add(lEmpty);\n pCsv.add(bExportJSON);\n\n\n pHeader.add(pRadiobuttons);\n pHeader.add(pDate);\n pHeader.add(pCsv);\n\n this.add(chartPanel, BorderLayout.CENTER);\n this.add(pHeader, BorderLayout.NORTH);\n\n //Actionlistener\n ActionListener actionListenerDiagramm = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (verbrauchDiagramm.isSelected()) {\n System.out.println(\"Verbrauchsdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetVerbrauchsdiagramm(energyData);\n chart.setTitle(\"Stromzählerübersicht\");\n }\n if (zaehlerDiagramm.isSelected()) {\n System.out.println(\"Zählerdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetZaehlerdiagramm(energyData);\n chart.setTitle(\"Zählerstand\");\n }\n }\n };\n\n bExportCSV.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n try {\n JFileChooser fileChooser = new JFileChooser(\"./CSV\");\n fileChooser.setDialogTitle(\"CSV-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.csv\",\"csv\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".csv\")){\n path = path +\".csv\";\n }\n FileHandler.writeCSV(map,path);\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden in ein CSV-File exportiert\");\n }\n });\n\n bExportJSON.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n FileHandler.saveJSON(map);\n\n try {\n JFileChooser fileChooser = new JFileChooser(\"./JSON\");\n fileChooser.setDialogTitle(\"JSON-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.json\",\"json\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".json\")){\n path = path +\".json\";\n }\n FileWriter fileWriter = new FileWriter(path);\n fileWriter.write(FileHandler.saveJSON(map));\n fileWriter.flush();\n fileWriter.close();\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden zum JSON exportiert \\n\" + \"https://api.npoint.io/0dc854da1619aca3be45\");\n }\n });\n\n bForwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, true);\n }\n });\n\n bBackwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, false);\n }\n });\n bBackwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, false);\n }\n });\n bForwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, true);\n }\n });\n bBackwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, false);\n }\n });\n bForwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, true);\n }\n });\n\n /*chart.getXYPlot().addChangeListener(new PlotChangeListener() {\n @Override\n public void plotChanged(PlotChangeEvent plotChangeEvent) {\n XYPlot plot = plotChangeEvent.getPlot().getChart().getXYPlot();\n PlotChangeListener plotChangeListener = this;\n\n plot.removeChangeListener(plotChangeListener);\n long upperBound = (long) plot.getDomainAxis().getUpperBound();\n long lowerBound = (long) plot.getDomainAxis().getLowerBound();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(upperBound / 900000 * 900000);\n upperBound = calendar.getTimeInMillis();\n\n calendar.setTimeInMillis(lowerBound / 900000 * 900000);\n lowerBound = calendar.getTimeInMillis();\n System.out.println(new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\").format(new Date(lowerBound)));\n\n System.out.println(getEnergyData().getSdatData().containsKey(lowerBound));\n\n double highestValue = 0;\n if (getEnergyData().getSdatData().containsKey(lowerBound)) {\n for (long i = lowerBound; i < upperBound; i = i + 86400000) {\n if (getEnergyData().getSdatData().get(i).getRelativBezug() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getRelativBezug();\n\n }\n if (getEnergyData().getSdatData().get(i).getRelativeEinspeisung() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getZaehlerstandEinspeisung();\n }\n }\n\n System.out.println(highestValue);\n System.out.println(highestValue + 1);\n\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(highestValue + 1);\n }else {\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(plot.getRangeAxis().getUpperBound());\n }\n plot.addChangeListener(plotChangeListener);\n\n }\n\n });\n */\n\n tDate.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent e) {\n checkDate(e);\n }\n\n @Override\n public void keyPressed(KeyEvent e) {\n\n }\n\n @Override\n public void keyReleased(KeyEvent e) {\n\n }\n });\n\n tDate.addFocusListener(new FocusListener() {\n @Override\n public void focusGained(FocusEvent e) {\n if (tDate.getText().equals(\"Datum:\")) {\n tDate.setText(\"\");\n tDate.setForeground(Color.BLACK);\n }\n }\n\n @Override\n public void focusLost(FocusEvent e) {\n if (tDate.getText().isEmpty()) {\n tDate.setForeground(Color.GRAY);\n tDate.setText(\"Datum:\");\n }\n }\n });\n\n\n verbrauchDiagramm.addActionListener(actionListenerDiagramm);\n zaehlerDiagramm.addActionListener(actionListenerDiagramm);\n }", "public void clickedRepDC(Button button) {\r\n textShape.setText(\"DC Case Fatality Ratios by Race\");\r\n this.updateRace(0);\r\n this.updateCFR(0);\r\n this.updateBar(0);\r\n }", "public void act() \n {\n setImage(new GreenfootImage(\"== Total Pembayaran ==\",50,Color.yellow,Color.black));\n }", "public void MakeBar3D() {\n\t\tBarButton3D = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t\tGet3DBarChartImage())));\n\t\tBarButton3D.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\t\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart3D(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"3D Bar Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart3D(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\t\n\t\t\n\t\tChartTypeInterface.add(BarButton3D);\n\t}", "public testChart() {\n initComponents();\n }", "public void dibujarPieza(Canvas canvas, Pieza[] pieza){\r\n tablero.pintarCelda(tablero.getTipoPieza()[this.pieza[0].x][this.pieza[0].y], canvas);\r\n tablero.pintarCelda(tablero.getTipoPieza()[this.pieza[1].x][this.pieza[1].y], canvas);\r\n tablero.pintarCelda(tablero.getTipoPieza()[this.pieza[2].x][this.pieza[2].y], canvas);\r\n tablero.pintarCelda(tablero.getTipoPieza()[this.pieza[3].x][this.pieza[3].y], canvas);\r\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tPieSlice s;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfloat temp=0,total=0;\n\t\t\t\t\t\tfor (int i = 0; i < pg.getSlices().size(); i++) {\n\t\t\t\t\t\t\ttemp=Float.parseFloat(BackgroundService.itemdata[i][4]);\n\t\t\t\t\t\t\ts = pg.getSlice(i);\n\t\t\t\t\t\t\ts.setGoalValue(temp);\n\t\t\t\t\t\t\ttotal+=temp;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int i = 0; i < pg.getSlices().size(); i++) {\n\t\t\t\t\t\t\ttemp=Float.parseFloat(BackgroundService.itemdata[i][4]);\n\t\t\t\t\t\t\ttper[i].setText((int)(temp/total*100+0.5) + \"%\");\n\t\t\t\t\t\t\tttime[i].setText((int)(temp/120) + \"d\" +(int)(temp%120)/5 +\"h\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpg.setInterpolator(new AccelerateDecelerateInterpolator());\n\t\t\t\t\t\tpg.setAnimationListener(getAnimationListener());\n\t\t\t\t\t\tpg.animateToGoalValues();\n\n\t\t\t\t\t}", "@Override\n public void onResponse(String response) {\n\n try {\n JSONObject jsonObject = new JSONObject(response);\n\n total_case_str = jsonObject.getString(\"cases\");\n recovered_str = jsonObject.getString(\"recovered\");\n deaths_str = jsonObject.getString(\"deaths\");\n active_str = jsonObject.getString(\"active\");\n\n total_case_txt.setText(NumberFormat.getInstance().format(Integer.parseInt(total_case_str)));\n recovered_txt.setText(NumberFormat.getInstance().format(Integer.parseInt(recovered_str)));\n deaths_txt.setText(NumberFormat.getInstance().format(Integer.parseInt(deaths_str)));\n active_txt.setText(NumberFormat.getInstance().format(Integer.parseInt(active_str)));\n affectedcountries_txt.setText(jsonObject.getString(\"affectedCountries\"));\n\n pieChart.addPieSlice(new PieModel(\"Cases\", Integer.parseInt(total_case_str), Color.parseColor(\"#FFA726\")));\n pieChart.addPieSlice(new PieModel(\"Recovered\", Integer.parseInt(recovered_str), Color.parseColor(\"#66BB6A\")));\n pieChart.addPieSlice(new PieModel(\"Deaths\", Integer.parseInt(deaths_str), Color.parseColor(\"#EF5350\")));\n pieChart.addPieSlice(new PieModel(\"Active\", Integer.parseInt(active_str), Color.parseColor(\"#29B6F6\")));\n\n pieChart.startAnimation();\n\n // simpleArcLoader.stop();\n progressDialog.setVisibility(View.GONE);\n //simpleArcLoader.setVisibility(View.GONE);\n scrollView.setVisibility(View.VISIBLE);\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n\n progressDialog.setVisibility(View.GONE);\n //simpleArcLoader.stop();\n //simpleArcLoader.setVisibility(View.GONE);\n scrollView.setVisibility(View.VISIBLE);\n }\n\n }", "public void onClick(View v) {\n\t \t\t\tSeriesSelection seriesSelection = mChartView.getCurrentSeriesAndPoint();\n\t \t\t\tif (seriesSelection == null) {\n\t \t\t\t\tToast.makeText(XYChartActivity.this, \"No chart element\", Toast.LENGTH_SHORT).show();\n\t \t\t\t} else {\n\t \t\t\t\t// display information of the clicked point\n\t \t\t\t\tToast.makeText(\n\t \t\t\t\t\t\tXYChartActivity.this,\n\t \t\t\t\t\t\t\"Chart element in series index \" + seriesSelection.getSeriesIndex()\n\t \t\t\t\t\t\t+ \" data point index \" + seriesSelection.getPointIndex() + \" was clicked\"\n\t \t\t\t\t\t\t+ \" closest point value X=\" + seriesSelection.getXValue() + \", Y=\"\n\t \t\t\t\t\t\t+ seriesSelection.getValue(), Toast.LENGTH_SHORT).show();\n\t \t\t\t}\n\t \t\t}", "public ChartFrame(Chart chart) {\r\n\t\tthis.chart = chart;\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c = 0; c < seatGrid[r].length; c++) {\r\n\t\t\t\tJLabel label = new JLabel();\r\n\t\t\t\tlabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n\t\t\t\tseatGrid[r][c] = label;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tremoveBtn = new JButton(\"Remove\");\r\n\t\tremoveBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonRemoveClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taddBtn = new JButton(\"Add\");\r\n\t\taddBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonAddClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tswapBtn = new JButton(\"Swap\");\r\n\t\tswapBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonSwapClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tloadBtn = new JButton(\"Load\");\r\n\t\tloadBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonLoadClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmoveBtn = new JButton(\"Move\");\r\n\t\tmoveBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonMoveClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));\r\n\t\tpanel.setLayout(new GridLayout(7, 5));\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c = 0; c < seatGrid[r].length; c++) {\r\n\t\t\t\tpanel.add(seatGrid[r][c]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < seatGrid[0].length; i++) {\r\n\t\t\tpanel.add(Box.createHorizontalGlue());\r\n\t\t}\r\n\r\n\t\tpanel.add(removeBtn);\r\n\t\tpanel.add(addBtn);\r\n\t\tpanel.add(loadBtn);\r\n\t\tpanel.add(swapBtn);\r\n\t\tpanel.add(moveBtn);\r\n\r\n\t\tadd(panel);\r\n\t\tsetSize(500, 400);\r\n\t\tsetVisible(true);\r\n\t\tsetTitle(\"Seating Chart\");\r\n\t\tupdate();\r\n\r\n\t}", "public void plotAction() {\n final PlotProperties props = new PlotProperties();\n addPlotRegister(props);\n\n final PlotManager pm = this.manager.getPlotManager();\n pm.showPlotUI(props);\n }", "public void SetPieChartImage(String pie) {\n\t\tboolean test = true;\n\t\t\n\t\tif((pie.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"SetPieChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((pie.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"SetPieChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"SetPieChartImage():: chosen image is set to: \" \n\t\t \t+ pie);\n\t\t}\n\t\tm_PieChartImage = pie;\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) { \n \n XYChart.Series series = new XYChart.Series<>();\n \n \n series.setName(\"Gagnant\");\n series.getData().add(new XYChart.Data(\"Jan\", 100));\n series.getData().add(new XYChart.Data(\"Fev\", 170));\n series.getData().add(new XYChart.Data(\"Mars\", 197));\n series.getData().add(new XYChart.Data(\"Avr\", 160));\n series.getData().add(new XYChart.Data(\"Mai\", 165));\n series.getData().add(new XYChart.Data(\"Juin\", 179));\n series.getData().add(new XYChart.Data(\"Juil\", 195));\n series.getData().add(new XYChart.Data(\"Aout\", 140));\n series.getData().add(new XYChart.Data(\"Sept\", 121));\n series.getData().add(new XYChart.Data(\"Oct\", 173));\n series.getData().add(new XYChart.Data(\"Nov\", 185));\n series.getData().add(new XYChart.Data(\"Dec\", 150));\n \n XYChart.Series perdant = new XYChart.Series<>();\n perdant.setName(\"Perdant\");\n \n perdant.getData().add(new XYChart.Data(\"Jan\", 80));\n perdant.getData().add(new XYChart.Data(\"Fev\", 60));\n perdant.getData().add(new XYChart.Data(\"Mars\", 80));\n perdant.getData().add(new XYChart.Data(\"Avr\", 70));\n perdant.getData().add(new XYChart.Data(\"Mai\", 70));\n perdant.getData().add(new XYChart.Data(\"Juin\", 60));\n perdant.getData().add(new XYChart.Data(\"Juil\", 100));\n perdant.getData().add(new XYChart.Data(\"Aout\", 80));\n perdant.getData().add(new XYChart.Data(\"Sept\", 50));\n perdant.getData().add(new XYChart.Data(\"Oct\", 79));\n perdant.getData().add(new XYChart.Data(\"Nov\", 70));\n perdant.getData().add(new XYChart.Data(\"Dec\", 12));\n \n\n Tooltip tooltip = new Tooltip(\"Le nombre de gagnants ou cours des mois augmentent souvent.\");\n areaChart.getStylesheets().add(\"-fx-color:green;\");\n areaChart.getData().addAll(series, perdant);\n BarChart.getStylesheets().add(\"chart-bar series<1> bar-legend-symbol default-color<red>\");\n BarChart.getData().addAll(perdant);\n\n\n }", "private Chart(){}", "@Override\r\n \t\t\t\tpublic void onClick(View v) {\n \t\t\t\t\t\r\n \t\t\t\t\tmRenderer.setZoomButtonsVisible(false);\r\n \t\t\t\t\t\r\n \t\t\t\t\t/*Bitmap bmp = Bitmap.createBitmap( 800, 600, Bitmap.Config.ARGB_8888 );\r\n \t\t\t\t\t\r\n \t\t\t\t\t//Bitmap bmp =Bitmap.createBitmap( mChart.getMeasuredWidth(),mChart.getMeasuredHeight(), Bitmap.Config.ARGB_8888 );\r\n \t\t\t\t\t\r\n \t\t\t\t\tCanvas canvas = new Canvas(bmp);\r\n \t\t\t\t\tmChart.draw( canvas );\r\n \t\t\t\t\t\r\n \t\t\t\t\tFile myDir = new File(Environment.getExternalStorageDirectory() + File.separator + \"SpeakingTime Graphs\"); //pour créer le repertoire dans lequel on va mettre notre fichier\r\n \t\t if (!myDir.exists()) {\r\n \t\t \tmyDir.mkdir(); //On crée le répertoire (s'il n'existe pas!!)\r\n \t\t }\r\n \t\t\t\t\t\r\n \t\t\t\t\tFileOutputStream out = null;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tout = new FileOutputStream(Environment.getExternalStorageDirectory() + File.separator + \"SpeakingTime Graphs\" + File.separator + name.substring(0, name.length() - 4) + \"_bargraph.jpg\");\r\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n \t\t\t\t\tbmp.compress( Bitmap.CompressFormat.JPEG, 97, out );\r\n \t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tout.close();\r\n\t\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}*/\r\n \t\t\t\t\t\r\n \t\t\t\t\tModalDialog modalDialog = new ModalDialog();\r\n\t\t\t\t\t\tString boxplots_name = modalDialog.showModalDialogReunionName(BarGraphActivity.this, \"Give a name to this graph\"); \t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (boxplots_name != \"Cancel\"){\r\n\t\t\t\t\t\t\tif (boxplots_name.equalsIgnoreCase(\"\")){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tAlertDialog.Builder alertDialog = new AlertDialog.Builder(BarGraphActivity.this);\r\n\t\t\t\t\t\t\t\talertDialog.setTitle(\"Warning\");\r\n\t\t\t\t\t\t\t\talertDialog.setMessage(\"GIVE A VALID NAME !\");\r\n\t\t\t\t\t\t\t\talertDialog.show();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (SaveGraphOnDisk(boxplots_name) == \"error\") {\r\n\t\t \t\t\t\t\t\tAlertDialog.Builder alertDialog = new AlertDialog.Builder(BarGraphActivity.this);\r\n\t\t\t\t\t\t\t\t\talertDialog.setTitle(\"Warning\");\r\n\t\t\t\t\t\t\t\t\talertDialog.setMessage(\"The graph can't be saved !\");\r\n\t\t\t\t\t\t\t\t\talertDialog.show();\r\n\t\t \t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n \t\t\t\t\t\r\n \t\t\t\t\t\r\n \t\t\t\t\t\r\n \t\t\t\t\tmRenderer.setZoomButtonsVisible(true);\r\n \t\t\t\t}", "public PieChartObserver(CourseData data) {\n Types.add(ObserverType.CREATE);\n Types.add(ObserverType.UPDATE);\n Types.add(ObserverType.REMOVE);\n data.attach(this);\n this.courseData = data.getUpdate();\n this.setPreferredSize(new Dimension(2 * LayoutConstants.xOffset\n + (LayoutConstants.barSpacing + LayoutConstants.barWidth)\n * this.courseData.size(), LayoutConstants.graphHeight + 2\n * LayoutConstants.yOffset));\n this.setBackground(Color.white);\n }", "@Override\r\n\tprotected void generateChart() throws Exception {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\tint max = 100;\n\t\t\t int min = 1;\n\t\t\t\tRandom random = new Random();\n\t\t\t\tint p = random.nextInt(max)%(max-min+1) + min;\t\t\t\t\t\n\t\t\t\tfloat pf = p / 100f;\n\t\t\t\tchart.setCurrentStatus(pf);\n\t\t\t\tchart.invalidate();\n\t\t\t}", "@Override\n public void onClick() {\n // TODO: Disabled adding shape on just click. It should be added inside the BPMNDiagram by default.\n // log(Level.FINE, \"Palette: Adding \" + description);\n // addShapeToCanvasEvent.fire(new AddShapeToCanvasEvent(definition, factory));\n }", "private void addGraphButton() {\n\t\tgraphButton = new JButton(\"Graph\");\n\t\tadd (graphButton, SOUTH);\n\t\tgraphButton.addActionListener(this);\n\t}", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g); // Wipes the screen\n\n\n if (array != null) {\n if (btnCircles.isSelected()) {\n // Circle\n\n float angle = (float) (2.0f * Math.PI / array.get_array_length());\n for (int i = 0; i < array.get_array_length(); i++) {\n // Change color via hue\n Color c = Color.getHSBColor(1.0f * array.get_value(i) / array.get_max_int(), 1.0f, 0.7f);\n g.setColor(c);\n\n // tRiGoNoMeTrY iS uSeFuL\n int[] x = {0, 0, 0};\n int[] y = {0, 0, 0};\n x[0] = canvas.getWidth() / 2;\n y[0] = canvas.getHeight() / 2;\n x[1] = (int) (x[0] * Math.cos((i) * angle + Math.PI / 2.0f) + x[0]);\n y[1] = (int) (y[0] * -Math.sin((i) * angle + Math.PI / 2.0f) + y[0]);\n x[2] = (int) (x[0] * Math.cos((i + 1) * angle + Math.PI / 2.0f) + x[0]);\n y[2] = (int) (y[0] * -Math.sin((i + 1) * angle + Math.PI / 2.0f) + y[0]);\n\n g.fillPolygon(x, y, 3);\n }\n } else {\n // Bars\n\n // Calculate box width and heights\n float column_width = 1.0f * canvas.getWidth() / array.get_array_length();\n float row_height = 1.0f * (canvas.getHeight()) / array.get_max_int();\n\n for (int i = 0; i < array.get_array_length(); i++) {\n // Change color\n Color c = Color.getHSBColor(1.0f * array.get_value(i) / array.get_max_int(), 1.0f, 0.7f);\n g.setColor(c);\n\n // Calculate x and y positions\n float x = i * column_width;\n x = Math.max(x, 1.0f);\n float y = canvas.getHeight() - (array.get_value(i) * row_height);\n\n // Draw box\n g.fillRect((int) x, (int) y, (int) column_width, canvas.getHeight() - (int) y);\n }\n }\n }\n }", "@Test\n public void test70() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) null);\n Color color0 = (Color)combinedDomainCategoryPlot0.getRangeGridlinePaint();\n CategoryAxis categoryAxis0 = combinedDomainCategoryPlot0.getDomainAxis();\n JFreeChart jFreeChart0 = new JFreeChart((Plot) combinedDomainCategoryPlot0);\n ChartPanel chartPanel0 = new ChartPanel(jFreeChart0, (-1369), (-797), (-797), (-797), (-797), (-797), true, false, true, true, false, false);\n ChartRenderingInfo chartRenderingInfo0 = chartPanel0.getChartRenderingInfo();\n PlotRenderingInfo plotRenderingInfo0 = new PlotRenderingInfo(chartRenderingInfo0);\n Button button0 = null;\n try {\n button0 = new Button(\"yw{>Kt*0}\");\n } catch(HeadlessException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"java.awt.GraphicsEnvironment\", e);\n }\n }", "public void mouseClicked(MouseEvent e) {\r\n //panel.addCircle(new Circle(e.getX(), e.getY(), 24, Color.BLUE));\r\n // super.mouseClicked(e);\r\n water.addWater(e.getX(), e.getY(), 50);\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n redChart = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n redLimiar = new javax.swing.JSpinner();\n redPre = new javax.swing.JButton();\n redAplic = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n redStats = new javax.swing.JTextPane();\n jLabel1 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n redEixX = new javax.swing.JComboBox();\n redEixY = new javax.swing.JComboBox();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\" Principal Component Analysis (PCA)\");\n setIconImage(null);\n setResizable(false);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n redChart.setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout redChartLayout = new javax.swing.GroupLayout(redChart);\n redChart.setLayout(redChartLayout);\n redChartLayout.setHorizontalGroup(\n redChartLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n redChartLayout.setVerticalGroup(\n redChartLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 277, Short.MAX_VALUE)\n );\n\n jPanel2.setBackground(new java.awt.Color(255, 255, 255));\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Configuração\"));\n\n jLabel2.setText(\"<html>\\n<p>\\nA avaliação de desempenho será realizada através do <strong>k-NN</strong> com a <strong>configuração atual</strong>.\\n</p>\\n<p>\\n*A base de dados será automaticamente normalizada, caso ainda não seja.\\n</p>\\n</html>\");\n\n jLabel3.setText(\"Porcentagem de variância coberta pelas componentes principais:\");\n\n redLimiar.setModel(new javax.swing.SpinnerNumberModel(0.95d, 0.1d, 1.0d, 0.05d));\n\n redPre.setText(\"Pré-Visualizar\");\n redPre.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n redPreActionPerformed(evt);\n }\n });\n\n redAplic.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n redAplic.setText(\"Aplicar*\");\n redAplic.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n redAplicActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(redLimiar, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(redPre, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(redAplic, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(redLimiar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(redAplic)\n .addComponent(redPre))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n redStats.setFont(new java.awt.Font(\"Courier New\", 0, 10)); // NOI18N\n redStats.setFocusable(false);\n jScrollPane2.setViewportView(redStats);\n\n jLabel1.setText(\"Eixo X:\");\n\n jLabel4.setText(\"Eixo Y:\");\n\n redEixX.setMaximumSize(new java.awt.Dimension(384, 32767));\n redEixX.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n changeAxis(evt);\n }\n });\n\n redEixY.setMaximumSize(new java.awt.Dimension(384, 32767));\n redEixY.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n changeAxis(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(redChart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(redEixY, javax.swing.GroupLayout.PREFERRED_SIZE, 384, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(redEixX, javax.swing.GroupLayout.PREFERRED_SIZE, 384, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2))\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(redEixX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(redEixY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(redChart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jScrollPane2))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "public void MakeLine() {\n\t\tLineButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetLineChartImage())));\n\t\tLineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Line Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(LineButton);\n\t}", "public void clickedRepVA(Button button) {\r\n textShape.setText(\"VA Case Fatality Ratios by Race\");\r\n this.updateRace(5);\r\n this.updateCFR(5);\r\n this.updateBar(5);\r\n }", "@Override\n \tpublic void onClick(View arg0) {\n \t\ttry{\n \t\t\tSeriesSelection selectedPoint = lineGraph.getCurrentSeriesAndPoint();\n \n \t\t\tif(selectedPoint!=null)\n \t\t\t{\n \t\t\t\tString time = xAxisLabelsFinal[(int)selectedPoint.getXValue()];\n \n \t\t\t\tdouble amount=(double)selectedPoint.getValue();\n \t\t\t\t\n \t\t\t\tToast.makeText(caller.getBaseContext(), \"Crowdedness at \" + time + \": \" + amount + \"%\", Properties.TOAST_DEFAULT_DURATION).show();\n \t\t\t}\n \t\t} catch(Exception e){\n \t\t\t\n \t\t}\n \t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.BLUE;\n\t\t\t}", "private void btnSiguienteMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnSiguienteMouseClicked\r\n \r\n if(PanelBalanceGeneral.getX() != 0){\r\n \r\n Contador++;\r\n Avanzar();\r\n \r\n if(PanelBalanceGeneral.getX() == 0){PanelActual = Paneles[1];}\r\n \r\n if(Contador-1 >= 0){\r\n \r\n btnAnterior.setToolTipText(Paneles[Contador-1]);\r\n btnSiguiente.setToolTipText(Paneles[Contador+1]);\r\n \r\n }\r\n \r\n }\r\n // TODO add your handling code here:\r\n }", "private void addCharts() {\n piechartPanel.removeAll();\n piechartPanel.validate();\n piechartPanel.repaint();\n\n barschartPanel.removeAll();\n barschartPanel.validate();\n barschartPanel.repaint();\n if (cpanel != null) {\n cpanel = null;\n }\n pieChart = new PieChart(collection, 0, type, cb_sort.isSelected()).chart;\n barsChart = new BarsChart(collection, 0, type, cb_sort.isSelected()).chart;\n cpanel = new ChartPanel(pieChart);\n cpanel.setSize(piechartPanel.getSize());\n piechartPanel.add(cpanel);\n piechartPanel.getParent().validate();\n cpanel = new ChartPanel(barsChart);\n cpanel.setSize(barschartPanel.getSize());\n barschartPanel.add(cpanel);\n barschartPanel.getParent().validate();\n }", "private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n\n JTable curTable = jTable1;\n Curpan = jPanel3;\n\n if (jCheckBox1.isSelected()) {\n int succ = curTable.getRowCount();\n Cloud cloud = new Cloud();\n JPanel panel = new JPanel();\n panel.setLayout(new MigLayout(\"wrap 7\"));\n for (int i = 0; i < succ; i++) {\n for (int j = 0; j < Integer.parseInt(curTable.getModel().getValueAt(i, 1).toString()); j++) {\n cloud.addTag(curTable.getModel().getValueAt(i, 0).toString());\n }\n }\n for (Tag tag : cloud.tags()) {\n final JLabel label = new JLabel(tag.getName());\n label.setOpaque(false);\n label.setFont(label.getFont().deriveFont((float) tag.getWeight() * 10));\n panel.add(label);\n }\n // panel.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\n Curpan.removeAll();\n Curpan.revalidate();\n panel.setSize(300, 300);\n Curpan.setLayout(new BorderLayout());\n Curpan.add(panel, BorderLayout.CENTER);\n Curpan.revalidate();\n panel.setVisible(true);\n Curpan.setVisible(true);\n\n } else {\n int succ = curTable.getRowCount();\n final DefaultCategoryDataset dataset = new DefaultCategoryDataset();\n for (int i = 0; i < succ; i++) {\n dataset.addValue(i, curTable.getModel().getValueAt(i, 0).toString(), curTable.getModel().getValueAt(i, 1).toString());\n }\n JFreeChart barChart = ChartFactory.createBarChart(\n \"\",\n \"frequency\",\n \"count\",\n dataset,\n PlotOrientation.VERTICAL,\n true, true, false);\n ChartPanel chartPanel = new ChartPanel(barChart);\n chartPanel.setPreferredSize(new java.awt.Dimension(300, 300));\n\n Curpan.removeAll();\n Curpan.revalidate();\n Curpan.setLayout(new BorderLayout());\n Curpan.add(chartPanel, BorderLayout.CENTER);\n Curpan.revalidate();\n chartPanel.setVisible(true);\n Curpan.setVisible(true);\n\n }\n }" ]
[ "0.6850471", "0.6803696", "0.6739462", "0.65822005", "0.6573858", "0.6536158", "0.64849865", "0.64281327", "0.6341153", "0.6274888", "0.62411815", "0.6182812", "0.6180296", "0.6175342", "0.60975146", "0.60881984", "0.60524", "0.6047356", "0.6001686", "0.5994859", "0.599413", "0.5969329", "0.59208566", "0.58642864", "0.58099633", "0.58097637", "0.57982725", "0.5792462", "0.57875", "0.5765789", "0.57455564", "0.5743101", "0.5720609", "0.5718043", "0.5702094", "0.57018733", "0.5700576", "0.56818426", "0.5680821", "0.56802154", "0.565863", "0.5645966", "0.5630656", "0.5580243", "0.55710953", "0.55604947", "0.55224305", "0.5521382", "0.5510588", "0.5500935", "0.5495321", "0.54927605", "0.54913276", "0.54737496", "0.54721916", "0.54532015", "0.544547", "0.543951", "0.5429868", "0.5428376", "0.54214025", "0.5399743", "0.53910875", "0.5390412", "0.53902924", "0.5385551", "0.5381917", "0.5379697", "0.53686243", "0.53599733", "0.5353288", "0.5332423", "0.5322854", "0.5310503", "0.5303863", "0.53011847", "0.5299918", "0.5298482", "0.5280627", "0.52763873", "0.5271806", "0.52618235", "0.5259766", "0.52543586", "0.5249898", "0.52492774", "0.5237098", "0.523375", "0.5229986", "0.5226183", "0.5215022", "0.52130187", "0.51956445", "0.5193223", "0.5175767", "0.5168245", "0.5162492", "0.51401573", "0.51399595", "0.5123304" ]
0.7825764
0
Makes the Scatter Plot Chart button
public void MakeScatter() { ScatterButton = new JButton( new ImageIcon(getClass().getResource( GetScatterPlotChartImage()))); ScatterButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { GetHost().instructionText.setVisible(false); GetHost().ExportEnabled(); if(GetHost().GetTitle() == UNSET) { GetHost().LeftPanelContent(new ScatterGraph( GetHost().GetGraphData(), "Scatter Plot Chart ", GetHost().GetColourScheme(),GetHost())); }else { GetHost().LeftPanelContent(new ScatterGraph( GetHost().GetGraphData(), GetHost().GetTitle(), GetHost().GetColourScheme(),GetHost())); } } }); ChartTypeInterface.add(ScatterButton); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void toggleButton_actionPerformed(ActionEvent e) {\n this.togglePlot();\n }", "public void MakeXYSpline() {\n\t\tXYSplineButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetXYSplineChartImage())));\n\t\tXYSplineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new XYSplineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"XYSpline Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new XYSplineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(XYSplineButton);\t\n\t}", "public void plotAction() {\n final PlotProperties props = new PlotProperties();\n addPlotRegister(props);\n\n final PlotManager pm = this.manager.getPlotManager();\n pm.showPlotUI(props);\n }", "public void chartMouseClicked(ChartMouseEvent event) {\n }", "private void addGraphButton() {\n\t\tgraphButton = new JButton(\"Graph\");\n\t\tadd (graphButton, SOUTH);\n\t\tgraphButton.addActionListener(this);\n\t}", "public void onPlot(View view) {\r\n\t\t// Respond to the button click\r\n\t\tIntent intent = new Intent(this, PlotActivity.class);\r\n\t\tstartActivity(intent);\t\r\n\t}", "@Override\r\n public void chartMouseClicked(ChartMouseEvent cme) {\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\t \n\t\t for(int g = 0;g<i;g++){\n\t\t String s = String.valueOf(datas[1][g]);\n\t\t data.addValue(this.datas[2][g], this.name[g], s);\n\t\t }\n\t\t \n\t\t if(e.getSource() == button1){\n\t\t JFreeChart chart = ChartFactory.createLineChart(\"Import Volume\",\n\t\t \"Year\",\n\t\t \"Ton\",\n\t\t data,\n\t\t PlotOrientation.VERTICAL,\n\t\t true,\n\t\t false,\n\t\t false);\n\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t add(cpanel, BorderLayout.CENTER);\n\t\t setVisible(true);\n\t\t } else if(e.getSource() == button2){\n\t\t\t JFreeChart chart = ChartFactory.createBarChart(\"Import Volume\",\n \"Year\",\n \"Ton\",\n data,\n PlotOrientation.VERTICAL,\n true,\n false,\n false);\n\t\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t\t add(cpanel, BorderLayout.CENTER);\n\t\t\t setVisible(true);\n} \n\n\t\t\n\t}", "public void MakeBubble() {\n\t\tBubbleButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetBubbleChartImage())));\n\t\tBubbleButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetColumns().length >= 3){\n\t\t\t\t\t\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\tGetHost().LeftPanelContent(new BubbleChart(\n\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\"Bubble Chart\", \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost()));\n\t\t\t\t\t}else {\n\t\t\t\t\t\tGetHost().LeftPanelContent(new BubbleChart(\n\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost()));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"You must have three columns selected to use this chart\", \n\t\t\t\t\t\"Bubble Chart Format\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BubbleButton);\n\t}", "public void togglePlot(){\n panel.removeAll();\n graphPanel.togglePlot(buttonControlPanel);\n panel.add(graphPanel, new GridBagConstraints( 0, 0, 1, 1, 1.0, 1.0\n , GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets( 0, 0, 0, 0 ), 0, 0 ));\n panel.validate();\n panel.repaint();\n }", "public TestPlotter() {\n\t\tplot = new Plot2D(title, xLabel, yLabel, true);\n\t\tplot.addChartMouseListener(new PlotListener());\n\t\tplot.addDismissListener(new AL());\n\t\tplot.setDefaultCloseOperation(plotter.EXIT_ON_CLOSE);\n\t\t\n\t}", "public void MakeStacked() {\n\t\tStackedButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetStackedAreaChartImage())));\n\t\tStackedButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Stacked Area Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(StackedButton);\n\t}", "public void setGraph(ActionEvent event)\n {\n theLineGraph.getData().clear();\n double temporary=0;\n theLineGraph.getXAxis().setLabel(\"Days\");\n\n XYChart.Series<String, Number> theGraph = new XYChart.Series<String, Number>();\n\n for (int i=0; i<Driver.save.getLog().size();i++)\n {\n String myI=i+\"\";\n\n if (event.getSource()==caloriesButton)\n {\n temporary=Driver.save.getDayCalories(i);\n theLineGraph.getYAxis().setLabel(\"Calories\");\n\n } else if(event.getSource()==protienButton)\n {\n temporary=Driver.save.getDayProtein(i);\n theLineGraph.getYAxis().setLabel(\"protien\");\n }\n else if (event.getSource()==carbsButton)\n {\n temporary=Driver.save.getDayCarbo(i);\n theLineGraph.getYAxis().setLabel(\"Carbs\");\n }\n else if (event.getSource()==fatsButton)\n {\n temporary=Driver.save.getDayFats(i);\n theLineGraph.getYAxis().setLabel(\"Fats\");\n }\n else if (event.getSource()==bevButton)\n {\n temporary=Driver.save.getDayBevarage(i);\n theLineGraph.getYAxis().setLabel(\"Drinks in ml\");\n }\n\n theGraph.getData().add(new XYChart.Data<String, Number>(myI ,temporary));\n }\n theLineGraph.getData().addAll(theGraph);\n\n }", "public void MakeLine() {\n\t\tLineButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetLineChartImage())));\n\t\tLineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Line Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(LineButton);\n\t}", "private void constructChartPanel() {\n chartPanel = new JPanel();\n chartPanel.setBorder(BorderFactory.createTitledBorder(\"Price Chart\"));\n chartPanel.setPreferredSize(relativeSize(0.4f, 0.35f));\n \n displayChartButton = new JButton(\"Click to Display Price Chart\");\n displayChartButton.setEnabled(false);\n displayChartButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n JPanel cPanel = chart.getChartPanel();\n chartPanel.removeAll();\n chartPanel.add(cPanel);\n cPanel.setPreferredSize(relativeSize(0.4f, 0.35f));\n \n pack();\n repaint();\n }\n });\n \n chartPanel.add(displayChartButton);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n panelChart = new javax.swing.JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jButton1.setText(\"Balansas\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n panelChart.setBackground(new java.awt.Color(255, 255, 255));\n panelChart.setLayout(new java.awt.BorderLayout());\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelChart, javax.swing.GroupLayout.DEFAULT_SIZE, 686, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGap(306, 306, 306)\n .addComponent(jButton1)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(panelChart, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addContainerGap())\n );\n\n pack();\n }", "public void plot(){\n\t\tplot = true;\n\t}", "private void addGraphPanel() {\n // Starting\n String S = C + \": addGraphPanel(): \";\n graphPanel.drawGraphPanel(xAxisName,yAxisName,functionList,xLog,yLog,customAxis,TITLE,buttonControlPanel);\n togglePlot();\n }", "public void mouseClicked(MouseEvent e){\r\n\t\t int[] mouseCurent = new int[2];\r\n\t\t mouseCurent[0] = e.getX();\r\n\t\t mouseCurent[1] = e.getY();\r\n\t\t \r\n\t\t //if (clickedNum > totalNum-1) {\r\n\t\t //\t JOptionPane.showMessageDialog(new JFrame(),\r\n\t\t\t//\t\t \"No more clicked points are wanted.\",\r\n\t\t\t//\t\t \"Inane error\",\r\n\t\t\t//\t\t JOptionPane.ERROR_MESSAGE);\r\n\t\t //} else {\r\n\t\t if (e.getModifiers() == MouseEvent.BUTTON1_MASK) {\r\n\t\t\t double d[][] = plotViewer.plotPanel.plotCanvas.centerData;\r\n\t\t\t plotViewer.plotPanel.addPlot(\"SCATTER\", \"Cluster Center\", Color.BLACK, d);\r\n\t\t\t \r\n\t\t\t // increase the center data storage memory\r\n\t\t\t if (clickedNum == 0) {\r\n\t\t\t\t cluster2DCenters = new double[1][2];\r\n\t\t\t\t cluster2DCenters[0] = d[0];\r\n\t\t\t\t clickedNum++;\r\n\t\t\t } else {\r\n\t\t\t\t double bak[][] = new double[clickedNum][2];\r\n\t\t\t\t bak = copy(cluster2DCenters);\t\r\n\t\t\t\t clickedNum++;\r\n\t\t\t\t cluster2DCenters = new double[clickedNum][2];\r\n\t\t\t\t for (int i=0; i<clickedNum-1; i++) {\r\n\t\t\t\t\t cluster2DCenters[i] = copy(bak[i]);\r\n\t\t\t\t }\r\n\t\t\t\t cluster2DCenters[clickedNum-1] = d[0];\r\n\t\t\t }\r\n\t\t\t \r\n\t\t }\r\n\t }", "@Override\r\n public void onClick(View v) {\n Intent intent = new Intent(getActivity(), SimpleXYPlotActivity.class);\r\n startActivity(intent);\r\n }", "public void onClick(View v) {\n\t \t\t\tSeriesSelection seriesSelection = mChartView.getCurrentSeriesAndPoint();\n\t \t\t\tif (seriesSelection == null) {\n\t \t\t\t\tToast.makeText(XYChartActivity.this, \"No chart element\", Toast.LENGTH_SHORT).show();\n\t \t\t\t} else {\n\t \t\t\t\t// display information of the clicked point\n\t \t\t\t\tToast.makeText(\n\t \t\t\t\t\t\tXYChartActivity.this,\n\t \t\t\t\t\t\t\"Chart element in series index \" + seriesSelection.getSeriesIndex()\n\t \t\t\t\t\t\t+ \" data point index \" + seriesSelection.getPointIndex() + \" was clicked\"\n\t \t\t\t\t\t\t+ \" closest point value X=\" + seriesSelection.getXValue() + \", Y=\"\n\t \t\t\t\t\t\t+ seriesSelection.getValue(), Toast.LENGTH_SHORT).show();\n\t \t\t\t}\n\t \t\t}", "public void createChart(StatisticPreviewChartViewModel statistic, Chart chart){\n\t chart.getTitle().setText(mainUser.getUsername());\r\n\t chart.getAxisSet().getXAxis(0).getTitle().setText(\"Dzień\");\r\n\t chart.getAxisSet().getYAxis(0).getTitle().setText(\"Kwoty\");\r\n\t // create scatter series\r\n\t ILineSeries series = (ILineSeries) chart.getSeriesSet().createSeries(SeriesType.LINE, \"Wartość\");\r\n\t series.setLineStyle(LineStyle.SOLID);\r\n\r\n\t Date[] days = statistic.getDays().stream().toArray(Date[]::new);\r\n\t series.setYSeries(statistic.getPrices());\r\n\t series.setXDateSeries(days); // xSeries is an array of java.util.Date\r\n\t IAxisTick xTick = chart.getAxisSet().getXAxis(0).getTick();\r\n\t \r\n\t IAxis yAxis = chart.getAxisSet().getYAxis(0);\r\n\t yAxis.adjustRange();\r\n\t \r\n\t yAxis.scrollUp();\r\n\t yAxis.scrollDown();\r\n\t Color color = new Color(Display.getDefault(), 255, 0, 0);\r\n\t series.setSymbolColor(color);\r\n\t \r\n\r\n\t DateFormat format = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n\t xTick.setFormat(format);\r\n\t \r\n\t \r\n\t // adjust the axis range\r\n\t chart.getAxisSet().adjustRange();\r\n\t \r\n\t chart.getParent().layout();\r\n\t comp.getParent().layout();\r\n\t \r\n\r\n\t comp.getParent().layout();\r\n\t chart.setVisible(true);\r\n\t}", "void clearButton_actionPerformed(ActionEvent e) {\n clearPlot(true);\n }", "public Proj2DClickPanel(String title, Plot2DViewer plotViewer, int numPoints) {\r\n\t\t totalNum = numPoints;\r\n\t\t //cluster2DCenters = new double[numPoints][2];\r\n\t\t \r\n\t\t this.plotViewer = plotViewer;\r\n\t \r\n\t\t plotViewer.plotPanel.plotCanvas.addMouseListener(this);\r\n\t\t plotViewer.plotPanel.plotCanvas.ActionMode = plotViewer.plotPanel.plotCanvas.SELCENTER;\r\n\t\t setBorder(BorderFactory.createTitledBorder(title));\r\n\t\t add(plotViewer);\r\n\t }", "private void initialize() {\r\n\t\t//frame = new JFrame();\r\n\t\tframe.setSize(725, 482);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t//frame.getContentPane().setLayout(null);\r\n\t\t\r\n\t\t\r\n\t\tDefaultCategoryDataset dataset= new DefaultCategoryDataset();\r\n\t\t//JOptionPane.showMessageDialog(null, \"BUTTON CLICKED!!!\");\r\n\t\t//LableMessage.setText(\"BUTTON CLICKED!!!\");\r\n\t\t\r\n\t\t//Pain, Drowsiness, Nausea, Anxiety, and Depression\r\n\t\tdataset.setValue(2, \"day1\",\"Pain\");\r\n\t\tdataset.setValue(5, \"day2\",\"Pain\");\r\n\t\tdataset.setValue(4, \"day3\",\"Pain\");\r\n\t\tdataset.setValue(6, \"day1\", \"Drowsiness\");\r\n\t\tdataset.setValue(10, \"day2\", \"Drowsiness\");\r\n\t\tdataset.setValue(8, \"day3\", \"Drowsiness\");\r\n\t\tdataset.setValue(1, \"day1\", \"Nausea\");\r\n\t\tdataset.setValue(7, \"day2\", \"Nausea\");\r\n\t\tdataset.setValue(5, \"day3\", \"Nausea\");\r\n\t\tdataset.setValue(3,\"day1\",\"Anxiety\");\t\r\n\t\tdataset.setValue(8,\"day2\",\"Anxiety\");\r\n\t\tdataset.setValue(9,\"day3\",\"Anxiety\");\r\n\t\tdataset.setValue(8, \"day1\", \"Depression\");\r\n\t\tdataset.setValue(7, \"day2\", \"Depression\");\r\n\t\tdataset.setValue(9, \"day3\", \"Depression\");\r\n\t\tint test[] = new int[7];\r\n\t\tfor (int i=0;i<7; i++)\r\n\t\t{\r\n\t\t\ttest[i]=5;\r\n\t\t}\r\n\t\tDefaultCategoryDataset dataset2= new DefaultCategoryDataset();\r\n\t\t//dataset2 = dataSetInit(P1.getEnterSymptomLevel(),P1.getPreviousSymptomLevel1(),P1.getPreviousSymptomLevel2());\r\n\t\tdataset2 = dataSetInit(test,test,test);\r\n\t\t//P1.getEnter\r\n\t\t//DefaultCategoryDataset dataset2= new DefaultCategoryDataset();\r\n\r\n\t\t//JFreeChart chart= ChartFactory.createBarChart(P1.firstName+\" \"+P1.lastName,\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\r\n\t\tJFreeChart chart= ChartFactory.createBarChart3D(\"Symptom Report\",\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,true,true,true);\r\n\t\t//JFreeChart chart2= ChartFactory.createBarChart(\"Symptom Report\",\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\t\tchart.setBackgroundPaint(Color.lightGray);\r\n\t\t//JFreeChart chart2= ChartFactory.createBarChart(\"Grade Report\",\"Student Name\", \"Marks\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\t\t\r\n\t\tChartPanel chartPanel = new ChartPanel(chart);\r\n\t\tchartPanel.setPreferredSize(new Dimension(700,350));\r\n\t\tPan.add(chartPanel);\r\n\t\t\r\n\t\tframe.getContentPane().add(Pan);\r\n\t\tCategoryPlot p=chart.getCategoryPlot();\r\n\t\tp.setRangeGridlinePaint(Color.red);\r\n\t\tp.setBackgroundPaint(Color.WHITE);\r\n\t\tframe.setVisible(true);\r\n//\t\tChartFrame frame= new ChartFrame(\"Bar Graph Test\",chart,false);\r\n//\t\t\r\n//\t\tframe.setVisible(true);\r\n//\t\tframe.setSize(700,350);\r\n//\t\tframe.setResizable(false);\r\n\t\t//frame2 =new JFrame()\r\n\t}", "public static void scatterPlot(String title, int[] arr) \n {\n XYChartBuilder builder = new XYChartBuilder();\n builder.width(800);\n builder.height(600);\n builder.title(\"Int array values\");\n builder.xAxisTitle(\"Index\");\n builder.yAxisTitle(\"Number\");\n\n // Add data and title to the chart\n XYChart chart = builder.build();\n chart.getStyler().setDefaultSeriesRenderStyle(XYSeriesRenderStyle.Scatter);\n chart.getStyler().setMarkerSize(2);\n\n XYSeries series = chart.addSeries(title, null, arr);\n series.setMarkerColor(Color.BLACK);\n\n // display the chart:\n new SwingWrapper(chart).displayChart();\n }", "public void insertPriceChart(Vector priceChart) {\n try {\n chart = new PriceChart();\n chart.setSecurities(priceChart);\n java.awt.EventQueue.invokeLater(new Runnable() {\n\n public void run() {\n chartPanel.removeAll();\n chartPanel.add(displayChartButton);\n displayChartButton.setEnabled(true);\n chartPanel.repaint();\n }\n });\n /*\n Runnable doUpdate = new Runnable() {\n public void run() {\n chartPanel.removeAll();\n chartPanel.add(displayChartButton);\n displayChartButton.setEnabled(true);\n }\n };\n SwingUtilities.invokeAndWait(doUpdate);\n * */\n }catch(Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tint month;\n\t\tdouble maxtempereture,monthlytempereture,mintempereture;\n\t\tResultSet rs;\n\t\tlib.MySQL mysql = new lib.MySQL();\n\t\trs = mysql.selectAll();\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\ttry{\n\t\t\twhile(rs.next()){\n\t\t\t\tmonth = rs.getInt(\"Month\");\n\t\t\t\tmaxtempereture = rs.getDouble(\"MaxTempereture\");\n\t\t\t\tmonthlytempereture = rs.getDouble(\"MonthkyTempereture\");\n\t\t\t\tmintempereture = rs.getDouble(\"MinTempereture\");\n System.out.println(\"月:\" + month);\n System.out.println(\"最高気温:\" + maxtempereture);\n System.out.println(\"月間平均気温:\" + monthlytempereture);\n System.out.println(\"最低気温:\" + mintempereture);\n data.addValue(maxtempereture,\"MaxTempereture\",month+\"\");\n data.addValue(monthlytempereture,\"MonthlyTempereture\",month+\"\");\n data.addValue(mintempereture,\"MinTempereture\",month+\"\");\n\t\t }\n\t\t}catch(SQLException et){}\n\t\t JFreeChart chart = \n\t\t\t ChartFactory.createLineChart(\"TOKYO TEMPERETURE\",\n\t\t\t \"month\",\n\t\t\t \"tempereture\",\n\t\t\t data,\n\t\t\t PlotOrientation.VERTICAL,\n\t\t\t true,\n\t\t\t false,\n\t\t\t false);\n \n\n ChartPanel cpanel = new ChartPanel(chart);\n panel1.add(cpanel);\n cardlayout.next(this);\n\t}", "public ChartFrame(Chart chart) {\r\n\t\tthis.chart = chart;\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c = 0; c < seatGrid[r].length; c++) {\r\n\t\t\t\tJLabel label = new JLabel();\r\n\t\t\t\tlabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n\t\t\t\tseatGrid[r][c] = label;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tremoveBtn = new JButton(\"Remove\");\r\n\t\tremoveBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonRemoveClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taddBtn = new JButton(\"Add\");\r\n\t\taddBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonAddClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tswapBtn = new JButton(\"Swap\");\r\n\t\tswapBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonSwapClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tloadBtn = new JButton(\"Load\");\r\n\t\tloadBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonLoadClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmoveBtn = new JButton(\"Move\");\r\n\t\tmoveBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonMoveClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));\r\n\t\tpanel.setLayout(new GridLayout(7, 5));\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c = 0; c < seatGrid[r].length; c++) {\r\n\t\t\t\tpanel.add(seatGrid[r][c]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < seatGrid[0].length; i++) {\r\n\t\t\tpanel.add(Box.createHorizontalGlue());\r\n\t\t}\r\n\r\n\t\tpanel.add(removeBtn);\r\n\t\tpanel.add(addBtn);\r\n\t\tpanel.add(loadBtn);\r\n\t\tpanel.add(swapBtn);\r\n\t\tpanel.add(moveBtn);\r\n\r\n\t\tadd(panel);\r\n\t\tsetSize(500, 400);\r\n\t\tsetVisible(true);\r\n\t\tsetTitle(\"Seating Chart\");\r\n\t\tupdate();\r\n\r\n\t}", "@Override\n\tpublic void callButton(TrafficSignal TS) {\n\t\t\n\t}", "public Visualize() {\n initComponents();\n \n }", "private void btn_stockMouseClicked(java.awt.event.MouseEvent evt) {\n \n }", "protected void plotScatterDiagram(){\n double xmax = a + 5. * gamma;\r\n double xmin = a - 5. * gamma;\r\n DatanGraphics.openWorkstation(getClass().getName(), \"\");\r\n DatanGraphics.setFormat(0., 0.);\r\n DatanGraphics.setWindowInComputingCoordinates(xmin, xmax, 0., .5);\r\n DatanGraphics.setViewportInWorldCoordinates(-.15, .9, .16, .86);\r\n DatanGraphics.setWindowInWorldCoordinates(-.414, 1., 0., 1.);\r\n DatanGraphics.setBigClippingWindow();\r\n DatanGraphics.chooseColor(2);\r\n DatanGraphics.drawFrame();\r\n DatanGraphics.drawScaleX(\"y\");\r\n DatanGraphics.drawScaleY(\"f(y)\");\r\n DatanGraphics.drawBoundary();\r\n double xpl[] = new double[2];\r\n double ypl[] = new double[2];\r\n// plot scatter diagram\r\n DatanGraphics.chooseColor(1);\r\n for(int i = 0; i < y.length; i++){\r\n xpl[0] = y[i];\r\n xpl[1] = y[i];\r\n ypl[0] = 0.;\r\n ypl[0] = .1;\r\n DatanGraphics.drawPolyline(xpl, ypl); \r\n }\r\n// draw Breit-Wigner corresponding to solution\r\n int npl = 100;\r\n xpl = new double[npl];\r\n ypl = new double[npl];\r\n double dpl = (xmax - xmin) / (double)(npl - 1);\r\n for(int i = 0; i < npl; i++){\r\n xpl[i] = xmin + (double)i * dpl;\r\n ypl[i] = breitWigner(xpl[i], x.getElement(0), x.getElement(1));\r\n }\r\n DatanGraphics.chooseColor(5);\r\n DatanGraphics.drawPolyline(xpl, ypl);\r\n// draw caption\r\n String sn = \"N = \" + nny;\r\n\t numForm.setMaximumFractionDigits(3);\r\n \t numForm.setMinimumFractionDigits(3);\r\n String sx1 = \", x_1# = \" + numForm.format(x.getElement(0));\r\n String sx2 = \", x_2# = \" + numForm.format(x.getElement(1));\r\n String sdx1 = \", &D@x_1# = \" + numForm.format(Math.sqrt(cx.getElement(0,0)));\r\n String sdx2 = \", &D@x_2# = \" + numForm.format(Math.sqrt(cx.getElement(1,1)));\r\n caption = sn + sx1 + sx2 + sdx1 + sdx2;\r\n DatanGraphics.setBigClippingWindow();\r\n DatanGraphics.chooseColor(2);\r\n DatanGraphics.drawCaption(1., caption);\r\n DatanGraphics.closeWorkstation();\r\n\r\n }", "@Override\n public void onClick() {\n // TODO: Disabled adding shape on just click. It should be added inside the BPMNDiagram by default.\n // log(Level.FINE, \"Palette: Adding \" + description);\n // addShapeToCanvasEvent.fire(new AddShapeToCanvasEvent(definition, factory));\n }", "@Override\n \tpublic void onClick(View arg0) {\n \t\ttry{\n \t\t\tSeriesSelection selectedPoint = lineGraph.getCurrentSeriesAndPoint();\n \n \t\t\tif(selectedPoint!=null)\n \t\t\t{\n \t\t\t\tString time = xAxisLabelsFinal[(int)selectedPoint.getXValue()];\n \n \t\t\t\tdouble amount=(double)selectedPoint.getValue();\n \t\t\t\t\n \t\t\t\tToast.makeText(caller.getBaseContext(), \"Crowdedness at \" + time + \": \" + amount + \"%\", Properties.TOAST_DEFAULT_DURATION).show();\n \t\t\t}\n \t\t} catch(Exception e){\n \t\t\t\n \t\t}\n \t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n pnlChart = new javax.swing.JPanel();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n pnlChart.setBackground(new java.awt.Color(0, 0, 0));\n pnlChart.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n pnlChart.setForeground(new java.awt.Color(255, 255, 255));\n pnlChart.setAlignmentX(1.5F);\n pnlChart.setAlignmentY(0.35F);\n pnlChart.setMaximumSize(new java.awt.Dimension(1000, 1000));\n pnlChart.setMinimumSize(new java.awt.Dimension(1, 1));\n pnlChart.setPreferredSize(new java.awt.Dimension(1, 1));\n pnlChart.setLayout(new java.awt.BorderLayout());\n\n jButton2.setText(\"jButton2\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n pnlChart.add(jButton2, java.awt.BorderLayout.PAGE_START);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(pnlChart, javax.swing.GroupLayout.PREFERRED_SIZE, 631, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 993, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(pnlChart, javax.swing.GroupLayout.PREFERRED_SIZE, 595, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 801, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void toChartData() {\n //this.chart = chart;\n chart.getData().clear();\n Set<String> labels = new HashSet<>(getLabels().values());\n Object[] names = getLocations().keySet().toArray();\n \n for (String label : labels) \n {\n XYChart.Series<Number, Number> series = new XYChart.Series<>();\n series.setName(label);\n getLabels().entrySet().stream().filter(entry -> entry.getValue().equals(label)).forEach(entry -> {\n Point2D point = getLocations().get(entry.getKey());\n \n XYChart.Data data = new XYChart.Data<>(point.getX(), point.getY()); \n series.getData().add(data);\n \n \n });\n\n getChart().getData().add(series);\n for (XYChart.Series<Number, Number> s : getChart().getData()) {\n s.getNode().setStyle(\"-fx-stroke-width: 0; \");\n s.getNode().setStyle(\"-fx-stroke: transparent; \");\n\n } \n\n\n }\n getChart().setAnimated(false);\n getChart().getData().add(new XYChart.Series<Number,Number>());\n \n for (XYChart.Series<Number, Number> s : getChart().getData()) {\n for (XYChart.Data<Number, Number> d : s.getData()) {\n\n for(Object name: names)\n {\n if(getLocations().get((String)name).getX()==d.getXValue().doubleValue()\n && getLocations().get((String)name).getY()==d.getYValue().doubleValue())\n {\n Tooltip.install(d.getNode(),new Tooltip((String)name));\n }\n \n \n }\n d.getNode().setCursor(Cursor.CROSSHAIR);\n \n \n }\n \n }\n \n\n \n /* getChart().getXAxis().setAutoRanging(false);\n getChart().getYAxis().setAutoRanging(false);\n //System.out.print(minX+\" \"+maxX+\" \"+minY+\" \"+maxY);\n double deltaX = maxX-minX;\n double deltaY = maxY-minY;\n double lowerY = deltaY>1?minY-deltaY*0.05:minY*0.1;\n double upperY = deltaY>1?maxY+deltaY*0.05:maxY*0.1;\n if(deltaY==0)\n {\n lowerY = -0.5;\n upperY = 0.5;\n }\n double lowerX = deltaX>1?minX-deltaX*0.05:minX*0.1;\n double upperX = deltaX>1?minX+deltaX*0.05:maxX*0.1;\n if(deltaX == 0)\n {\n lowerX = -0.5;\n upperX = 0.5;\n }\n \n ((NumberAxis)getChart().getXAxis()).setLowerBound(lowerX);\n ((NumberAxis)getChart().getXAxis()).setUpperBound(upperX);\n ((NumberAxis)getChart().getYAxis()).setLowerBound(lowerY);\n ((NumberAxis)getChart().getYAxis()).setUpperBound(upperY);\n */\n getChart().getXAxis().setAutoRanging(false);\n getChart().getYAxis().setAutoRanging(false);\n \n double deltaY = getMaxY()-getMinY();\n double deltaX = getMaxX()-getMinX();\n if(deltaX==0) \n {\n deltaX = 1;\n setMinX(getMinX()-getMinX()*0.1-1);\n setMaxX(getMaxX()+getMaxX()*0.1+1);\n }\n if(deltaY==0)\n {\n deltaY = 1;\n setMinY(getMinY()-getMinY()*0.1-1);\n setMaxY(getMaxY()+getMaxY()*0.1+1);\n }\n\n getChart().getXAxis().setAutoRanging(false);\n getChart().getYAxis().setAutoRanging(false);\n ((NumberAxis)getChart().getXAxis()).setLowerBound(getMinX()-Math.abs(deltaX/10));\n ((NumberAxis)getChart().getXAxis()).setUpperBound(getMaxX()+Math.abs(deltaX/10));\n ((NumberAxis)getChart().getYAxis()).setLowerBound(getMinY()-Math.abs(deltaY/10));\n ((NumberAxis)getChart().getYAxis()).setUpperBound(getMaxY()+Math.abs(deltaY/10));\n\n \n }", "@GFlotExamplesSource\n @UiHandler( \"generate\" )\n void onClickGenerate( ClickEvent e )\n {\n plot.getModel().removeAllSeries();\n generateRandomData();\n plot.redraw();\n }", "public static void graph(){\n\t\t double[][] valuepairs = new double[2][];\n\t\t valuepairs[0] = mutTotal; //x values\n\t\t valuepairs[1] = frequency; //y values\n\t\t DefaultXYDataset set = new DefaultXYDataset();\n\t\t set.addSeries(\"Occurances\",valuepairs); \n\t\t XYBarDataset barset = new XYBarDataset(set, .8);\n\t\t JFreeChart chart = ChartFactory.createXYBarChart(\n\t\t \"Mutation Analysis\",\"Number of Mutations\",false,\"Frequency\",\n\t\t barset,PlotOrientation.VERTICAL,true, true, false);\n\t\t JFrame frame = new JFrame(\"Mutation Analysis\");\n\t\t frame.setContentPane(new ChartPanel(chart));\n\t\t frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t frame.pack();\n\t\t frame.setVisible(true);\n\t\t }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource() == button1){\n\t\t\tint id,number;\n\t\t\tString year;\n\t\t\tResultSet rs;\n\t\t\tMySQL mysql = new MySQL();\n\t\t\trs = mysql.selectAll();\n\t\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\twhile(rs.next()){\n\t\t\t\tid = rs.getInt(\"id\");\n\t\t\t\tyear = rs.getString(\"year\");\n\t\t\t number = rs.getInt(\"number\");\n\t\t\t data.addValue(number,\"出生数\",year); \n\t \t\t\tpanelA.add(new Label(\"id:\"+id+\" / year\"+year+\" / number\"+number)); \n\t\t\t\t}\n\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\t JFreeChart chart = \n\t\t\t ChartFactory.createLineChart(\"出生率\",\n\t\t\t \"年度\",\n\t\t\t \"万(人)\",\n\t\t\t data,\n\t\t\t PlotOrientation.VERTICAL,\n\t\t\t true,\n\t\t\t false,\n\t\t\t false);\n\n\t\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t\t panelA.add(cpanel);\n\t\t\t cardlayout.next(this);\n\n\t\t}\n\t}", "public void addToPlotAction(final GenericPlotFrame frame) {\n final PlotProperties props = frame.getPlotProperties();\n addPlotRegister(props);\n frame.getPlotPanel().updateRegisters();\n }", "public void MakePie() {\n\t\tPieButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(GetPieChartImage())));\n\t\tPieButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\tJPanel piecharts = new JPanel();\n\t\t\t\tpiecharts.setLayout(new WrapLayout());\n\t\t\t\tpiecharts.setSize(new Dimension(600,400));\n\t\t\t\tpiecharts.setBackground(Color.WHITE);\n\t\t\t\t\n\t\t\t\tif(GetHost().GetColumns().length == 1){\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\tpiecharts.add(new PieChart(GetHost().GetGraphData(), \n\t\t\t\t\t\t\"Pie Chart\", \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), 0));\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\tpiecharts.add(new PieChart(\n\t\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), 0));\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int i = 1; i<GetHost().GetColumns().length; i++){\n\t\t\t\t\t\t\tSetIncrement(i);\n\t\t\t\t\t\t\tpiecharts.add(new PieChart(\n\t\t\t\t\t\t\tGetHost().GetGraphData(), \"Pie Chart\", \n\t\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), i));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\tfor(int i=1;i<GetHost().GetColumns().length; i++){\n\t\t\t\t\t\t\t\tSetIncrement(i);\n\t\t\t\t\t\t\t\tpiecharts.add(new PieChart(\n\t\t\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), i));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\tHolder = new JScrollPane();\n\t\t\tHolder.setPreferredSize(new Dimension(800,450));\n\t\t\tHolder.setViewportView(piecharts);\n\t\t\tHolder.setVisible(true);\n\t\t\t\t\n\t\t\tGetHost().LeftPanelContent(Holder);\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(PieButton);\t\n\t}", "public GUIVerbrauchsdiagramm(String title, EnergyData energyData) {\n super(title);\n this.energyData = energyData;\n setExtendedState(JFrame.MAXIMIZED_BOTH);\n ChartPanel chartPanel = (ChartPanel) createPanel(energyData);\n\n buttonGroup.add(verbrauchDiagramm);\n buttonGroup.add(zaehlerDiagramm);\n pRadiobuttons.add(verbrauchDiagramm);\n pRadiobuttons.add(zaehlerDiagramm);\n pRadiobuttons.setBorder(new EmptyBorder(0, 20, 0, 0));\n verbrauchDiagramm.setSelected(true);\n tDate.setForeground(Color.gray);\n\n pSkipDay.setLayout(new GridLayout(1, 7, 5, 0));\n pSkipDay.add(bBackwardsM);\n pSkipDay.add(bBackwardsW);\n pSkipDay.add(bBackwards);\n pSkipDay.add(tDate);\n pSkipDay.add(bForwards);\n pSkipDay.add(bForwardsW);\n pSkipDay.add(bForwardsM);\n\n pDate.add(lCurrentDate);\n pDate.add(lEmpty2);\n pDate.add(pSkipDay);\n\n\n pCsv.add(bExportCSV);\n pCsv.add(lEmpty);\n pCsv.add(bExportJSON);\n\n\n pHeader.add(pRadiobuttons);\n pHeader.add(pDate);\n pHeader.add(pCsv);\n\n this.add(chartPanel, BorderLayout.CENTER);\n this.add(pHeader, BorderLayout.NORTH);\n\n //Actionlistener\n ActionListener actionListenerDiagramm = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (verbrauchDiagramm.isSelected()) {\n System.out.println(\"Verbrauchsdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetVerbrauchsdiagramm(energyData);\n chart.setTitle(\"Stromzählerübersicht\");\n }\n if (zaehlerDiagramm.isSelected()) {\n System.out.println(\"Zählerdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetZaehlerdiagramm(energyData);\n chart.setTitle(\"Zählerstand\");\n }\n }\n };\n\n bExportCSV.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n try {\n JFileChooser fileChooser = new JFileChooser(\"./CSV\");\n fileChooser.setDialogTitle(\"CSV-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.csv\",\"csv\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".csv\")){\n path = path +\".csv\";\n }\n FileHandler.writeCSV(map,path);\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden in ein CSV-File exportiert\");\n }\n });\n\n bExportJSON.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n FileHandler.saveJSON(map);\n\n try {\n JFileChooser fileChooser = new JFileChooser(\"./JSON\");\n fileChooser.setDialogTitle(\"JSON-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.json\",\"json\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".json\")){\n path = path +\".json\";\n }\n FileWriter fileWriter = new FileWriter(path);\n fileWriter.write(FileHandler.saveJSON(map));\n fileWriter.flush();\n fileWriter.close();\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden zum JSON exportiert \\n\" + \"https://api.npoint.io/0dc854da1619aca3be45\");\n }\n });\n\n bForwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, true);\n }\n });\n\n bBackwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, false);\n }\n });\n bBackwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, false);\n }\n });\n bForwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, true);\n }\n });\n bBackwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, false);\n }\n });\n bForwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, true);\n }\n });\n\n /*chart.getXYPlot().addChangeListener(new PlotChangeListener() {\n @Override\n public void plotChanged(PlotChangeEvent plotChangeEvent) {\n XYPlot plot = plotChangeEvent.getPlot().getChart().getXYPlot();\n PlotChangeListener plotChangeListener = this;\n\n plot.removeChangeListener(plotChangeListener);\n long upperBound = (long) plot.getDomainAxis().getUpperBound();\n long lowerBound = (long) plot.getDomainAxis().getLowerBound();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(upperBound / 900000 * 900000);\n upperBound = calendar.getTimeInMillis();\n\n calendar.setTimeInMillis(lowerBound / 900000 * 900000);\n lowerBound = calendar.getTimeInMillis();\n System.out.println(new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\").format(new Date(lowerBound)));\n\n System.out.println(getEnergyData().getSdatData().containsKey(lowerBound));\n\n double highestValue = 0;\n if (getEnergyData().getSdatData().containsKey(lowerBound)) {\n for (long i = lowerBound; i < upperBound; i = i + 86400000) {\n if (getEnergyData().getSdatData().get(i).getRelativBezug() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getRelativBezug();\n\n }\n if (getEnergyData().getSdatData().get(i).getRelativeEinspeisung() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getZaehlerstandEinspeisung();\n }\n }\n\n System.out.println(highestValue);\n System.out.println(highestValue + 1);\n\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(highestValue + 1);\n }else {\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(plot.getRangeAxis().getUpperBound());\n }\n plot.addChangeListener(plotChangeListener);\n\n }\n\n });\n */\n\n tDate.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent e) {\n checkDate(e);\n }\n\n @Override\n public void keyPressed(KeyEvent e) {\n\n }\n\n @Override\n public void keyReleased(KeyEvent e) {\n\n }\n });\n\n tDate.addFocusListener(new FocusListener() {\n @Override\n public void focusGained(FocusEvent e) {\n if (tDate.getText().equals(\"Datum:\")) {\n tDate.setText(\"\");\n tDate.setForeground(Color.BLACK);\n }\n }\n\n @Override\n public void focusLost(FocusEvent e) {\n if (tDate.getText().isEmpty()) {\n tDate.setForeground(Color.GRAY);\n tDate.setText(\"Datum:\");\n }\n }\n });\n\n\n verbrauchDiagramm.addActionListener(actionListenerDiagramm);\n zaehlerDiagramm.addActionListener(actionListenerDiagramm);\n }", "protected void onUpdateGraphPressed(View view) {\n int count = 0;\n gHistoricalPPM.removeAllSeries();\n if (spGraphType.getSelectedItem() == \"Virus\") {\n DataPoint[] dpArray = new DataPoint[selectedReport.getPrList().size()];\n for (PurityReport pr : selectedReport.getPrList()) {\n DataPoint dp = new DataPoint(pr.getMonthSubmitted(), pr.getVirusPPM());\n dpArray[count++] = dp;\n }\n LineGraphSeries<DataPoint> series = new LineGraphSeries<>(dpArray);\n gHistoricalPPM.addSeries(series);\n } else {\n DataPoint[] dpArray = new DataPoint[selectedReport.getPrList().size()];\n for (PurityReport pr : selectedReport.getPrList()) {\n DataPoint dp = new DataPoint(pr.getMonthSubmitted(), pr.getContaminantPPM());\n dpArray[count++] = dp;\n }\n LineGraphSeries<DataPoint> series = new LineGraphSeries<>(dpArray);\n gHistoricalPPM.addSeries(series);\n }\n gHistoricalPPM.getViewport().setMinX(1);\n gHistoricalPPM.getViewport().setMaxX(12);\n gHistoricalPPM.getViewport().setXAxisBoundsManual(true);\n }", "public ScatterPlot(HighlightManager highlightManager, \r\n GeoData xGeoData, \r\n GeoData yGeoData,\r\n String xLabel,\r\n String yLabel)\r\n {\r\n xData_ = xGeoData;\r\n yData_ = yGeoData;\r\n highlightManager_ = highlightManager;\r\n xLabel_ = xLabel;\r\n yLabel_ = yLabel;\r\n\r\n\r\n highlightManager_.addHighlightChangedListener(this);\r\n\r\n\r\n // Set up the mouse motion listener\r\n addMouseMotionListener(this);\r\n\r\n\r\n // Get the size of the GeoData (assuming the size of the xGeoData\r\n // equals the size of the yGeoData\r\n xSize_ = xData_.getSize(); \r\n\r\n\r\n fillVector();\r\n }", "private void drawGraph() {\n // you can show warning messages now\n imrGuiBean.showWarningMessages(true);\n addGraphPanel();\n setButtonsEnable(true);\n }", "private static void plotDataset(XYSeriesCollection c) {\n\n String title = \"Regression example\";\n String xAxisLabel = \"timestamp\";\n String yAxisLabel = \"traffic data in bits\";\n PlotOrientation orientation = PlotOrientation.VERTICAL;\n boolean legend = true;\n boolean tooltips = true;\n boolean urls = false;\n JFreeChart chart = ChartFactory.createXYLineChart(title, xAxisLabel, yAxisLabel, c, orientation, legend, tooltips, urls);\n\n // get a reference to the plot for further customisation...\n final XYPlot plot = chart.getXYPlot();\n plot.setDomainPannable(true);\n XYDifferenceRenderer r = new XYDifferenceRenderer(Color.green,\n Color.yellow, false);\n r.setRoundXCoordinates(true);\n plot.setDomainCrosshairLockedOnData(true);\n plot.setRangeCrosshairLockedOnData(true);\n plot.setDomainCrosshairVisible(true);\n plot.setRangeCrosshairVisible(true);\n plot.setRenderer(r);\n\n // Auto zoom to fit time series in initial window\n final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();\n rangeAxis.setAutoRange(true);\n\n JPanel panel = new ChartPanel(chart);\n\n JFrame f = new JFrame();\n f.add(panel);\n f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n f.pack();\n f.setTitle(\"Training Data\");\n\n RefineryUtilities.centerFrameOnScreen(f);\n f.setVisible(true);\n }", "public void chartTheStars() {\n\t\tresetSkyDrawing();\n\t\tdouble[] data = getUserInputFromUIControls(); // ASSUMES IT IS VALID.\n\t\tcontroller = new CTS_Controller(data[0],data[1],(int) data[2], (int) data[3], (int) data[4],(int) data[5], (int) data[6], (int) data[7]); // Only using latitude and longitude\n\t\tboolean succesful = controller.setConstellationType(userSelectedConstellationFileName);\n\t\t// strokeText(String text, double x, double y, double maxWidth)\n\t\tgc.setStroke(usercolors[7]);\n\t\tgc.strokeText(\"Latitude: \" + data[0], 10, 15, 190);\n\t\tgc.strokeText(\"Longitude: \" + data[1], 10, 30, 190);\n\t\tgc.strokeText(\"Date: \" + String.format(\"%.0f\", data[2]) + \"-\" + String.format(\"%.0f\", data[3]) + \"-\" + String.format(\"%.0f\", data[4]),\n\t\t\t\t10,\t45, 190);\n\t\tgc.strokeText(\"Time: \" + String.format(\"%.0f\", data[5]) + \":\" + String.format(\"%.0f\", data[6]) + \":\" + String.format(\"%.0f\", data[7]) ,\n\t\t\t\t10,\t60, 190);\n\t\tgc.strokeText(\"Constellation set: \" + upperCaseFL(userSelectedConstellationFileName).substring(0,userSelectedConstellationFileName.length() - 4),\n\t\t\t\t10,\t(VIEWING_AREA_HEIGHT - 5), 210);\n\t\tArrayList<CTS_Star> n = controller.getModel().getStarList();\n\t\tArrayList<CTS_DeepSkyObject> d = controller.getModel().getDSOlist();\n\t\tdouble alt = 0, mag = 0;\n\t\tboolean[] plottingstatus = getCheckBoxes();\n\t\tif (plottingstatus[0]) {\n\t\t\t// Plot stars\n\t\t\tfor(int x = 0; x < n.size(); x++) {\n\t\t\t\tCTS_Star star = n.get(x);\n\t\t\t\ttry {\n\t\t\t\t\talt = star.getAltitude();\n\t\t\t\t\tmag = star.getMagnitude();\n\t\t\t\t\t// I named it cupcake because when I first tested it\n\t\t\t\t\t// The result in the GUI was a cupcake!\n\t\t\t\t\tdouble cupcake = magnitudeToRadius(mag);\n\t if (alt >= 0 && mag < -20) {\n\t \t// The sun is the only star with mag < -20, color it yellow.\n\t drawSpaceObject(star, cupcake,Color.YELLOW);\n\t }\n\t else if (alt >= 0 && mag < 6) {\n\t\t\t\t\t\tdrawSpaceObject(star, cupcake,usercolors[0]);\n\t\t\t\t\t} else if (alt >= 0 && mag < 9) {\n\t\t\t\t\t\tif (mag < 7) {\n\t\t\t\t\t\t\tdrawSpaceObject(star, .2,usercolors[1]);\n\t\t\t\t\t\t} else if (mag < 8){\n\t\t\t\t\t\t\tdrawSpaceObject(star, .14,usercolors[2]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdrawSpaceObject(star, .09,usercolors[2]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch(IllegalArgumentException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (plottingstatus[1]) {\n\t\t\t// Plot DSOs\n\t\t\tfor(int x = 0; x < d.size(); x++) {\n\t\t\t\tCTS_DeepSkyObject dso = d.get(x);\n\t\t\t\ttry {\n\t\t\t\t\talt = dso.getAltitude();\n\t\t\t\t\tmag = dso.getMagnitude();\n\t\t\t\t\tif (alt >= 0 && mag < 6) {\n\t\t\t\t\t\tdrawSpaceObject(dso,1,usercolors[3]);\n\t\t\t\t\t}\n\t\t\t\t} catch(IllegalArgumentException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (plottingstatus[2] && succesful) {\n\t\t\t// Plot Constellations\n\t\t\tArrayList<CTS_Constellation> constellations = controller.getConstellations();\n\t\t\tif (constellations == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfor (CTS_Constellation constellation : constellations) {\n\t\t\t\tHashMap<CTS_Star, ArrayList<CTS_Star>> connections = constellation.getConnections();\n\t\t\t\tHashSet<CTS_Star> keys = new HashSet<>(connections.keySet());\n\t\t\t\tfor (CTS_Star fromStar : keys) {\n\t\t\t\t\tdouble[] from = getPositionOfSpaceObject(fromStar);\n\t\t\t\t\tfor (CTS_Star toStar : connections.get(fromStar)) {\n\t\t\t\t\t\tdouble[] to = getPositionOfSpaceObject(toStar);\n\t\t\t\t\t\tif (from != null && to != null) {\n\t\t\t\t\t\t\tdrawLine(from[0], from[1], to[0], to[1], usercolors[8]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (plottingstatus[2] && !succesful) {\n\t\t\tGUIerrorout = new Alert(AlertType.ERROR, \"Internal Application Error!\\nConstellation files did not load in correctly.\\nCheck to verify the resources package has all the needed .fab files.\");\n\t\t\tGUIerrorout.showAndWait();\n\t\t}\n\t\tif (plottingstatus[3]) {\n\t\t\ttry {\n\t\t\t\tfor (CTS_Planet x : controller.getModel().getPlanetList()) {\n\t\t\t\t\tif (x.getAltitude() >= 0 && x.getAltitude() <= 90) {\n\t\t\t\t\t\tif (x.getId() == 200000) { // Mercury \n\t\t\t\t\t\t\tdrawSpaceObject(x , 4, Color.BROWN);\n\t\t\t\t\t\t} else if (x.getId() == 200001) { // Venus\n\t\t\t\t\t\t\tdrawSpaceObject(x , 5, Color.TOMATO);\n\t\t\t\t\t\t} else if (x.getId() == 200002) { // Moon\n\t\t\t\t\t\t\tdrawSpaceObject(x , 7, Color.DARKSLATEGREY);\n\t\t\t\t\t\t} else if (x.getId() == 200003) { // Mars\n\t\t\t\t\t\t\tdrawSpaceObject(x , 6, Color.DARKRED);\n\t\t\t\t\t\t} else if (x.getId() == 200004) { // Jupiter\n\t\t\t\t\t\t\tdrawSpaceObject(x , 5, Color.TAN);\n\t\t\t\t\t\t} else if (x.getId() == 200005) { // Saturn\n\t\t\t\t\t\t\tdrawSpaceObject(x , 4, Color.BEIGE);\n\t\t\t\t\t\t} else if (x.getId() == 200006) { // uranus\n\t\t\t\t\t\t\tdrawSpaceObject(x , 3, Color.LIGHTBLUE);\n\t\t\t\t\t\t} else if (x.getId() == 200007) { // neptune\n\t\t\t\t\t\t\tdrawSpaceObject(x , 2, Color.DARKBLUE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch(IllegalArgumentException e) {\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "@FXML\n public void setGraph(){\n /*\n series.getData().clear();\n for(double x = -400; x <= 400; x += 1)\n series.getData().add(new XYChart.Data<Number,Number> (x, x));\n\n graph.getData().add(series);\n */\n System.out.println(\"vjksdl\");\n }", "public ZeePanel(Spel spel) {\n this.spel = spel;\n buttons = new JButton[16][16];\n setLayout(new GridLayout(16,16,5,5));\n for (int rij=0;rij<16;rij++)\n {\n for (int kolom=0;kolom<16;kolom++)\n {\n buttons[rij][kolom] = new JButton();\n buttons[rij][kolom].setBackground(Color.CYAN);\n add(buttons[rij][kolom]);\n buttons[rij][kolom].addActionListener(this);\n buttons[rij][kolom].setActionCommand(rij + \",\" + kolom);\n }\n }\n }", "public GraphController(GUI view){\r\n\t\tview.setGvWindowListener(new GvWindowListener(){\r\n\t\t\tpublic void buttonClicked(GraphingEvent ge){\r\n\t\t\t\tmodel = ge.getDJAI_GV();\r\n\t\t\t\tmodel.setDate(ge.getDJAI_GV().getDate());\r\n\t\t\t\tmodel.setValue(ge.getDJAI_GV().getValue());\r\n\t\t\t\tSystem.out.println(ge.getSource());\r\n\t\t\t\t\r\n\t\t\t\tData = new ArrayList<String>();\r\n\t\t\t\tData = DataSaver.dowArray_C;\r\n\t\t\t\t\r\n\t\t\t\tvalue = new double[Data.size()];\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < Data.size(); i++){\r\n\t\t\t\t\tvalue[i] = Double.parseDouble(Data.get(i).substring(10));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tParent root;\r\n\t\t\t\tStage stage = new Stage();\r\n\t\t\t\tstage.setTitle(\"Graph Data\");\r\n\t\t\t\t\r\n\t\t\t\tfinal CategoryAxis xAxis = new CategoryAxis();\r\n\t\t\t final NumberAxis yAxis = new NumberAxis();\r\n\t\t\t xAxis.setLabel(\"Number of Month\");\r\n\t\t\t final LineChart<String, Number> lineChart = new LineChart<String, Number>(\r\n\t\t\t xAxis, yAxis);\t\t \r\n\t\t\t xAxis.setLabel(\"Date\");\r\n\t\t\t xAxis.setTickMarkVisible(false);\r\n\t\t\t \r\n\t\t\t yAxis.setLabel(\"DJAI Value\");\r\n\t\t\t yAxis.setAutoRanging(false);\r\n\t\t\t yAxis.setTickMarkVisible(false);\r\n\t\t\t yAxis.setUpperBound(20000);\r\n\t\t\t yAxis.setLowerBound(6000);\r\n\t\t\t yAxis.setTickUnit(2000);\r\n\t\t\t yAxis.setMinorTickCount(14);\r\n\t\t\t XYChart.Series<String, Number> series = new XYChart.Series<String, Number>();\r\n\t\t\t series.setName(\"DJAI Chart \");\r\n\t\t\t\r\n\t\t\t for(int i = 0; i < Data.size(); i++){\r\n\t\t\t \tseries.getData().add(new XYChart.Data<String, Number>(Data.get(i).substring(0, 10),\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t value[i]));\r\n\t\t\t }\r\n\t\t\t lineChart.setCreateSymbols(false);\r\n\t\t\t lineChart.getData().add(series);\r\n\t\t\t\tlineChart.isResizable();\r\n\t\t\t Scene scene = new Scene(lineChart,14000,600);\r\n\t\t\t stage.setScene(scene);\r\n\t\t\t\tstage.show();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n public void run() {\n XYChart.Data<Number, Number> data = new XYChart.Data<>(-x, y);\n data.setNode(new Circle(5, javafx.scene.paint.Color.GREY));\n series.getData().add(data);\n lineChart.getData().add(series);\n }", "@FXML\n\tprivate void handleSenButtonCH0(){\n\t\tif(senButtonCH0.isSelected()){\n\t\t\t//draw the chart\n\t\t\tchartDrawer.drawSin();\n\t\t\tdutyFieldCH0.setDisable(false);\n\t\t\tdutyLabelCH0.setText(\"Fase\");\n\t\t\tdutyUnitLabelCH0.setText(\"Grau\");\n\t\t}\n\t\telse{\n\t\t\tchartDrawer.clear();\n\t\t}\n\t}", "public void MakeBar() {\n\t\tBarButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(GetBarChartImage())));\t\n\t\tBarButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Bar chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BarButton);\t\n\t}", "public ScatterChart(@NamedArg(\"xAxis\") Axis<X> xAxis, @NamedArg(\"yAxis\") Axis<Y> yAxis, @NamedArg(\"data\") ObservableList<Series<X,Y>> data) {\n super(xAxis,yAxis);\n setLegend(legend);\n setData(data);\n }", "@Override\n\tpublic void setScatterTarget(){\n\t\tthis.setTarget(22*Constants.SQUARE_SIDE,0); \n\t}", "@FXML \n\tprivate void handleSerraButtonCH0() throws Exception {\n\t\tif(serraButtonCH0.isSelected()){\n\t\t\t//draw the chart\n\t\t\tdutyFieldCH0.setDisable(true);\n\t\t\tchartDrawer.drawSerra();\n\t\t}\n\t\telse{\n\t\t\t//clear the chart\n\t\t\tdutyFieldCH0.setDisable(false);\n\t\t\tchartDrawer.clear();\n\t\t}\n\t}", "private JPanel createChartPanel(XYSeriesCollection li) {\n\n String chartTitle = \" Movement Chart\";\n String xAxisLabel = \"Matrix Size\";\n String yAxisLabel = \"time in ms\";\n\n XYSeriesCollection dataset = li;\n // System.out.println(\"tesst count \" + dataset.getSeriesCount());\n\n //XYDataset dataset = createDataset(li);\n JFreeChart chart = ChartFactory.createXYLineChart(chartTitle, xAxisLabel, yAxisLabel, dataset);\n XYPlot plot = chart.getXYPlot();\n XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();\n plot.setRenderer(renderer);\n\n return new ChartPanel(chart);\n }", "public void onClick(View v) {\n checkFields();\n generateChart();\n }", "@Override\n\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\tif (e.getSource().equals(gene_status_distribution_button)) {\n\t\t\tchart_display_frame.remove(current_display);\n\t\t\tchart_display_frame.getContentPane()\n\t\t\t.add(gene_status_distribution_panel, BorderLayout.CENTER);\n\t\t\tchart_display_frame.setName(\"Genotype-Phenotype Correlation Value Distribution\");\n\t\t\tchart_display_frame.setVisible(true);\n\t\t\tcurrent_display = gene_status_distribution_panel;\n\n\t\t\t/* Give focus to the gene_value_distribution plot and remove\n\t\t\t * chart currently displayed from the display frame.*/\n\t\t} else if (e.getSource().equals(gene_value_distribution_button)) {\n\t\t\tchart_display_frame.remove(current_display);\n\t\t\tchart_display_frame.getContentPane()\n\t\t\t.add(gene_value_distribution_panel, BorderLayout.CENTER);\n\t\t\tchart_display_frame.setName(\"Genotype Value Distribution\");\n\t\t\tchart_display_frame.setVisible(true);\n\t\t\tcurrent_display = gene_value_distribution_panel;\n\t\t}\n\t\tchart_display_frame.repaint();\n\t}", "public void showChart(boolean enable) {\n mainChartPanel.remove(chartPanel);\n\n if (showChartPanel) {\n\n JFreeChart chart = createChart();\n chartPanel = new ChartPanel(chart);\n setDefaultChartOptions();\n mainChartPanel.add(chartPanel, BorderLayout.CENTER);\n\n //chartTableModel = new ChartTableModel(xySeriesCollection.getSeriesCount());\n chartTableModel = new ChartTableModel(dataSets.size());\n\n for (int row = 0; row < dataSets.size(); row++) {\n DataSet data_set = dataSets.get(row);\n chartTableModel.setValueAt(data_set.getDataCollection().getSeries(0).getDescription(), row, 0);\n chartTableModel.setValueAt(new Double(\"0.00\"), row, 1);\n chartTableModel.setValueAt(new Double(\"0.00\"), row, 2);\n chartTableModel.setValueAt(new Double(\"0.00\"), row, 3);\n chartTableModel.setValueAt(new Double(\"0.00\"), row, 4);\n chartTableModel.setValueAt(new Double(\"0.00\"), row, 5);\n chartTableModel.setValueAt(new Double(\"0.00\"), row, 6);\n }\n }\n /*\n for (int row = 0; row < xySeriesCollection.getSeriesCount(); row++) {\n XYPlot plot = (XYPlot) chart.getPlot();\n XYSeries series = xySeriesCollection.getSeries(row);\n chartTableModel.setValueAt(series.getDescription(), row, 0);\n chartTableModel.setValueAt(new Double(\"0.00\"), row, 1);\n chartTableModel.setValueAt(new Double(\"0.00\"), row, 2);\n chartTableModel.setValueAt(new Double(\"0.00\"), row, 3);\n chartTableModel.setValueAt(new Double(\"0.00\"), row, 4);\n chartTableModel.setValueAt(new Double(\"0.00\"), row, 5);\n chartTableModel.setValueAt(new Double(\"0.00\"), row, 6);\n }\n */\n\n jScrollPane1.getViewport().removeAll();\n if (showTablePanel) {\n JTable table = new JTable(chartTableModel);\n TableCellRenderer renderer2 = new NumberCellRenderer();\n table.getColumnModel().getColumn(1).setCellRenderer(renderer2);\n table.getColumnModel().getColumn(2).setCellRenderer(renderer2);\n table.getColumnModel().getColumn(3).setCellRenderer(renderer2);\n table.getColumnModel().getColumn(4).setCellRenderer(renderer2);\n table.getColumnModel().getColumn(5).setCellRenderer(renderer2);\n table.getColumnModel().getColumn(6).setCellRenderer(renderer2);\n jScrollPane1.getViewport().add(table);\n }\n\n //jSplitPane.add(tablePanel, JSplitPane.BOTTOM);\n\n chartSlider.setEnabled(false);\n chartSlider.setValue(0);\n chartSlider.setEnabled(true);\n\n this.validate();\n }", "public Chart(double[][] result, double[][] observed){\n //Create a new Frame object\n final Frame f1 = new Frame(\"Model Fit\");\n\t//Set the Frame object size\t\n\tf1.setSize(600,400);\n //Add a window listener to the Frame to close it\n\tf1.addWindowListener(new WindowAdapter() {\n @Override\n\t\tpublic void windowClosing(WindowEvent we) {\n\t\t\tf1.dispose();\n\t\t}\n\t});\n \n //add in the code to create the chart\n //create a data object to hold the XY data\n DefaultXYDataset data = new DefaultXYDataset();\n //cycle through the origins\n for (int i = 0; i < observed.length; i++) {\n //create a two dimensional array to hold the observed and result\n double dataArray[][] = new double[2][observed[i].length];\n //put the observed data in element 0\n dataArray[0]=observed[i];\n //put the result data in element 1\n dataArray[1]=result[i];\n //add the data series with a unique name\n data.addSeries(\"Origin \"+i, dataArray);\n }\n\t//Create the chart with the correct title and axis names and data etc.\n\tJFreeChart chart = ChartFactory.createScatterPlot(\"Observed vs. Results\", \n\t\t\"Observed\", // x axis label\n\t\t\"Results\", // y axis label\n\t\tdata, // data\n\t\tPlotOrientation.VERTICAL, // orientation\n\t\ttrue, // legend\n\t\ttrue, // tooltips\n\t\tfalse // URLs\n\t);\n\t//get the plot area and format it to the desired colours\n\tXYPlot plot = (XYPlot) chart.getPlot();\n\tplot.setBackgroundPaint(Color.white);\n\tplot.setDomainGridlinePaint(Color.darkGray);\n\tplot.setDomainGridlinesVisible(true);\n\tplot.setRangeGridlinePaint(Color.black);\n\t\n\t// We're going to add some regression stuff here shortly.\n double[] coeffs = Regression.getOLSRegression(createTwoDArray(result, observed));\n\tLineFunction2D linefunction2d = new LineFunction2D(coeffs[0], coeffs[1]);\n\tXYDataset series2 = DatasetUtilities.sampleFunction2D(linefunction2d, 10, 50, 5, \"Linear Regression Line\");\n\tplot.setDataset(2, series2); \n\tXYLineAndShapeRenderer lineDrawer = new XYLineAndShapeRenderer(true, false);\n\tlineDrawer.setSeriesPaint(0, Color.BLACK);\n\tplot.setRenderer(2, lineDrawer);\n\t\n //create a chart panel to render to the screnn\n\tChartPanel chartPanel = new ChartPanel(chart);\n //add the chart panel to the frame\n\tf1.add(chartPanel);\n //set the frame to be visible\n\tf1.setVisible(true);\n }", "private void initChart() {\n Cartesian cartesian = AnyChart.line();\n\n cartesian.animation(true);\n\n cartesian.padding(10d, 20d, 5d, 20d);\n\n cartesian.crosshair().enabled(true);\n cartesian.crosshair()\n .yLabel(true)\n // TODO ystroke\n .yStroke((Stroke) null, null, null, (String) null, (String) null);\n\n cartesian.tooltip().positionMode(TooltipPositionMode.POINT);\n\n cartesian.title(\"Steps taken in this week and last week\");\n\n cartesian.yAxis(0).title(\"Steps\");\n cartesian.xAxis(0).labels().padding(5d, 5d, 5d, 5d);\n\n List<DataEntry> seriesData = new ArrayList<>();\n Log.d(\"Size This Week\",stepsTakenModelsThisWeek.size()+\"\");\n for(int i = 0 ; i<7 ; i++){\n CustomDataEntry c = new CustomDataEntry(days[i],stepsTakenModelsLastWeek.get(i).getSteps());\n if(i<stepsTakenModelsThisWeek.size()){\n c.setValue(\"value2\",stepsTakenModelsThisWeek.get(i).getSteps());\n }else{\n if(DateUtilities.getDayInAbbBySelectedDate(stepsTakenModelsLastWeek.get(i).getDate()).equals(\n DateUtilities.getCurrentDayInAbb()))\n {\n c.setValue(\"value2\",stepsToday);\n }else{\n c.setValue(\"value2\",0);\n }\n }\n seriesData.add(c);\n }\n\n Set set = Set.instantiate();\n set.data(seriesData);\n Mapping series1Mapping = set.mapAs(\"{ x: 'x', value: 'value' }\");\n Mapping series2Mapping = set.mapAs(\"{ x: 'x', value: 'value2' }\");\n\n Line series1 = cartesian.line(series1Mapping);\n series1.name(\"Last Week\");\n series1.hovered().markers().enabled(true);\n series1.hovered().markers()\n .type(MarkerType.CIRCLE)\n .size(4d);\n series1.tooltip()\n .position(\"right\")\n .anchor(Anchor.LEFT_CENTER)\n .offsetX(5d)\n .offsetY(5d);\n\n Line series2 = cartesian.line(series2Mapping);\n series2.name(\"This Week\");\n series2.hovered().markers().enabled(true);\n series2.hovered().markers()\n .type(MarkerType.CIRCLE)\n .size(4d);\n series2.tooltip()\n .position(\"right\")\n .anchor(Anchor.LEFT_CENTER)\n .offsetX(5d)\n .offsetY(5d);\n\n\n cartesian.legend().enabled(true);\n cartesian.legend().fontSize(13d);\n cartesian.legend().padding(0d, 0d, 10d, 0d);\n\n chart.setChart(cartesian);\n }", "public void initializeChart(String subtitle) {\n JFreeChart jfreechart = ChartFactory.createXYLineChart(\n subtitle, \"X\", \"Y\", this.dataset.getXYDataset(),\n PlotOrientation.VERTICAL, true, true, false);\n XYPlot xyplot = (XYPlot) jfreechart.getPlot();\n XYLineAndShapeRenderer xylineandshaperenderer = new XYLineAndShapeRenderer();\n xylineandshaperenderer.setBaseLinesVisible(true);\n\n // System.out.println(\"date set series count: \" + xydataset.getSeriesCount());\n // set visible or not shapes of series\n// System.out.printf(\"sets in the dataset: \"); // TODO delete this \"print\" if necessary\n for (int i = 0; i < this.dataset.seriesCount(); i++) {\n// System.out.printf(this.dataset.getSeries(i).getKey() + \" \");\n xylineandshaperenderer.setSeriesLinesVisible(i, false);\n xylineandshaperenderer.setSeriesShapesVisible(i, this.dataset.shapeVisible(i));\n }\n xylineandshaperenderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator());\n xyplot.setRenderer(xylineandshaperenderer);\n NumberAxis numberaxis = (NumberAxis) xyplot.getRangeAxis();\n numberaxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n this.jPanel = new ChartPanel(jfreechart);\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n final String cmd = e.getActionCommand();\n\n if (cmd == null) {\n return;\n } else if (cmd.equals(\"Load Saved Plot\")) {\n final PlotManager pm = this.manager.getPlotManager();\n final List<PlotProperties> propList = pm.loadPlotConfiguration(this.parentFrame);\n for (final PlotProperties props : propList) {\n pm.showPlotUI(props);\n }\n } else if (cmd.equals(\"Save All Open Plots\")) {\n final PlotManager pm = this.manager.getPlotManager();\n pm.savePlotConfigurationAll(this.parentFrame);\n } else if (cmd.equals(\"New Time Series Plot\")) {\n final PlotManager pm = this.manager.getPlotManager();\n pm.configureNewPlot(this.parentFrame, \"Time Series\");\n } else if (cmd.equals(\"New X-Y Plot\")) {\n final PlotManager pm = this.manager.getPlotManager();\n pm.configureNewPlot(this.parentFrame, \"Arbitrary X-Y Plot\");\n } else if (cmd.equals(\"Take Screenshot\")) {\n FileUtils.saveScreenShot(this, getTitle() + \".png\");\n } else if (cmd.equals(\"Close\")) {\n bailOut();\n } else if (cmd.equals(\"Exit\")) {\n System.exit(0);\n } else if (cmd.equals(\"CloseWatchers\")) {\n closeWatchers();\n } else if (cmd.equals(\"Plot\")) {\n plotAction();\n } else if (cmd.equals(\"List\")) {\n listAction();\n } else if (cmd.equals(\"Stats\")) {\n statsAction();\n } else if (cmd.equals(\"Audio\")) {\n audioAction();\n } else if (cmd.equals(\"Print\")) {\n printAction();\n } else if (cmd.equals(\"helpGeneric\")) {\n helpGenericAction();\n } else if (cmd.equals(\"helpThis\")) {\n helpSpecificAction();\n } else if (cmd.equals(\"helpVersion\")) {\n helpAboutAction();\n }\n }", "@Test\n public void test70() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) null);\n Color color0 = (Color)combinedDomainCategoryPlot0.getRangeGridlinePaint();\n CategoryAxis categoryAxis0 = combinedDomainCategoryPlot0.getDomainAxis();\n JFreeChart jFreeChart0 = new JFreeChart((Plot) combinedDomainCategoryPlot0);\n ChartPanel chartPanel0 = new ChartPanel(jFreeChart0, (-1369), (-797), (-797), (-797), (-797), (-797), true, false, true, true, false, false);\n ChartRenderingInfo chartRenderingInfo0 = chartPanel0.getChartRenderingInfo();\n PlotRenderingInfo plotRenderingInfo0 = new PlotRenderingInfo(chartRenderingInfo0);\n Button button0 = null;\n try {\n button0 = new Button(\"yw{>Kt*0}\");\n } catch(HeadlessException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"java.awt.GraphicsEnvironment\", e);\n }\n }", "public void mouseClicked(MouseEvent e) {\n\t\tdouble[] pointLocation = new double[3];\n\t\tdouble x = e.getX();\n\t\tdouble y = e.getY();\n\t\t\n\t\tplotContent.Click(x, y, pointLocation);\n\t\tif(pointLocation[0]==0.0&&pointLocation[1]==0.0&&pointLocation[2]==0.0) {\n\t\t\t\n\t\t}else {\n\t\t\ttradedetail.setText(\"\\n\"+\"Yield = \"+pointLocation[0]+\"\\n\"+\"Days_To_Maturity = \"+pointLocation[1]+\"\\n\"+\"Amount_CHF = \"+pointLocation[2]);\n\t\t}\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n panel.getChartPanel().restoreAutoBounds();\n }", "public void onBtnGenerateClick() {\n taskSpan2s = dataManager.load(TaskSpan2.class)\n .query(\"select t from gantt_TaskSpan2 t\")\n .view(\"taskSpan2-view\")\n .list();\n // prepare the new dataProvider\n ListDataProvider dataProvider = new ListDataProvider();\n\n // fetch the list of -selected- taskSpan\n for (TaskSpan2 taskSpan2: taskSpan2s) {\n // 1. create the list to hold the dynSegments\n List<DynSegment> dynSegments = new ArrayList<>();\n\n // 2. get the list of attached segments\n List<Segment2> segment2s = taskSpan2.getSegments();\n\n // 3. fetch the list of Segments\n for (Segment2 segment2: segment2s) {\n System.out.println(segment2.getTask() + \" \" + segment2.getStart().compareTo(Objects.requireNonNull(dateFrom.getValue())));\n // filters on the dates\n if (\n (segment2.getStart().compareTo(Objects.requireNonNull(dateFrom.getValue())) >= 0)\n &&\n (segment2.getEnd().compareTo(Objects.requireNonNull(dateTo.getValue())) <= 0)\n ) {\n // 3.a create the new dynSegment\n DynSegment dynSegment = new DynSegment(\n segment2.getColor(),\n segment2.getTask(),\n segment2.getStart(),\n segment2.getEnd());\n // 3.b add the new dynSegment to the lis\n dynSegments.add(dynSegment);\n }\n }\n\n // 4. create the dynTaskSpan\n DynTaskSpan dynTaskSpan = new DynTaskSpan(\n taskSpan2.getCategory(),\n dynSegments);\n\n // 5. adds the new dynTaskSpan to the dataProvider\n dataProvider.addItem(new SimpleDataItem(dynTaskSpan));\n }\n\n // sets the dataProvider for the chart\n chart.setDataProvider(dataProvider);\n chart.repaint();\n }", "private JButton createApplyButton() {\r\n apply = new JButton();\r\n apply.setBounds(5, 260, 100, 25);\r\n\r\n add(new SComponent(apply,\r\n new String[] {\"Anpassen\", \"Apply\"},\r\n new String[] {\"Speichert die Farbeinstellungen.\",\r\n \"Saves the color settings.\"}));\r\n\r\n apply.addActionListener(new ActionListener() {\r\n\r\n /** Zeichnet den Graphen mit den ausgewählten\r\n * Frabeinstellungen\r\n *\r\n * @param e ActionEvent\r\n */\r\n public void actionPerformed(final ActionEvent e) {\r\n Color[] col = new Color[8];\r\n for (int i = 0; i < 8; i++) {\r\n if (mainclass.getGraphTyp()\r\n == AbstractGraph.GRAPHTYP_RESIDUAL) {\r\n switch (i) {\r\n case COLOR_EDGE_ONE:\r\n col[i] = chooser[COLOR_EDGE_FLOW]\r\n .getColorSelected();\r\n break;\r\n case COLOR_EDGE_TWO:\r\n col[i] = chooser[COLOR_EDGE_CAP]\r\n .getColorSelected();\r\n break;\r\n case COLOR_EDGE_TOP:\r\n col[i] = chooser[COLOR_EDGE_RTOP]\r\n .getColorSelected();\r\n break;\r\n default: col[i] = chooser[i].getColorSelected();\r\n }\r\n } else {\r\n col[i] = chooser[i].getColorSelected();\r\n }\r\n }\r\n drawer.setColorSettings(col);\r\n\r\n /*GAModel gam = mainclass.getModel();\r\n if (gam.getGraphComponentState()\r\n == GAModel.COMPONENT_VALID) {\r\n gam.setGraphComponentState(GAModel.COMPONENT_OUTDATED);\r\n }*/\r\n mainclass.repaint();\r\n }\r\n });\r\n\r\n return apply;\r\n }", "@Override\r\n \t\t\t\tpublic void onClick(View v) {\n \t\t\t\t\t\r\n \t\t\t\t\tmRenderer.setZoomButtonsVisible(false);\r\n \t\t\t\t\t\r\n \t\t\t\t\t/*Bitmap bmp = Bitmap.createBitmap( 800, 600, Bitmap.Config.ARGB_8888 );\r\n \t\t\t\t\t\r\n \t\t\t\t\t//Bitmap bmp =Bitmap.createBitmap( mChart.getMeasuredWidth(),mChart.getMeasuredHeight(), Bitmap.Config.ARGB_8888 );\r\n \t\t\t\t\t\r\n \t\t\t\t\tCanvas canvas = new Canvas(bmp);\r\n \t\t\t\t\tmChart.draw( canvas );\r\n \t\t\t\t\t\r\n \t\t\t\t\tFile myDir = new File(Environment.getExternalStorageDirectory() + File.separator + \"SpeakingTime Graphs\"); //pour créer le repertoire dans lequel on va mettre notre fichier\r\n \t\t if (!myDir.exists()) {\r\n \t\t \tmyDir.mkdir(); //On crée le répertoire (s'il n'existe pas!!)\r\n \t\t }\r\n \t\t\t\t\t\r\n \t\t\t\t\tFileOutputStream out = null;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tout = new FileOutputStream(Environment.getExternalStorageDirectory() + File.separator + \"SpeakingTime Graphs\" + File.separator + name.substring(0, name.length() - 4) + \"_bargraph.jpg\");\r\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n \t\t\t\t\tbmp.compress( Bitmap.CompressFormat.JPEG, 97, out );\r\n \t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tout.close();\r\n\t\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}*/\r\n \t\t\t\t\t\r\n \t\t\t\t\tModalDialog modalDialog = new ModalDialog();\r\n\t\t\t\t\t\tString boxplots_name = modalDialog.showModalDialogReunionName(BarGraphActivity.this, \"Give a name to this graph\"); \t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (boxplots_name != \"Cancel\"){\r\n\t\t\t\t\t\t\tif (boxplots_name.equalsIgnoreCase(\"\")){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tAlertDialog.Builder alertDialog = new AlertDialog.Builder(BarGraphActivity.this);\r\n\t\t\t\t\t\t\t\talertDialog.setTitle(\"Warning\");\r\n\t\t\t\t\t\t\t\talertDialog.setMessage(\"GIVE A VALID NAME !\");\r\n\t\t\t\t\t\t\t\talertDialog.show();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (SaveGraphOnDisk(boxplots_name) == \"error\") {\r\n\t\t \t\t\t\t\t\tAlertDialog.Builder alertDialog = new AlertDialog.Builder(BarGraphActivity.this);\r\n\t\t\t\t\t\t\t\t\talertDialog.setTitle(\"Warning\");\r\n\t\t\t\t\t\t\t\t\talertDialog.setMessage(\"The graph can't be saved !\");\r\n\t\t\t\t\t\t\t\t\talertDialog.show();\r\n\t\t \t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n \t\t\t\t\t\r\n \t\t\t\t\t\r\n \t\t\t\t\t\r\n \t\t\t\t\tmRenderer.setZoomButtonsVisible(true);\r\n \t\t\t\t}", "public ThongKeHD() {\n initComponents();\n initialization();\n performEvent();\n //drawChart(2021);\n }", "public void SetScatterPlotChartImage(String scatterPlot) {\n\t\tboolean test = true;\n\t\t\n\t\tif((scatterPlot.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"SetScatterPlotChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((scatterPlot.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"SetScatterPlotChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"SetScatterPlotChartImage():: chosen image is set to: \" \n\t\t \t+ scatterPlot);\n\t\t}\n\t\tm_ScatterPlotChartImage = scatterPlot;\n\t}", "public void mouseClicked(MouseEvent e) {\r\n //panel.addCircle(new Circle(e.getX(), e.getY(), 24, Color.BLUE));\r\n // super.mouseClicked(e);\r\n water.addWater(e.getX(), e.getY(), 50);\r\n }", "public void MakeBar3D() {\n\t\tBarButton3D = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t\tGet3DBarChartImage())));\n\t\tBarButton3D.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\t\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart3D(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"3D Bar Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart3D(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\t\n\t\t\n\t\tChartTypeInterface.add(BarButton3D);\n\t}", "public void addPlot(WebPlot p) {\n addPlot(p,true);\n }", "public void addButtonToCoolBar(JButton button) {\n\t\t_coolBar.addButton(button);\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) { \n \n XYChart.Series series = new XYChart.Series<>();\n \n \n series.setName(\"Gagnant\");\n series.getData().add(new XYChart.Data(\"Jan\", 100));\n series.getData().add(new XYChart.Data(\"Fev\", 170));\n series.getData().add(new XYChart.Data(\"Mars\", 197));\n series.getData().add(new XYChart.Data(\"Avr\", 160));\n series.getData().add(new XYChart.Data(\"Mai\", 165));\n series.getData().add(new XYChart.Data(\"Juin\", 179));\n series.getData().add(new XYChart.Data(\"Juil\", 195));\n series.getData().add(new XYChart.Data(\"Aout\", 140));\n series.getData().add(new XYChart.Data(\"Sept\", 121));\n series.getData().add(new XYChart.Data(\"Oct\", 173));\n series.getData().add(new XYChart.Data(\"Nov\", 185));\n series.getData().add(new XYChart.Data(\"Dec\", 150));\n \n XYChart.Series perdant = new XYChart.Series<>();\n perdant.setName(\"Perdant\");\n \n perdant.getData().add(new XYChart.Data(\"Jan\", 80));\n perdant.getData().add(new XYChart.Data(\"Fev\", 60));\n perdant.getData().add(new XYChart.Data(\"Mars\", 80));\n perdant.getData().add(new XYChart.Data(\"Avr\", 70));\n perdant.getData().add(new XYChart.Data(\"Mai\", 70));\n perdant.getData().add(new XYChart.Data(\"Juin\", 60));\n perdant.getData().add(new XYChart.Data(\"Juil\", 100));\n perdant.getData().add(new XYChart.Data(\"Aout\", 80));\n perdant.getData().add(new XYChart.Data(\"Sept\", 50));\n perdant.getData().add(new XYChart.Data(\"Oct\", 79));\n perdant.getData().add(new XYChart.Data(\"Nov\", 70));\n perdant.getData().add(new XYChart.Data(\"Dec\", 12));\n \n\n Tooltip tooltip = new Tooltip(\"Le nombre de gagnants ou cours des mois augmentent souvent.\");\n areaChart.getStylesheets().add(\"-fx-color:green;\");\n areaChart.getData().addAll(series, perdant);\n BarChart.getStylesheets().add(\"chart-bar series<1> bar-legend-symbol default-color<red>\");\n BarChart.getData().addAll(perdant);\n\n\n }", "public void actionPerformed(final ActionEvent e) {\n\t\t//dynmanic graph modification\n\t\tif (e.getActionCommand().equals(\"show\")) {\n\n\t\t\t//clear the datatsets I have to put a new fresh one \n\t\t\t// set infinite to false in order to let my button be released\n\t\t\tinfinite=false;\n\t\t\tseriesAvg.clear();\n\t\t\tseries99.clear();\n\t\t\tseries95.clear();\n\n\t\t\t//getting the entred values\n\t\t\tactionString = actionsListDynamic.getSelectedItem().toString();\n\t\t\tfeatureString = featuresListDynamic.getSelectedItem().toString();\n\t\t\t\n\t\t\t//modifying the query with the entred values\n\t\t\tif(actionString.equals(\"All\") && featureString.equals(\"All\")){\n\t\t\t\tactionString=\"%\";\n\t\t\t\tfeatureString=\"%\";\n\t\t\t}\n\t\t\telse if(!actionString.equals(\"All\") && featureString.equals(\"All\")) {\t\t\t\t\t\t\n\t\t\t\tfeatureString=\"%\";\t\n\t\t\t}\n\t\t\telse if(actionString.equals(\"All\") && !featureString.equals(\"All\")) {\n\t\t\t\tactionString=\"%\";\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//do nothing\n\t\t\t}\n\t\t\tinfinite=true;\n\t\t}\n\t\t\n\t\t//static chart modification\n\t\tif (e.getActionCommand().equals(\"showStatic\")) {\t\n\t\t\t//getting the entred values\n\t\t\tactionStringH = actionsListStatic.getSelectedItem().toString();\n\t\t\tfeatureStringH = featuresListStatic.getSelectedItem().toString();\n\t\t\tyear=textAreaYearStatic.getText();\n\t\t\tmonth=textAreaMonthStatic.getText();\n\t\t\tday=textAreaDayStatic.getText();\n\t\t\thourString=textAreaMinuteStatic.getText().toString();\t\n\t\t\t\n\t\t\t//modifying the graph with entered values \n\t\t\tif (year.isEmpty()&&month.isEmpty()&&day.isEmpty()){\n\t\t\t\tqueryNumber=0;\n\t\t\t\tyear=\"2016\";\n\t\t\t\tmonth=\"09\";\n\n\t\t\t}\n\n\t\t\tif ((!year.isEmpty())&&(!month.isEmpty())&&(day.isEmpty())){\n\t\t\t\tqueryNumber=0;\n\n\t\t\t}\n\n\t\t\tif ((!day.isEmpty())&&(hourString.isEmpty())) {\n\t\t\t\tqueryNumber=1; \n\t\t\t}\t\n\n\t\t\tif (!(hourString.isEmpty())) {\n\t\t\t\tqueryNumber=2; \n\t\t\t}\n\n\t\t\tif(actionStringH.equals(\"All\") && featureStringH.equals(\"All\") ){\n\t\t\t\tactionStringH=\"%\";\n\t\t\t\tfeatureStringH=\"%\";\n\t\t\t}\n\t\t\telse if(!actionStringH.equals(\"All\") && featureStringH.equals(\"All\")) {\t\t\t\t\t\t\n\t\t\t\tfeatureStringH=\"%\";\t\n\t\t\t}\n\t\t\telse if(actionStringH.equals(\"All\") && !featureStringH.equals(\"All\")) {\n\t\t\t\tactionStringH=\"%\";\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//do nothing\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tdatasetStatic=createDataset();\n\t\t\t} catch (SQLException | InterruptedException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\t\n\n\t\t\t//remove what is drawing in the static chart and replace it with a fresh \n\t\t\t//vearsion of the chart depending on the values entred by the user\n\t\t\tpanelStatic.remove(chartPanelStatic);\n\t\t\tchartStatic = createChart(datasetStatic);\n\t\t\torg.jfree.chart.axis.CategoryAxis domainAxis = chartStatic.getCategoryPlot().getDomainAxis(); \n\t\t\tdomainAxis.setTickLabelFont(font1);\n\t\t\tdomainAxis.setCategoryLabelPositions(CategoryLabelPositions.createUpRotationLabelPositions(Math.PI/6));\n\t\t\tchartPanelStatic = new ChartPanel(chartStatic, false);\n\t\t\tpanelStatic.add(chartPanelStatic);\n\t\t\tpanelStatic.setVisible(true);\n\t\t\tpanelStatic.repaint();\n\t\t\tpanelStatic.validate();\t\t\t\n\t\t}\t\t\n\t}", "public void plotData(boolean appendingData, boolean mean) {\n\n // Add data to existing plaot if appending.\n if (appendingData && chartpanel != null) {\n appendData();\n } else {\n String xaxisname = \"Plane\";\n // Create an chart empty.\n if (mean) {\n xaxisname = \"Length\";\n }\n final JFreeChart chart = createChart(xaxisname);\n chart.setBackgroundPaint(Color.WHITE); //DJ: 09/22/2014\n\n // Get the data.\n if (mean) {\n data = getLineDataset();\n } else {\n data = getDataset();\n }\n\n // Apply data to the plot\n MimsXYPlot xyplot = (MimsXYPlot) chart.getPlot();\n\n xyplot.setBackgroundPaint(Color.WHITE); //DJ: 09/22/2014\n\n xyplot.setDataset(data);\n xyplot.setRois(rois);\n xyplot.setParent(this);\n\n //DJ 09/22/2014\n final int numberOfSeries = xyplot.getSeriesCount();\n //System.out.println(\"number-of-series = \" + numberOfSeries);\n\n /*\n System.out.println(\"range up limit = \" + xyplot.getRangeAxis().getRange().getUpperBound());\n System.out.println(\"range down limit = \" + xyplot.getRangeAxis().getRange().getLowerBound());\n System.out.println(\"domain up limit = \" + xyplot.getDomainAxis().getRange().getUpperBound());\n System.out.println(\"domain down limit = \" + xyplot.getDomainAxis().getRange().getLowerBound());\n */\n // Generate the layout.\n //chartpanel = new MimsChartPanel(chart);\n chartpanel = new MimsChartPanel(chart);\n chartpanel.addMouseListener(this);\n chartpanel.setPreferredSize(new java.awt.Dimension(600, 400));\n String lastFolder = ui.getLastFolder();\n if (lastFolder != null) {\n if (new File(lastFolder).exists()) {\n chartpanel.setDefaultDirectoryForSaveAs(new File(lastFolder));\n }\n }\n this.add(chartpanel);\n\n chartpanel.setNumberOfSeries(numberOfSeries);\n\n // DJ: 09/22/2014\n // Add menu item for thikining or the plot lines\n // increase lines thikness\n JMenuItem incresaseLinesThikness = new JMenuItem(\"Increase Lines Thickness\");\n incresaseLinesThikness.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n //DJ\n\n lineThikness = chartpanel.getLineThikness();\n\n if (chartpanel.setLineThikness(lineThikness + 0.5f)) {\n lineThikness = chartpanel.getLineThikness();\n //if (lineThikness + 1.0f <= maxThikness) {\n // lineThikness += 1.0f;\n\n BasicStroke stroke = new BasicStroke(lineThikness);\n Plot plot = chart.getXYPlot();\n\n if (plot instanceof CategoryPlot) {\n CategoryPlot categoryPlot = chart.getCategoryPlot();\n CategoryItemRenderer cir = categoryPlot.getRenderer();\n try {\n for (int i = 0; i < numberOfSeries; i++) {\n cir.setSeriesStroke(i, stroke); //series line style\n }\n } catch (Exception ex) {\n System.err.println(ex);\n }\n } else if (plot instanceof XYPlot) {\n\n XYPlot xyPlot = chart.getXYPlot();\n XYItemRenderer xyir = xyPlot.getRenderer();\n try {\n for (int i = 0; i < numberOfSeries; i++) {\n xyir.setSeriesStroke(i, stroke); //series line style\n }\n } catch (Exception ex) {\n System.err.println(ex);\n }\n }\n }\n }\n });\n\n // increase lines thikness\n JMenuItem decreaseLinesThikness = new JMenuItem(\"Decrease Lines Thickness\");\n decreaseLinesThikness.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n //DJ\n lineThikness = chartpanel.getLineThikness();\n\n if (chartpanel.setLineThikness(lineThikness - 0.5f)) {\n lineThikness = chartpanel.getLineThikness();\n //if (lineThikness - 1.0f >= minThikness) {\n // lineThikness -= 1.0f;\n\n BasicStroke stroke = new BasicStroke(lineThikness);\n Plot plot = chart.getXYPlot();\n\n if (plot instanceof CategoryPlot) {\n CategoryPlot categoryPlot = chart.getCategoryPlot();\n CategoryItemRenderer cir = categoryPlot.getRenderer();\n try {\n for (int i = 0; i < numberOfSeries; i++) {\n cir.setSeriesStroke(i, stroke); //series line style\n }\n } catch (Exception ex) {\n System.err.println(ex);\n }\n } else if (plot instanceof XYPlot) {\n\n XYPlot xyPlot = chart.getXYPlot();\n XYItemRenderer xyir = xyPlot.getRenderer();\n try {\n for (int i = 0; i < numberOfSeries; i++) {\n xyir.setSeriesStroke(i, stroke); //series line style\n }\n } catch (Exception ex) {\n System.err.println(ex);\n }\n }\n }\n }\n });\n\n chartpanel.getPopupMenu().addSeparator();\n chartpanel.getPopupMenu().add(incresaseLinesThikness);\n chartpanel.getPopupMenu().add(decreaseLinesThikness);\n\n JMenu changePlotColor = new JMenu(\"Change Plot Color\");\n final JMenuItem black = new JMenuItem(\"BLACK\");\n final JMenuItem blue = new JMenuItem(\"BLUE\");\n final JMenuItem grey = new JMenuItem(\"GRAY\");\n final JMenuItem green = new JMenuItem(\"GREEN\");\n final JMenuItem red = new JMenuItem(\"RED\");\n final JMenuItem yellow = new JMenuItem(\"YELLOW\");\n final JMenuItem purple = new JMenuItem(\"PURPLE\");\n final JMenuItem brown = new JMenuItem(\"BROWN\");\n final JMenuItem orange = new JMenuItem(\"ORANGE\");\n final JMenuItem darkGreen = new JMenuItem(\"DARK GREEN\");\n final JMenuItem lightBlue = new JMenuItem(\"LIGHT BLUE\");\n\n black.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(black.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 97, 'a');\n chartpanel.keyPressed(ev);\n }\n });\n blue.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(blue.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 98, 'b');\n chartpanel.keyPressed(ev);\n }\n });\n grey.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(grey.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 101, 'e');\n chartpanel.keyPressed(ev);\n }\n });\n green.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(green.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 103, 'g');\n chartpanel.keyPressed(ev);\n }\n });\n red.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(red.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 114, 'r');\n chartpanel.keyPressed(ev);\n }\n });\n yellow.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(yellow.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 121, 'y');\n chartpanel.keyPressed(ev);\n }\n });\n purple.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(purple.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 112, 'p');\n chartpanel.keyPressed(ev);\n }\n });\n brown.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(brown.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 119, 'w');\n chartpanel.keyPressed(ev);\n }\n });\n orange.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(orange.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 111, 'o');\n chartpanel.keyPressed(ev);\n }\n });\n darkGreen.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(darkGreen.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 100, 'd');\n chartpanel.keyPressed(ev);\n }\n });\n lightBlue.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(lightBlue.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 108, 'l');\n chartpanel.keyPressed(ev);\n }\n });\n\n changePlotColor.add(black);\n changePlotColor.add(blue);\n changePlotColor.add(grey);\n changePlotColor.add(green);\n changePlotColor.add(red);\n changePlotColor.add(yellow);\n changePlotColor.add(purple);\n changePlotColor.add(brown);\n changePlotColor.add(orange);\n changePlotColor.add(darkGreen);\n changePlotColor.add(lightBlue);\n\n chartpanel.getPopupMenu().add(changePlotColor);\n\n // Add menu item for showing/hiding crosshairs.\n JMenuItem xhairs = new JMenuItem(\"Show/Hide Crosshairs\");\n xhairs.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n showHideCrossHairs(chartpanel);\n }\n });\n chartpanel.getPopupMenu().addSeparator();\n chartpanel.getPopupMenu().add(xhairs);\n // Add menu item for showing/hiding crosshairs.\n JMenuItem pointhairs = new JMenuItem(\"Add point roi at crosshairs\");\n pointhairs.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n if (pointX > 0 && pointY > 0) {\n ui.getRoiManager().add(new PointRoi(pointX, pointY));\n ui.updateAllImages();\n }\n }\n });\n chartpanel.getPopupMenu().add(pointhairs);\n // Add menu item for toggling between linear and log scales.\n JMenuItem logscale = new JMenuItem(\"Log/Linear scale\");\n logscale.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n MimsJFreeChart.logLinScale(chartpanel);\n }\n });\n chartpanel.getPopupMenu().add(logscale);\n\n // Add menu item for exporting plot to report.\n /*JMenuItem genreport = new JMenuItem(\"Generate Report\");\n genreport.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n generateReport();\n }\n });\n chartpanel.getPopupMenu().add(genreport);*/\n JMenuItem libreoffice = new JMenuItem(\"Add to Libreoffice\");\n libreoffice.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mimsUno.insertGraph(getImage(), \"test\", \"test\", \"test\");\n }\n });\n chartpanel.getPopupMenu().add(libreoffice);\n\n // Replace Save As... menu item.\n chartpanel.getPopupMenu().remove(3);\n JMenuItem saveas = new JMenuItem(\"Save as...\");\n saveas.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n saveAs();\n }\n });\n chartpanel.getPopupMenu().add(saveas, 3);\n\n // Add an option for getting the underlying data\n JMenuItem asTextMenuItem = new javax.swing.JMenuItem(\"Display text\");\n asTextMenuItem.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n displayProfileData();\n }\n });\n chartpanel.getPopupMenu().add(asTextMenuItem, 2);\n\n // Add key listener.\n KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new KeyEventDispatcher() {\n public boolean dispatchKeyEvent(KeyEvent e) {\n if (e.getID() == KeyEvent.KEY_PRESSED && thisHasFocus()) {\n chartpanel.keyPressed(e);\n }\n return false;\n }\n });\n\n pack();\n setVisible(true);\n\n }\n }", "private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n\n JTable curTable = jTable1;\n Curpan = jPanel3;\n\n if (jCheckBox1.isSelected()) {\n int succ = curTable.getRowCount();\n Cloud cloud = new Cloud();\n JPanel panel = new JPanel();\n panel.setLayout(new MigLayout(\"wrap 7\"));\n for (int i = 0; i < succ; i++) {\n for (int j = 0; j < Integer.parseInt(curTable.getModel().getValueAt(i, 1).toString()); j++) {\n cloud.addTag(curTable.getModel().getValueAt(i, 0).toString());\n }\n }\n for (Tag tag : cloud.tags()) {\n final JLabel label = new JLabel(tag.getName());\n label.setOpaque(false);\n label.setFont(label.getFont().deriveFont((float) tag.getWeight() * 10));\n panel.add(label);\n }\n // panel.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\n Curpan.removeAll();\n Curpan.revalidate();\n panel.setSize(300, 300);\n Curpan.setLayout(new BorderLayout());\n Curpan.add(panel, BorderLayout.CENTER);\n Curpan.revalidate();\n panel.setVisible(true);\n Curpan.setVisible(true);\n\n } else {\n int succ = curTable.getRowCount();\n final DefaultCategoryDataset dataset = new DefaultCategoryDataset();\n for (int i = 0; i < succ; i++) {\n dataset.addValue(i, curTable.getModel().getValueAt(i, 0).toString(), curTable.getModel().getValueAt(i, 1).toString());\n }\n JFreeChart barChart = ChartFactory.createBarChart(\n \"\",\n \"frequency\",\n \"count\",\n dataset,\n PlotOrientation.VERTICAL,\n true, true, false);\n ChartPanel chartPanel = new ChartPanel(barChart);\n chartPanel.setPreferredSize(new java.awt.Dimension(300, 300));\n\n Curpan.removeAll();\n Curpan.revalidate();\n Curpan.setLayout(new BorderLayout());\n Curpan.add(chartPanel, BorderLayout.CENTER);\n Curpan.revalidate();\n chartPanel.setVisible(true);\n Curpan.setVisible(true);\n\n }\n }", "private void addButton() {\n // do not show warning messages in IMR gui bean. this is needed\n // so that warning messages for site parameters are not shown when Add graph is clicked\n imrGuiBean.showWarningMessages(false);\n try{\n calc = new HazardCurveCalculator();\n }catch(Exception e){\n e.printStackTrace();\n }\n // check if progress bar is desired and set it up if so\n if(this.progressCheckBox.isSelected()) {\n Thread t = new Thread(this);\n t.start();\n\n timer = new Timer(200, new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n try{\n if(calc.getCurrRuptures()!=-1){\n progressClass.updateProgress(numSA_PeriodValDone,numSA_PeriodVals);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n if(isIndividualCurves) {\n drawGraph();\n //isIndividualCurves = false;\n }\n if (hazCalcDone) {\n timer.stop();\n progressClass.dispose();\n drawGraph();\n }\n }\n });\n\n // timer for disaggregation progress bar\n /*disaggTimer = new Timer(500, new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n if(disaggCalc.getCurrRuptures()!=-1)\n disaggProgressClass.updateProgress(disaggCalc.getCurrRuptures(), disaggCalc.getTotRuptures());\n if (disaggCalc.done()) {\n // Toolkit.getDefaultToolkit().beep();\n disaggTimer.stop();\n disaggProgressClass.dispose();\n }\n }\n });*/\n }\n else {\n this.computeHazardCurve();\n this.drawGraph();\n }\n }", "Icon getPlotterIcon();", "public void registerButtons()\n\t{\n\t\tplot.addActionListener(new ButtonListener());\n\t\tin.addActionListener(new ButtonListener(1));\n\t\tout.addActionListener(new ButtonListener(2));\n\t\t\n\t}", "public void mousePressedOnPlot(MouseEvent ev)\n {\n if (traceOK) animate(ev.getX());\n }", "public testChart() {\n initComponents();\n }", "private void setGraphDataAndStyle() {\n graphView.addSeries(new LineGraphSeries(getSeriesData()));\n graphView.setTitle(\"配速\");\n graphView.getGridLabelRenderer().setLabelFormatter(new DateAxisLabelFormatter(getActivity()));\n graphView.getGridLabelRenderer().setNumVerticalLabels(locations.size());\n graphView.getViewport().setMinX(locations.get(0).getTime());\n graphView.getViewport().setMaxX(locations.get(locations.size()-1).getTime());\n graphView.getViewport().setXAxisBoundsManual(true);\n\n }", "@Override\n @Transactional\n public void getTheSpecial() {\n log.info(\"Running \\\"The Special\\\"...\");\n\n log.info(\"Creating plot...\");\n Chart plot = new Chart();\n plot.setName(\"My_Plot_\" + RandomUtils.nextInt());\n Map<String, Object> map = new HashMap<>();\n map.put(\"key1\", \"value1\");\n map.put(\"key2\", 2);\n plot.setOptions(map);\n plot.setTopic(topicDao.findOne(\"test\"));\n\n List<Map<String, Object>> mainPlotData = new ArrayList<Map<String, Object>>();\n\n for (Integer i = 0; i < 1; i++) {\n Map<String, Object> itemData = new HashMap<String, Object>();\n\n // Generate data set\n List<List<Double>> data = new ArrayList<>();\n for (Double j = 0D; j < 20; j++) {\n List<Double> bar = new ArrayList<>();\n bar.add(j);\n bar.add(Math.sin(j));\n data.add(bar);\n }\n\n itemData.put(\"data\", data);\n itemData.put(\"label\", \"Sin\");\n itemData.put(\"color\", \"#000000\");\n\n mainPlotData.add(itemData);\n }\n //plot.setData(mainPlotData);\n\n Map<String, Object> mainOptions = new HashMap<>();\n\n Map<String, Object> bars = new HashMap<>();\n bars.put(\"show\", true);\n bars.put(\"barWidth\", 0.5);\n bars.put(\"fill\", 0.9);\n mainOptions.put(\"bars\", bars);\n\n Map<String, Object> xaxis = new HashMap<>();\n bars.put(\"ticks\", new ArrayList<String>());\n bars.put(\"autoscaleMargin\", 0.02);\n mainOptions.put(\"xaxis\", xaxis);\n\n Map<String, Object> yaxis = new HashMap<>();\n bars.put(\"min\", -2);\n bars.put(\"max\", 2);\n mainOptions.put(\"yaxis\", yaxis);\n \n Map<String, Object> grid = new HashMap<>();\n List<Map<String, Object>> markings = new ArrayList<>();\n Map<String, Object> markingItem;\n Map<String, Object> axisItem;\n\n markingItem = new HashMap<>();\n markingItem.put(\"color\", \"#F6F6F6\");\n axisItem = new HashMap<>();\n axisItem.put(\"from\", 1);\n markingItem.put(\"yaxis\", axisItem);\n markings.add(markingItem);\n\n markingItem = new HashMap<>();\n markingItem.put(\"color\", \"#F6F6F6\");\n axisItem = new HashMap<>();\n axisItem.put(\"to\", -1);\n markingItem.put(\"yaxis\", axisItem);\n markings.add(markingItem);\n\n markingItem = new HashMap<>();\n markingItem.put(\"color\", \"#F6F6F6\");\n markingItem.put(\"lineWidth\", 1);\n axisItem = new HashMap<>();\n axisItem.put(\"from\", 2);\n axisItem.put(\"to\", 2);\n markingItem.put(\"xaxis\", axisItem);\n markings.add(markingItem);\n\n markingItem = new HashMap<>();\n markingItem.put(\"color\", \"#F6F6F6\");\n markingItem.put(\"lineWidth\", 1);\n axisItem = new HashMap<>();\n axisItem.put(\"from\", 8);\n axisItem.put(\"to\", 8);\n markingItem.put(\"xaxis\", axisItem);\n markings.add(markingItem);\n\n grid.put(\"markings\", markings);\n mainOptions.put(\"grid\", grid);\n\n plot.setOptions(mainOptions);\n\n try {\n plotService.save(plot);\n } catch (InvalidChartException e) {\n log.error(\"Couldn't create the plot.\");\n }\n\n List<Post> posts = datastoreService.findByTopicId(\"test\", Post.class);\n log.info(\"Posts count is <\" + posts.size() + \">\");\n\n log.info(\"That's it. Have fun!\");\n\n return;\n }", "public DatasetPieChartFiltersComponent() {\n\n //init icon\n this.setStyleName(\"filterbtn\");\n this.addStyleName(\"unselectedpiechart\");\n icon = new Image();\n icon.setSource(defaultTheam);\n this.addComponent(icon);\n icon.setWidth(100, Unit.PERCENTAGE);\n icon.setHeight(100, Unit.PERCENTAGE);\n this.addLayoutClickListener(DatasetPieChartFiltersComponent.this);\n this.setDescription(\"Dataset filters\");\n\n popupBody = new GridLayout(4, 1000);\n\n HorizontalLayout btnsFrame = new HorizontalLayout();\n popupWindow = new PopupWindowFrameWithFunctionsBtns(\"Dataset Explorer\", new VerticalLayout(popupBody), btnsFrame);\n popupWindow.setFrameWidth(screenWidth);\n popupWindow.setFrameHeight(screenHeight - 24);\n //init datasetructure\n activeDatasetMap = new HashMap<>();\n //init pie-chart filters\n this.initIntercativeDatasetFilters();\n HorizontalLayout leftsideWrapper = new HorizontalLayout();\n btnsFrame.addComponent(leftsideWrapper);\n btnsFrame.setComponentAlignment(leftsideWrapper, Alignment.TOP_LEFT);\n leftsideWrapper.setSpacing(true);\n\n InformationButton info = new InformationButton(\"The provided filters allow for the selection of subsets of the available data for the currently selected disease categories. A selection in one chart will result in the other charts updating to show only the remaining options. Click \\\"Apply\\\" to use the filters.\", true);\n leftsideWrapper.addComponent(info);\n\n HorizontalLayout btnLayout = new HorizontalLayout();\n btnLayout.setWidthUndefined();\n btnLayout.setSpacing(true);\n btnsFrame.addComponent(btnLayout);\n btnsFrame.setComponentAlignment(btnLayout, Alignment.MIDDLE_RIGHT);\n\n Button applyFilters = new Button(\"Apply\");\n applyFilters.setDescription(\"Apply the selected filters\");\n applyFilters.setStyleName(ValoTheme.BUTTON_TINY);\n\n btnLayout.addComponent(applyFilters);\n applyFilters.addClickListener((Button.ClickEvent event) -> {\n Set<Integer> filteredSelectionSet = filterSelectionUnit();\n DatasetPieChartFiltersComponent.this.updateSystem(filteredSelectionSet);\n if (selectedDatasetNumbers.size() > 1) {\n applyFilterIcon();\n } else {\n resetFilterIcon();\n }\n popupWindow.view();\n\n });\n\n Button unselectAllBtn = new Button(\"Clear\");\n unselectAllBtn.setStyleName(ValoTheme.BUTTON_TINY);\n btnLayout.addComponent(unselectAllBtn);\n btnLayout.setComponentAlignment(unselectAllBtn, Alignment.TOP_LEFT);\n unselectAllBtn.setDescription(\"Clear all selections\");\n unselectAllBtn.addClickListener((Button.ClickEvent event) -> {\n singlefilter = false;\n DatasetPieChartFiltersComponent.this.resetFilters();\n\n });\n\n }", "public void initView(ViewModule mod) {\r\n parent = (IGAFitnessPlotWindow)mod;\r\n\r\n // this will hold the tables to be graphed\r\n //fitnessTable = new FitnessTable();\r\n // this will hold the gui components\r\n runView = new RunView();\r\n runView.enableSelection();\r\n\r\n // Main Button Panel\r\n float h,s,b;\r\n h = 0.219F;\r\n s = 0.141F;\r\n b = 0.823F;\r\n buttonPanel.setBackground(Color.getHSBColor(h,s,b));\r\n buttonPanel.setBorder(BorderFactory.createLineBorder(Color.white,2));\r\n back = new JButton(\"Back\");\r\n back.addActionListener(this);\r\n\r\n quit = new JButton(\"Quit\");\r\n quit.addActionListener(new AbstractAction() {\r\n public void actionPerformed(ActionEvent e) {\r\n viewCancel();\r\n }\r\n });\r\n buttonPanel.add(quit);\r\n\r\n\r\n next = new JButton(\"Next\");\r\n next.addActionListener(new AbstractAction() {\r\n public void actionPerformed(ActionEvent e) {\r\n boolean [] selectedIndivs = new boolean [currentPop.size()];\r\n // get selection flags from the scatter plots\r\n if (currentPop != null) {\r\n for (int i = 0; i < currentPop.size() ; i++){\r\n // System.out.println(\"**************************\");\r\n // System.out.println(\"selected[\"+i+\"] \"+currentPopInfo.tableModel.plots[0][0].selected[i]);\r\n // System.out.println(\"selected[\"+i+\"] \"+currentPopInfo.tableModel.plots[1][0].selected[i]);\r\n // System.out.println(\"selected[\"+i+\"] \"+currentPopInfo.tableModel.plots[0][1].selected[i]);\r\n // System.out.println(\"selected[\"+i+\"] \"+currentPopInfo.tableModel.plots[1][1].selected[i]);\r\n // System.out.println(\"**************************\");\r\n\r\n // selectedIndivs[i] = false;\r\n // if((currentPopInfo.tableModel.plots[0][0].selected[i] == true) ||\r\n // (currentPopInfo.tableModel.plots[0][1].selected[i] == true) ||\r\n // (currentPopInfo.tableModel.plots[1][0].selected[i] == true) ||\r\n // (currentPopInfo.tableModel.plots[1][1].selected[i] == true) ){\r\n selectedIndivs[i] = fitnessTable.getSelectedFlag(i);\r\n // }\r\n }\r\n\r\n // for testing\r\n //for (int i = 0; i < 8 ; i++){\r\n // selectedIndivs[i+currentGen] = true;\r\n //}\r\n ////////////\r\n\r\n }else{\r\n System.out.println(\"ERROR - POP IS NULL!!!\");\r\n }\r\n // update selection flags to the population table\r\n currentPopTable.addColumn(new BooleanColumn(currentPop.size()));\r\n currentPopTable.setColumnLabel(\"Selected Individuals\", currentPopTable.getNumColumns() - 1);\r\n for (int i =0; i < currentPopTable.getNumRows(); i++){\r\n currentPopTable.setBoolean(selectedIndivs[i] , i , currentPopTable.getNumColumns() - 1);\r\n }\r\n \r\n if(currentPopTable == null ){\r\n System.out.println(\"ERROR - POP IS NULL\");\r\n }\r\n\r\n pushOutput(currentPop, 0);\r\n pushOutput(currentPopTable, 1);\r\n\r\n // viewCancel();\r\n viewDone(\"Done\");\r\n }\r\n });\r\n buttonPanel.add(next);\r\n\r\n // Dimension dim = getToolkit().getScreenSize();\r\n buttonPanel.setMinimumSize(new Dimension(800, 50));\r\n buttonPanel.createToolTip();\r\n\r\n add(buttonPanel, BorderLayout.SOUTH);\r\n\r\n // repaint();\r\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}" ]
[ "0.6762524", "0.6683712", "0.66263044", "0.6519382", "0.6487477", "0.6482449", "0.6467898", "0.6363972", "0.6361265", "0.6195573", "0.61696446", "0.61598563", "0.6131609", "0.61179894", "0.6038751", "0.59317344", "0.59196013", "0.5822293", "0.5821077", "0.58023083", "0.578371", "0.5777883", "0.5761286", "0.5739256", "0.5695437", "0.5689752", "0.5684808", "0.5675424", "0.56404024", "0.563809", "0.56334394", "0.5606326", "0.5583774", "0.55835587", "0.55703783", "0.5564232", "0.55588394", "0.5554561", "0.55346453", "0.5531198", "0.5512697", "0.5497452", "0.54863685", "0.5478569", "0.54753774", "0.5475301", "0.5468882", "0.54602826", "0.54572034", "0.54548204", "0.5454366", "0.544969", "0.54432493", "0.5440434", "0.54285336", "0.5418591", "0.5414439", "0.5396669", "0.5393247", "0.5392003", "0.537786", "0.5376533", "0.537637", "0.5363029", "0.53377557", "0.53346926", "0.5325781", "0.5323477", "0.5318623", "0.53059727", "0.52964324", "0.52937204", "0.5287616", "0.5278937", "0.526678", "0.52657014", "0.5265191", "0.52615345", "0.5256499", "0.52561444", "0.5255745", "0.5254801", "0.525393", "0.5251794", "0.5247662", "0.52459115", "0.5207156", "0.5204197", "0.5203015", "0.51933527", "0.5191004", "0.5191004", "0.5191004", "0.5191004", "0.5191004", "0.5191004", "0.5191004", "0.5191004", "0.5191004", "0.5191004" ]
0.7965934
0
Makes the Stacked Area Chart button
public void MakeStacked() { StackedButton = new JButton( new ImageIcon(getClass().getResource( GetStackedAreaChartImage()))); StackedButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { GetHost().instructionText.setVisible(false); GetHost().ExportEnabled(); if(GetHost().GetTitle() == UNSET) { GetHost().LeftPanelContent(new StackedAreaChart( GetHost().GetGraphData(), "Stacked Area Chart", GetHost().GetColourScheme(),GetHost())); }else { GetHost().LeftPanelContent(new StackedAreaChart( GetHost().GetGraphData(), GetHost().GetTitle(), GetHost().GetColourScheme(),GetHost())); } } }); ChartTypeInterface.add(StackedButton); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "PlotAreaType createPlotAreaType();", "@Override\n public void actionPerformed(ActionEvent e) {\n panel.getChartPanel().restoreAutoBounds();\n }", "@Override\n public void onClick() {\n // TODO: Disabled adding shape on just click. It should be added inside the BPMNDiagram by default.\n // log(Level.FINE, \"Palette: Adding \" + description);\n // addShapeToCanvasEvent.fire(new AddShapeToCanvasEvent(definition, factory));\n }", "public void chartMouseClicked(ChartMouseEvent event) {\n }", "private void initialize() {\r\n\t\t//frame = new JFrame();\r\n\t\tframe.setSize(725, 482);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t//frame.getContentPane().setLayout(null);\r\n\t\t\r\n\t\t\r\n\t\tDefaultCategoryDataset dataset= new DefaultCategoryDataset();\r\n\t\t//JOptionPane.showMessageDialog(null, \"BUTTON CLICKED!!!\");\r\n\t\t//LableMessage.setText(\"BUTTON CLICKED!!!\");\r\n\t\t\r\n\t\t//Pain, Drowsiness, Nausea, Anxiety, and Depression\r\n\t\tdataset.setValue(2, \"day1\",\"Pain\");\r\n\t\tdataset.setValue(5, \"day2\",\"Pain\");\r\n\t\tdataset.setValue(4, \"day3\",\"Pain\");\r\n\t\tdataset.setValue(6, \"day1\", \"Drowsiness\");\r\n\t\tdataset.setValue(10, \"day2\", \"Drowsiness\");\r\n\t\tdataset.setValue(8, \"day3\", \"Drowsiness\");\r\n\t\tdataset.setValue(1, \"day1\", \"Nausea\");\r\n\t\tdataset.setValue(7, \"day2\", \"Nausea\");\r\n\t\tdataset.setValue(5, \"day3\", \"Nausea\");\r\n\t\tdataset.setValue(3,\"day1\",\"Anxiety\");\t\r\n\t\tdataset.setValue(8,\"day2\",\"Anxiety\");\r\n\t\tdataset.setValue(9,\"day3\",\"Anxiety\");\r\n\t\tdataset.setValue(8, \"day1\", \"Depression\");\r\n\t\tdataset.setValue(7, \"day2\", \"Depression\");\r\n\t\tdataset.setValue(9, \"day3\", \"Depression\");\r\n\t\tint test[] = new int[7];\r\n\t\tfor (int i=0;i<7; i++)\r\n\t\t{\r\n\t\t\ttest[i]=5;\r\n\t\t}\r\n\t\tDefaultCategoryDataset dataset2= new DefaultCategoryDataset();\r\n\t\t//dataset2 = dataSetInit(P1.getEnterSymptomLevel(),P1.getPreviousSymptomLevel1(),P1.getPreviousSymptomLevel2());\r\n\t\tdataset2 = dataSetInit(test,test,test);\r\n\t\t//P1.getEnter\r\n\t\t//DefaultCategoryDataset dataset2= new DefaultCategoryDataset();\r\n\r\n\t\t//JFreeChart chart= ChartFactory.createBarChart(P1.firstName+\" \"+P1.lastName,\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\r\n\t\tJFreeChart chart= ChartFactory.createBarChart3D(\"Symptom Report\",\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,true,true,true);\r\n\t\t//JFreeChart chart2= ChartFactory.createBarChart(\"Symptom Report\",\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\t\tchart.setBackgroundPaint(Color.lightGray);\r\n\t\t//JFreeChart chart2= ChartFactory.createBarChart(\"Grade Report\",\"Student Name\", \"Marks\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\t\t\r\n\t\tChartPanel chartPanel = new ChartPanel(chart);\r\n\t\tchartPanel.setPreferredSize(new Dimension(700,350));\r\n\t\tPan.add(chartPanel);\r\n\t\t\r\n\t\tframe.getContentPane().add(Pan);\r\n\t\tCategoryPlot p=chart.getCategoryPlot();\r\n\t\tp.setRangeGridlinePaint(Color.red);\r\n\t\tp.setBackgroundPaint(Color.WHITE);\r\n\t\tframe.setVisible(true);\r\n//\t\tChartFrame frame= new ChartFrame(\"Bar Graph Test\",chart,false);\r\n//\t\t\r\n//\t\tframe.setVisible(true);\r\n//\t\tframe.setSize(700,350);\r\n//\t\tframe.setResizable(false);\r\n\t\t//frame2 =new JFrame()\r\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\t \n\t\t for(int g = 0;g<i;g++){\n\t\t String s = String.valueOf(datas[1][g]);\n\t\t data.addValue(this.datas[2][g], this.name[g], s);\n\t\t }\n\t\t \n\t\t if(e.getSource() == button1){\n\t\t JFreeChart chart = ChartFactory.createLineChart(\"Import Volume\",\n\t\t \"Year\",\n\t\t \"Ton\",\n\t\t data,\n\t\t PlotOrientation.VERTICAL,\n\t\t true,\n\t\t false,\n\t\t false);\n\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t add(cpanel, BorderLayout.CENTER);\n\t\t setVisible(true);\n\t\t } else if(e.getSource() == button2){\n\t\t\t JFreeChart chart = ChartFactory.createBarChart(\"Import Volume\",\n \"Year\",\n \"Ton\",\n data,\n PlotOrientation.VERTICAL,\n true,\n false,\n false);\n\t\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t\t add(cpanel, BorderLayout.CENTER);\n\t\t\t setVisible(true);\n} \n\n\t\t\n\t}", "public AreaChart(DataSet inputdataset) {\n\t\tsuper.setDataset(inputdataset);\n\t}", "AreaResource panelArea();", "public void MakeBar() {\n\t\tBarButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(GetBarChartImage())));\t\n\t\tBarButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Bar chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BarButton);\t\n\t}", "JFreeChart generateBox();", "@Override\r\n public void chartMouseClicked(ChartMouseEvent cme) {\n }", "public void MakeScatter() {\n\t\tScatterButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(\n\t\t\t\tGetScatterPlotChartImage())));\n\t\tScatterButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Scatter Plot Chart \", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(ScatterButton);\n\t}", "@Override\n public void onClick(View v) {\n if (mAreaPanel.isShown()) {\n hideAreaPanel();\n } else {\n showAreaPanel();\n }\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tint month;\n\t\tdouble maxtempereture,monthlytempereture,mintempereture;\n\t\tResultSet rs;\n\t\tlib.MySQL mysql = new lib.MySQL();\n\t\trs = mysql.selectAll();\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\ttry{\n\t\t\twhile(rs.next()){\n\t\t\t\tmonth = rs.getInt(\"Month\");\n\t\t\t\tmaxtempereture = rs.getDouble(\"MaxTempereture\");\n\t\t\t\tmonthlytempereture = rs.getDouble(\"MonthkyTempereture\");\n\t\t\t\tmintempereture = rs.getDouble(\"MinTempereture\");\n System.out.println(\"月:\" + month);\n System.out.println(\"最高気温:\" + maxtempereture);\n System.out.println(\"月間平均気温:\" + monthlytempereture);\n System.out.println(\"最低気温:\" + mintempereture);\n data.addValue(maxtempereture,\"MaxTempereture\",month+\"\");\n data.addValue(monthlytempereture,\"MonthlyTempereture\",month+\"\");\n data.addValue(mintempereture,\"MinTempereture\",month+\"\");\n\t\t }\n\t\t}catch(SQLException et){}\n\t\t JFreeChart chart = \n\t\t\t ChartFactory.createLineChart(\"TOKYO TEMPERETURE\",\n\t\t\t \"month\",\n\t\t\t \"tempereture\",\n\t\t\t data,\n\t\t\t PlotOrientation.VERTICAL,\n\t\t\t true,\n\t\t\t false,\n\t\t\t false);\n \n\n ChartPanel cpanel = new ChartPanel(chart);\n panel1.add(cpanel);\n cardlayout.next(this);\n\t}", "private void groupButton() {\n ButtonGroup bg1 = new ButtonGroup();\n \n bg1.add(excellentbtn);\n bg1.add(goodbtn);\n bg1.add(normalbtn);\n bg1.add(badbtn);\n bg1.add(worstbtn);\n }", "public void toChartData() {\n //this.chart = chart;\n chart.getData().clear();\n Set<String> labels = new HashSet<>(getLabels().values());\n Object[] names = getLocations().keySet().toArray();\n \n for (String label : labels) \n {\n XYChart.Series<Number, Number> series = new XYChart.Series<>();\n series.setName(label);\n getLabels().entrySet().stream().filter(entry -> entry.getValue().equals(label)).forEach(entry -> {\n Point2D point = getLocations().get(entry.getKey());\n \n XYChart.Data data = new XYChart.Data<>(point.getX(), point.getY()); \n series.getData().add(data);\n \n \n });\n\n getChart().getData().add(series);\n for (XYChart.Series<Number, Number> s : getChart().getData()) {\n s.getNode().setStyle(\"-fx-stroke-width: 0; \");\n s.getNode().setStyle(\"-fx-stroke: transparent; \");\n\n } \n\n\n }\n getChart().setAnimated(false);\n getChart().getData().add(new XYChart.Series<Number,Number>());\n \n for (XYChart.Series<Number, Number> s : getChart().getData()) {\n for (XYChart.Data<Number, Number> d : s.getData()) {\n\n for(Object name: names)\n {\n if(getLocations().get((String)name).getX()==d.getXValue().doubleValue()\n && getLocations().get((String)name).getY()==d.getYValue().doubleValue())\n {\n Tooltip.install(d.getNode(),new Tooltip((String)name));\n }\n \n \n }\n d.getNode().setCursor(Cursor.CROSSHAIR);\n \n \n }\n \n }\n \n\n \n /* getChart().getXAxis().setAutoRanging(false);\n getChart().getYAxis().setAutoRanging(false);\n //System.out.print(minX+\" \"+maxX+\" \"+minY+\" \"+maxY);\n double deltaX = maxX-minX;\n double deltaY = maxY-minY;\n double lowerY = deltaY>1?minY-deltaY*0.05:minY*0.1;\n double upperY = deltaY>1?maxY+deltaY*0.05:maxY*0.1;\n if(deltaY==0)\n {\n lowerY = -0.5;\n upperY = 0.5;\n }\n double lowerX = deltaX>1?minX-deltaX*0.05:minX*0.1;\n double upperX = deltaX>1?minX+deltaX*0.05:maxX*0.1;\n if(deltaX == 0)\n {\n lowerX = -0.5;\n upperX = 0.5;\n }\n \n ((NumberAxis)getChart().getXAxis()).setLowerBound(lowerX);\n ((NumberAxis)getChart().getXAxis()).setUpperBound(upperX);\n ((NumberAxis)getChart().getYAxis()).setLowerBound(lowerY);\n ((NumberAxis)getChart().getYAxis()).setUpperBound(upperY);\n */\n getChart().getXAxis().setAutoRanging(false);\n getChart().getYAxis().setAutoRanging(false);\n \n double deltaY = getMaxY()-getMinY();\n double deltaX = getMaxX()-getMinX();\n if(deltaX==0) \n {\n deltaX = 1;\n setMinX(getMinX()-getMinX()*0.1-1);\n setMaxX(getMaxX()+getMaxX()*0.1+1);\n }\n if(deltaY==0)\n {\n deltaY = 1;\n setMinY(getMinY()-getMinY()*0.1-1);\n setMaxY(getMaxY()+getMaxY()*0.1+1);\n }\n\n getChart().getXAxis().setAutoRanging(false);\n getChart().getYAxis().setAutoRanging(false);\n ((NumberAxis)getChart().getXAxis()).setLowerBound(getMinX()-Math.abs(deltaX/10));\n ((NumberAxis)getChart().getXAxis()).setUpperBound(getMaxX()+Math.abs(deltaX/10));\n ((NumberAxis)getChart().getYAxis()).setLowerBound(getMinY()-Math.abs(deltaY/10));\n ((NumberAxis)getChart().getYAxis()).setUpperBound(getMaxY()+Math.abs(deltaY/10));\n\n \n }", "private StackPane customButton(String name) {\n StackPane pane = new StackPane();\n Rectangle r = new Rectangle(100, 50, Color.TRANSPARENT);\n Text t = new Text(name);\n t.setTextAlignment(TextAlignment.CENTER);\n pane.getChildren().addAll(r, t);\n pane.setStyle(\"-fx-background-color: orange;\");\n return pane;\n }", "public void MakeXYSpline() {\n\t\tXYSplineButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetXYSplineChartImage())));\n\t\tXYSplineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new XYSplineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"XYSpline Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new XYSplineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(XYSplineButton);\t\n\t}", "@Override\n public void mouseReleased(MouseEvent e) {\n\n // 2D mode\n if (getChart().getView().is2D()) {\n View view = getChart().getView();\n applyMouse2DSelection(view);\n }\n }", "public void SetStackedAreaChartImage(String stackedArea) {\n\t\tboolean test = true;\n\t\t\n\t\tif((stackedArea.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"SetStackedAreaChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((stackedArea.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"SetStackedAreaChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"SetStackedAreaChartImage():: chosen image is set to: \" \n\t\t \t+ stackedArea);\n\t\t}\n\t\tm_StackedAreaChartImage = stackedArea;\n\t}", "public ChartFrame(Chart chart) {\r\n\t\tthis.chart = chart;\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c = 0; c < seatGrid[r].length; c++) {\r\n\t\t\t\tJLabel label = new JLabel();\r\n\t\t\t\tlabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n\t\t\t\tseatGrid[r][c] = label;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tremoveBtn = new JButton(\"Remove\");\r\n\t\tremoveBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonRemoveClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taddBtn = new JButton(\"Add\");\r\n\t\taddBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonAddClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tswapBtn = new JButton(\"Swap\");\r\n\t\tswapBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonSwapClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tloadBtn = new JButton(\"Load\");\r\n\t\tloadBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonLoadClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmoveBtn = new JButton(\"Move\");\r\n\t\tmoveBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonMoveClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));\r\n\t\tpanel.setLayout(new GridLayout(7, 5));\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c = 0; c < seatGrid[r].length; c++) {\r\n\t\t\t\tpanel.add(seatGrid[r][c]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < seatGrid[0].length; i++) {\r\n\t\t\tpanel.add(Box.createHorizontalGlue());\r\n\t\t}\r\n\r\n\t\tpanel.add(removeBtn);\r\n\t\tpanel.add(addBtn);\r\n\t\tpanel.add(loadBtn);\r\n\t\tpanel.add(swapBtn);\r\n\t\tpanel.add(moveBtn);\r\n\r\n\t\tadd(panel);\r\n\t\tsetSize(500, 400);\r\n\t\tsetVisible(true);\r\n\t\tsetTitle(\"Seating Chart\");\r\n\t\tupdate();\r\n\r\n\t}", "public void MakeBubble() {\n\t\tBubbleButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetBubbleChartImage())));\n\t\tBubbleButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetColumns().length >= 3){\n\t\t\t\t\t\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\tGetHost().LeftPanelContent(new BubbleChart(\n\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\"Bubble Chart\", \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost()));\n\t\t\t\t\t}else {\n\t\t\t\t\t\tGetHost().LeftPanelContent(new BubbleChart(\n\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost()));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"You must have three columns selected to use this chart\", \n\t\t\t\t\t\"Bubble Chart Format\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BubbleButton);\n\t}", "public void MakeBar3D() {\n\t\tBarButton3D = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t\tGet3DBarChartImage())));\n\t\tBarButton3D.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\t\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart3D(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"3D Bar Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart3D(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\t\n\t\t\n\t\tChartTypeInterface.add(BarButton3D);\n\t}", "public GUIVerbrauchsdiagramm(String title, EnergyData energyData) {\n super(title);\n this.energyData = energyData;\n setExtendedState(JFrame.MAXIMIZED_BOTH);\n ChartPanel chartPanel = (ChartPanel) createPanel(energyData);\n\n buttonGroup.add(verbrauchDiagramm);\n buttonGroup.add(zaehlerDiagramm);\n pRadiobuttons.add(verbrauchDiagramm);\n pRadiobuttons.add(zaehlerDiagramm);\n pRadiobuttons.setBorder(new EmptyBorder(0, 20, 0, 0));\n verbrauchDiagramm.setSelected(true);\n tDate.setForeground(Color.gray);\n\n pSkipDay.setLayout(new GridLayout(1, 7, 5, 0));\n pSkipDay.add(bBackwardsM);\n pSkipDay.add(bBackwardsW);\n pSkipDay.add(bBackwards);\n pSkipDay.add(tDate);\n pSkipDay.add(bForwards);\n pSkipDay.add(bForwardsW);\n pSkipDay.add(bForwardsM);\n\n pDate.add(lCurrentDate);\n pDate.add(lEmpty2);\n pDate.add(pSkipDay);\n\n\n pCsv.add(bExportCSV);\n pCsv.add(lEmpty);\n pCsv.add(bExportJSON);\n\n\n pHeader.add(pRadiobuttons);\n pHeader.add(pDate);\n pHeader.add(pCsv);\n\n this.add(chartPanel, BorderLayout.CENTER);\n this.add(pHeader, BorderLayout.NORTH);\n\n //Actionlistener\n ActionListener actionListenerDiagramm = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (verbrauchDiagramm.isSelected()) {\n System.out.println(\"Verbrauchsdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetVerbrauchsdiagramm(energyData);\n chart.setTitle(\"Stromzählerübersicht\");\n }\n if (zaehlerDiagramm.isSelected()) {\n System.out.println(\"Zählerdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetZaehlerdiagramm(energyData);\n chart.setTitle(\"Zählerstand\");\n }\n }\n };\n\n bExportCSV.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n try {\n JFileChooser fileChooser = new JFileChooser(\"./CSV\");\n fileChooser.setDialogTitle(\"CSV-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.csv\",\"csv\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".csv\")){\n path = path +\".csv\";\n }\n FileHandler.writeCSV(map,path);\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden in ein CSV-File exportiert\");\n }\n });\n\n bExportJSON.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n FileHandler.saveJSON(map);\n\n try {\n JFileChooser fileChooser = new JFileChooser(\"./JSON\");\n fileChooser.setDialogTitle(\"JSON-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.json\",\"json\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".json\")){\n path = path +\".json\";\n }\n FileWriter fileWriter = new FileWriter(path);\n fileWriter.write(FileHandler.saveJSON(map));\n fileWriter.flush();\n fileWriter.close();\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden zum JSON exportiert \\n\" + \"https://api.npoint.io/0dc854da1619aca3be45\");\n }\n });\n\n bForwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, true);\n }\n });\n\n bBackwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, false);\n }\n });\n bBackwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, false);\n }\n });\n bForwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, true);\n }\n });\n bBackwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, false);\n }\n });\n bForwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, true);\n }\n });\n\n /*chart.getXYPlot().addChangeListener(new PlotChangeListener() {\n @Override\n public void plotChanged(PlotChangeEvent plotChangeEvent) {\n XYPlot plot = plotChangeEvent.getPlot().getChart().getXYPlot();\n PlotChangeListener plotChangeListener = this;\n\n plot.removeChangeListener(plotChangeListener);\n long upperBound = (long) plot.getDomainAxis().getUpperBound();\n long lowerBound = (long) plot.getDomainAxis().getLowerBound();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(upperBound / 900000 * 900000);\n upperBound = calendar.getTimeInMillis();\n\n calendar.setTimeInMillis(lowerBound / 900000 * 900000);\n lowerBound = calendar.getTimeInMillis();\n System.out.println(new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\").format(new Date(lowerBound)));\n\n System.out.println(getEnergyData().getSdatData().containsKey(lowerBound));\n\n double highestValue = 0;\n if (getEnergyData().getSdatData().containsKey(lowerBound)) {\n for (long i = lowerBound; i < upperBound; i = i + 86400000) {\n if (getEnergyData().getSdatData().get(i).getRelativBezug() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getRelativBezug();\n\n }\n if (getEnergyData().getSdatData().get(i).getRelativeEinspeisung() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getZaehlerstandEinspeisung();\n }\n }\n\n System.out.println(highestValue);\n System.out.println(highestValue + 1);\n\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(highestValue + 1);\n }else {\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(plot.getRangeAxis().getUpperBound());\n }\n plot.addChangeListener(plotChangeListener);\n\n }\n\n });\n */\n\n tDate.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent e) {\n checkDate(e);\n }\n\n @Override\n public void keyPressed(KeyEvent e) {\n\n }\n\n @Override\n public void keyReleased(KeyEvent e) {\n\n }\n });\n\n tDate.addFocusListener(new FocusListener() {\n @Override\n public void focusGained(FocusEvent e) {\n if (tDate.getText().equals(\"Datum:\")) {\n tDate.setText(\"\");\n tDate.setForeground(Color.BLACK);\n }\n }\n\n @Override\n public void focusLost(FocusEvent e) {\n if (tDate.getText().isEmpty()) {\n tDate.setForeground(Color.GRAY);\n tDate.setText(\"Datum:\");\n }\n }\n });\n\n\n verbrauchDiagramm.addActionListener(actionListenerDiagramm);\n zaehlerDiagramm.addActionListener(actionListenerDiagramm);\n }", "public String GetStackedAreaChartImage() {\n\t\treturn m_StackedAreaChartImage;\n\t}", "private void showStacksVisualization() {\n\t\tsetVisualization(new StackVisualization(rootComposite, controller, checklist));\n\t}", "public Toolbar() {\n\t\tsuper();\n\t\tthis.setLayout(new FlowLayout(FlowLayout.CENTER));\n\t\tboxColor = new Color(230, 230, 184);\n\t\tbuttonColor = new Color(255, 255, 102);\n\t\t// graphBottomColor = new Color(108, 123, 139);\n\t\t// graphTopColor = new Color(159, 182, 205);\n\t\t// titleRectColor = new Color(184, 230, 92);\n\n\t\teventTypeLabel = new JLabel(\"Event Type:\");\n\t\teventTypeDropDown = new Choice();\n\n\t\tareaLabel = new JLabel(\"Area:\");\n\t\tareaDropDown = new Choice();\n\n\t\tnumberOfPmuLabel = new JLabel(\"Number of PMU:\");\n\t\tnumberOfPmuDropDown = new Choice();\n\n\t\tnoiseLabel = new JLabel(\"Varience of Noise:\");\n\t\tlowNoiseTextBox = new JTextField(5);\n\t\thighNoiseTextBox = new JTextField(5);\n\n\t\t// adding data to drop down\n\t\teventTypeDropDown.add(\"-----\");\n\t\teventTypeDropDown.add(\"Fault\");\n\t\teventTypeDropDown.add(\"Generation Loss\");\n\t\teventTypeDropDown.add(\"Load Switch Off\");\n\t\teventTypeDropDown.add(\"Load Switch On\");\n\t\teventTypeDropDown.add(\"Reactive Power Excluded\");\n\t\teventTypeDropDown.add(\"Reactive Power Introduced\");\n\t\teventTypeDropDown.add(\"Synchronous Motor Switching Off\");\n\t\teventTypeDropDown.add(\"Series Capacitor Switching Off\");\n\t\teventTypeDropDown.add(\"Series Capacitor Switching On\");\n\n\t\t// adding data to drop down\n\t\tareaDropDown.add(\"ALBERTA -- 54\");\n\t\tareaDropDown.add(\"ARIZONA -- 14\");\n\t\tareaDropDown.add(\"B.C. HYDRO -- 50\");\n\t\tareaDropDown.add(\"EL PASO -- 11\");\n\t\tareaDropDown.add(\"IDAHO -- 60\");\n\t\tareaDropDown.add(\"IMPERIALCA -- 21\");\n\t\tareaDropDown.add(\"LADWP -- 26\");\n\t\t// areaDropDown.add(\"MEXICO-CFE -- 20\");\n\t\tareaDropDown.add(\"MONTANA -- 62\");\n\t\tareaDropDown.add(\"NEVADA -- 18\");\n\t\tareaDropDown.add(\"NEW MEXICO -- 10\");\n\t\tareaDropDown.add(\"NORTHWEST -- 40\");\n\t\tareaDropDown.add(\"PACE -- 65\");\n\t\tareaDropDown.add(\"PG AND E -- 30\");\n\t\tareaDropDown.add(\"PSCOLORADO -- 70\");\n\t\tareaDropDown.add(\"SANDIEGO -- 22\");\n\t\tareaDropDown.add(\"SIERRA -- 64\");\n\t\tareaDropDown.add(\"SOCALIF -- 24\");\n\t\tareaDropDown.add(\"FORTISBC -- 52\");\n\t\tareaDropDown.add(\"WAPA R.M. -- 73\");\n\t\t// areaDropDown.add(\"WAPA U.M. -- 63\");\n\n\t\t// adding data to drop down\n\t\tnumberOfPmuDropDown.add(\"10\");\n\t\tnumberOfPmuDropDown.add(\"9\");\n\t\tnumberOfPmuDropDown.add(\"8\");\n\t\tnumberOfPmuDropDown.add(\"7\");\n\t\tnumberOfPmuDropDown.add(\"6\");\n\t\tnumberOfPmuDropDown.add(\"5\");\n\t\tnumberOfPmuDropDown.add(\"4\");\n\t\tnumberOfPmuDropDown.add(\"3\");\n\t\tnumberOfPmuDropDown.add(\"2\");\n\t\tnumberOfPmuDropDown.add(\"1\");\n\n\t\tstartButton = new JButton(\"Start\");\n\t\tstartButton.setFocusPainted(false);\n\t\tstopButton = new JButton(\"Stop\");\n\t\tstopButton.setFocusPainted(false);\n\t\tcreateEventButton = new JButton(\"Disturbance\");\n\t\tcreateEventButton.setFocusPainted(false);\n\t\tcreateEventButton.setEnabled(false);\n\t\tstopButton.setEnabled(false);\n\n\t\teventTypeDropDown.setBackground(boxColor);\n\t\tareaDropDown.setBackground(boxColor);\n\t\tnumberOfPmuDropDown.setBackground(boxColor);\n\n\t\tstartButton.setBackground(Color.green);\n\t\tstopButton.setBackground(Color.red);\n\t\tcreateEventButton.setBackground(buttonColor);\n\n\t\tstartButton.setForeground(Color.black);\n\t\tstopButton.setForeground(Color.black);\n\n\t\t// adding components to the panel\n\t\tthis.add(eventTypeLabel);\n\t\tthis.add(eventTypeDropDown);\n\n\t\tthis.add(areaLabel);\n\t\tthis.add(areaDropDown);\n\n\t\tthis.add(numberOfPmuLabel);\n\t\tthis.add(numberOfPmuDropDown);\n\n\t\tthis.add(noiseLabel);\n\t\tthis.add(lowNoiseTextBox);\n\t\tthis.add(highNoiseTextBox);\n\n\t\tthis.add(startButton);\n\t\tthis.add(stopButton);\n\t\tthis.add(createEventButton);\n\n\t\t// listeners get initialized here so that when the toolbar is\n\t\t// constructed there in only one instance of the listeners\n\t\tstartButton.addActionListener(new ToolbarListener(\n\t\t\t\tToolbarListener.START_BUTTON, tools));\n\t\tstopButton.addActionListener(new ToolbarListener(\n\t\t\t\tToolbarListener.STOP_BUTTON, tools));\n\t\tcreateEventButton.addActionListener(new ToolbarListener(\n\t\t\t\tToolbarListener.CREATE_EVENT_BUTTON, tools));\n\n\t}", "public void setGraph(ActionEvent event)\n {\n theLineGraph.getData().clear();\n double temporary=0;\n theLineGraph.getXAxis().setLabel(\"Days\");\n\n XYChart.Series<String, Number> theGraph = new XYChart.Series<String, Number>();\n\n for (int i=0; i<Driver.save.getLog().size();i++)\n {\n String myI=i+\"\";\n\n if (event.getSource()==caloriesButton)\n {\n temporary=Driver.save.getDayCalories(i);\n theLineGraph.getYAxis().setLabel(\"Calories\");\n\n } else if(event.getSource()==protienButton)\n {\n temporary=Driver.save.getDayProtein(i);\n theLineGraph.getYAxis().setLabel(\"protien\");\n }\n else if (event.getSource()==carbsButton)\n {\n temporary=Driver.save.getDayCarbo(i);\n theLineGraph.getYAxis().setLabel(\"Carbs\");\n }\n else if (event.getSource()==fatsButton)\n {\n temporary=Driver.save.getDayFats(i);\n theLineGraph.getYAxis().setLabel(\"Fats\");\n }\n else if (event.getSource()==bevButton)\n {\n temporary=Driver.save.getDayBevarage(i);\n theLineGraph.getYAxis().setLabel(\"Drinks in ml\");\n }\n\n theGraph.getData().add(new XYChart.Data<String, Number>(myI ,temporary));\n }\n theLineGraph.getData().addAll(theGraph);\n\n }", "AREA createAREA();", "private PanelTester()\n {\n /**/\n //f.add(new CardSelector(0, 0, width, height, \"TEST\"));\n\n // 73 Total\n// Slice[] slices2 = { new Slice(5, Color.BLACK,\"BLACK\"),\n// new Slice(33, Color.GREEN,\"GREEN\"),\n// new Slice(20, Color.YELLOW,\"YELLOW\"), new Slice(15, Color.RED,\"RED\") };\n//\n// Slice[] slices = { new Slice(0.64, Color.GREEN, \"Organic\"),\n// new Slice(52.6590008, Color.BLUE, \"Conventional\" ),\n// new Slice(46.7009992, Color.RED, \"GMO\" ) };\n//\n// ArrayList<Slice> sliceArray = new ArrayList<>();\n// for( int i = 0; i < slices.length ; i++)\n// {\n// sliceArray.add( slices[i] );\n// }\n// f.add(new PieChart( f.getBounds(), sliceArray ) );\n// Rectangle temp = new Rectangle(0,0,100,100);\n //f.add(new ChartKey(temp, sliceArray ));\n /**/\n\n\n\n f.add(new AvailableCropsBar(\"test\", new Color(134,255, 109,255),100,60,20,300,50));\n\n\n\n\n\n //f.pack();\n }", "public Screenshot() {\n super();\n\n chartProperty().addListener((change, o, n) -> {\n if (o != null) {\n o.getToolBar().getChildren().remove(screenshotButtons);\n }\n if (n != null && isAddButtonsToToolBar()) {\n n.getToolBar().getChildren().add(screenshotButtons);\n }\n });\n }", "@Override\n public void onValueSelected(Entry e, int dataSetIndex, Highlight h) {\n if (e == null)\n return;\n\n dataset_line.setDrawValues(true);\n dataset_line2.setDrawValues(true);\n PlaceholderFragment.toastLineChart(getContext(),arrayListKonsum.get(e.getXIndex()));\n //Toast.makeText(getActivity(), arrayListKonsum.get(e.getXIndex()), Toast.LENGTH_SHORT).show();\n }", "boolean isDrawOnChartArea();", "public void MakeLine() {\n\t\tLineButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetLineChartImage())));\n\t\tLineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Line Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(LineButton);\n\t}", "public GraphicalView execute(Context context) {\r\n double[] minValues = new double[] { 4300, 3500, 5300, 4900, 3800, 2900, };\r\n double[] maxValues = new double[] { 8000,7000, 9700, 8600, 7000, 6500};\r\n\r\n XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();\r\n RangeCategorySeries series = new RangeCategorySeries(\"波动情况\");\r\n int length = minValues.length;\r\n for (int k = 0; k < length; k++) {\r\n series.add(minValues[k], maxValues[k]);\r\n }\r\n dataset.addSeries(series.toXYSeries());\r\n int[] colors = new int[] { Color.CYAN };\r\n XYMultipleSeriesRenderer renderer = buildBarRenderer(colors);\r\n setChartSettings(renderer, \"好友们最近一周的能量波动范围\", \"用户\", \"能量值\", 0.5, 6.5,\r\n 2000, 12000, Color.GRAY, Color.LTGRAY);\r\n renderer.setBarSpacing(1);\r\n renderer.setXLabels(0);\r\n renderer.setYLabels(10);\r\n renderer.addXTextLabel(1, \"任东卫\");\r\n renderer.addXTextLabel(2, \"罗智宜\");\r\n renderer.addXTextLabel(3, \"郭子涵\");\r\n renderer.addXTextLabel(4, \"谢以荷\");\r\n renderer.addXTextLabel(5, \"赵一援\");\r\n renderer.addXTextLabel(6, \"萧之雁\");\r\n renderer.addYTextLabel(3000, \"心情差\");\r\n renderer.addYTextLabel(4500, \"心情有点差\");\r\n renderer.addYTextLabel(6000, \"心情一般\");\r\n renderer.addYTextLabel(8500, \"心情棒\");\r\n renderer.setMargins(new int[] {30, 70, 30, 70});\r\n renderer.setYLabelsAlign(Align.RIGHT);\r\n SimpleSeriesRenderer r = renderer.getSeriesRendererAt(0);\r\n r.setDisplayChartValues(true);\r\n r.setChartValuesTextSize(12);\r\n r.setChartValuesSpacing(3);\r\n r.setGradientEnabled(true);\r\n r.setGradientStart(4000, Color.parseColor(\"#B0C4DE\"));\r\n r.setGradientStop(8000, Color.parseColor(\"#00AAAA\"));\r\n return ChartFactory.getRangeBarChartView(context, dataset, renderer, Type.DEFAULT);\r\n }", "private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n\n JTable curTable = jTable1;\n Curpan = jPanel3;\n\n if (jCheckBox1.isSelected()) {\n int succ = curTable.getRowCount();\n Cloud cloud = new Cloud();\n JPanel panel = new JPanel();\n panel.setLayout(new MigLayout(\"wrap 7\"));\n for (int i = 0; i < succ; i++) {\n for (int j = 0; j < Integer.parseInt(curTable.getModel().getValueAt(i, 1).toString()); j++) {\n cloud.addTag(curTable.getModel().getValueAt(i, 0).toString());\n }\n }\n for (Tag tag : cloud.tags()) {\n final JLabel label = new JLabel(tag.getName());\n label.setOpaque(false);\n label.setFont(label.getFont().deriveFont((float) tag.getWeight() * 10));\n panel.add(label);\n }\n // panel.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\n Curpan.removeAll();\n Curpan.revalidate();\n panel.setSize(300, 300);\n Curpan.setLayout(new BorderLayout());\n Curpan.add(panel, BorderLayout.CENTER);\n Curpan.revalidate();\n panel.setVisible(true);\n Curpan.setVisible(true);\n\n } else {\n int succ = curTable.getRowCount();\n final DefaultCategoryDataset dataset = new DefaultCategoryDataset();\n for (int i = 0; i < succ; i++) {\n dataset.addValue(i, curTable.getModel().getValueAt(i, 0).toString(), curTable.getModel().getValueAt(i, 1).toString());\n }\n JFreeChart barChart = ChartFactory.createBarChart(\n \"\",\n \"frequency\",\n \"count\",\n dataset,\n PlotOrientation.VERTICAL,\n true, true, false);\n ChartPanel chartPanel = new ChartPanel(barChart);\n chartPanel.setPreferredSize(new java.awt.Dimension(300, 300));\n\n Curpan.removeAll();\n Curpan.revalidate();\n Curpan.setLayout(new BorderLayout());\n Curpan.add(chartPanel, BorderLayout.CENTER);\n Curpan.revalidate();\n chartPanel.setVisible(true);\n Curpan.setVisible(true);\n\n }\n }", "public void button1Pushed(ActionEvent event)\r\n {\n GraphicsContext gc = canvas.getGraphicsContext2D();\r\n \r\n //clear any content out of the canvas\r\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from upper-left to lower-right of the canvas\r\n gc.strokeLine(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from upper-right to lower-left corner\r\n gc.strokeLine(canvas.getWidth(), 0, 0, canvas.getHeight());\r\n \r\n }", "private Button createNewArrayButton(BorderPane root) {\n Button newArr = new Button(\"Generate New Array\");\n\n newArr.setOnMouseClicked(event -> {\n ((HBox) root.getTop()).getChildren().get(2).setDisable(false);\n ((HBox) root.getTop()).getChildren().get(3).setDisable(false);\n\n generateRandomHeights();\n root.setBottom(createSortingDisplay());\n });\n\n return newArr;\n }", "@Test\n public void test48() throws Throwable {\n Line2D.Double line2D_Double0 = new Line2D.Double(0.0, 0.0, (-3419.6012506212037), (-3419.6012506212037));\n line2D_Double0.y2 = 1830.949;\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D(\"A2mVhdCINzNxW\\\"g@uU\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) categoryAxis3D0);\n CategoryItemRenderer[] categoryItemRendererArray0 = new CategoryItemRenderer[8];\n ScatterRenderer scatterRenderer0 = new ScatterRenderer();\n categoryItemRendererArray0[0] = (CategoryItemRenderer) scatterRenderer0;\n AreaRenderer areaRenderer0 = new AreaRenderer();\n categoryItemRendererArray0[1] = (CategoryItemRenderer) areaRenderer0;\n AreaRenderer areaRenderer1 = new AreaRenderer();\n categoryItemRendererArray0[2] = (CategoryItemRenderer) areaRenderer1;\n StackedBarRenderer stackedBarRenderer0 = new StackedBarRenderer(true);\n categoryItemRendererArray0[3] = (CategoryItemRenderer) stackedBarRenderer0;\n CategoryStepRenderer categoryStepRenderer0 = new CategoryStepRenderer(false);\n categoryItemRendererArray0[4] = (CategoryItemRenderer) categoryStepRenderer0;\n WaterfallBarRenderer waterfallBarRenderer0 = new WaterfallBarRenderer();\n categoryItemRendererArray0[5] = (CategoryItemRenderer) waterfallBarRenderer0;\n StackedBarRenderer3D stackedBarRenderer3D0 = new StackedBarRenderer3D(false);\n categoryItemRendererArray0[6] = (CategoryItemRenderer) stackedBarRenderer3D0;\n IntervalBarRenderer intervalBarRenderer0 = new IntervalBarRenderer();\n categoryItemRendererArray0[7] = (CategoryItemRenderer) intervalBarRenderer0;\n combinedDomainCategoryPlot0.setRenderers(categoryItemRendererArray0);\n StackedBarRenderer3D stackedBarRenderer3D1 = new StackedBarRenderer3D();\n TickUnits tickUnits0 = new TickUnits();\n combinedDomainCategoryPlot0.setRenderer(93, (CategoryItemRenderer) stackedBarRenderer3D1);\n }", "@FXML\n\tprivate void handleSenButtonCH0(){\n\t\tif(senButtonCH0.isSelected()){\n\t\t\t//draw the chart\n\t\t\tchartDrawer.drawSin();\n\t\t\tdutyFieldCH0.setDisable(false);\n\t\t\tdutyLabelCH0.setText(\"Fase\");\n\t\t\tdutyUnitLabelCH0.setText(\"Grau\");\n\t\t}\n\t\telse{\n\t\t\tchartDrawer.clear();\n\t\t}\n\t}", "public JFreeChart MakeChart() {\n\t\t\n\t\tDefaultCategoryDataset areaDataset = new DefaultCategoryDataset();\n\t\t\n\t\tObject[] column1Data = super.getDataset().GetColumnData(\n\t\t\tsuper.getAttribute1());\n\t\tObject[] column2Data = super.getDataset().GetColumnData(\n\t\t\tsuper.getAttribute2());\n\t\t\n\t\tString column2Header = super.getDataset().GetAttributeName(\n\t\t\tsuper.getAttribute2());\n\t\t\n\t\tboolean addDataset = true;\n\t\tString errors = \"\";\n\t\tint errorCounter = 0;\n\t\t\n\t\tfor (int i=0; i<super.getDataset().GetNoOfEntrys();i++) {\t\n \n\t\t\tComparable<Object> nextValue1;\n\t\t\t//First value can have be any comparable object.\n \n nextValue1 = (Comparable<Object>) column1Data[i]; \n\t\t\tDouble nextValue2 = null;\n\t\t\tboolean addThis = true;\n\t\t\t//Second value can only be integer, double or boolean.\n\t\t\t\n\t\t\ttry {\n\t\t\t\tint intNextValue2 = Integer.parseInt(column2Data[i].toString());\n\t\t\t\tnextValue2 = (Double) ((double) intNextValue2);\n\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\ttry {\n\t\t\t\t\tdouble doubleNextValue2 = Double.parseDouble(\n\t\t\t\t\t\t\tcolumn2Data[i].toString());\n\t\t\t\t\tnextValue2 = (Double) doubleNextValue2;\n\t\t\t\t} catch (NumberFormatException nfe2) {\n\t\t\t\t\tString strNextValue2 = column2Data[i].toString();\n\t\t\t\t\tif (strNextValue2.equalsIgnoreCase(\"True\")) {\n\t\t\t\t\t\tnextValue2 = TRUE;\n\t\t\t\t\t} else if (strNextValue2.equalsIgnoreCase(\"False\")) {\n\t\t\t\t\t\tnextValue2 = FALSE;\n\t\t\t\t\t} else {\n\t\t\t\t\t\taddThis = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\taddThis = false;\n\t\t\t}\n\t\t\t\n\t\t\tif (addThis == true) {\n\t\t\t\tareaDataset.addValue( nextValue2, column2Header, nextValue1 );\n\t\t\t} else {\n\t\t\t\taddDataset = false;\n\t\t\t\tif (errorCounter < MAX_ERROR_LENGTH) {\n\t\t\t\t\terrors = errors + \"\\n\"\n\t\t\t\t\t\t+ column2Data[i].toString();\n\t\t\t\t\t\terrorCounter++;\n\t\t\t\t}\n\t\t\t}\n }\n\t\t\n\t\tif (addDataset == false) {\n\t\t\tareaDataset = new DefaultCategoryDataset(); //Reset\n\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\"Your selected y-axis has data in the wrong format\" + \"\\n\" +\n\t\t\t\t\"The following data needs to be a number in order to be\" + \n\t\t\t\t\" represented.\"\n\t\t\t\t\t+ errors);\n\t\t}\n\t\t\n\t\tJFreeChart chart = ChartFactory.createAreaChart( \n super.getHeader(),\n\t\t\t\t\t\tsuper.getxAxis(),\n\t\t\t\t\t\tsuper.getyAxis(),\n\t\t\t\t\t\tareaDataset,\n\t\t\t\t\t\tPlotOrientation.VERTICAL,\n true, //include legend\n true,\n false );\n return chart;\n\t}", "public Visualize() {\n initComponents();\n \n }", "@Override\r\n \t\t\t\tpublic void onClick(View v) {\n \t\t\t\t\t\r\n \t\t\t\t\tmRenderer.setZoomButtonsVisible(false);\r\n \t\t\t\t\t\r\n \t\t\t\t\t/*Bitmap bmp = Bitmap.createBitmap( 800, 600, Bitmap.Config.ARGB_8888 );\r\n \t\t\t\t\t\r\n \t\t\t\t\t//Bitmap bmp =Bitmap.createBitmap( mChart.getMeasuredWidth(),mChart.getMeasuredHeight(), Bitmap.Config.ARGB_8888 );\r\n \t\t\t\t\t\r\n \t\t\t\t\tCanvas canvas = new Canvas(bmp);\r\n \t\t\t\t\tmChart.draw( canvas );\r\n \t\t\t\t\t\r\n \t\t\t\t\tFile myDir = new File(Environment.getExternalStorageDirectory() + File.separator + \"SpeakingTime Graphs\"); //pour créer le repertoire dans lequel on va mettre notre fichier\r\n \t\t if (!myDir.exists()) {\r\n \t\t \tmyDir.mkdir(); //On crée le répertoire (s'il n'existe pas!!)\r\n \t\t }\r\n \t\t\t\t\t\r\n \t\t\t\t\tFileOutputStream out = null;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tout = new FileOutputStream(Environment.getExternalStorageDirectory() + File.separator + \"SpeakingTime Graphs\" + File.separator + name.substring(0, name.length() - 4) + \"_bargraph.jpg\");\r\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n \t\t\t\t\tbmp.compress( Bitmap.CompressFormat.JPEG, 97, out );\r\n \t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tout.close();\r\n\t\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}*/\r\n \t\t\t\t\t\r\n \t\t\t\t\tModalDialog modalDialog = new ModalDialog();\r\n\t\t\t\t\t\tString boxplots_name = modalDialog.showModalDialogReunionName(BarGraphActivity.this, \"Give a name to this graph\"); \t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (boxplots_name != \"Cancel\"){\r\n\t\t\t\t\t\t\tif (boxplots_name.equalsIgnoreCase(\"\")){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tAlertDialog.Builder alertDialog = new AlertDialog.Builder(BarGraphActivity.this);\r\n\t\t\t\t\t\t\t\talertDialog.setTitle(\"Warning\");\r\n\t\t\t\t\t\t\t\talertDialog.setMessage(\"GIVE A VALID NAME !\");\r\n\t\t\t\t\t\t\t\talertDialog.show();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (SaveGraphOnDisk(boxplots_name) == \"error\") {\r\n\t\t \t\t\t\t\t\tAlertDialog.Builder alertDialog = new AlertDialog.Builder(BarGraphActivity.this);\r\n\t\t\t\t\t\t\t\t\talertDialog.setTitle(\"Warning\");\r\n\t\t\t\t\t\t\t\t\talertDialog.setMessage(\"The graph can't be saved !\");\r\n\t\t\t\t\t\t\t\t\talertDialog.show();\r\n\t\t \t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n \t\t\t\t\t\r\n \t\t\t\t\t\r\n \t\t\t\t\t\r\n \t\t\t\t\tmRenderer.setZoomButtonsVisible(true);\r\n \t\t\t\t}", "private void createBottomButtons() {\n // Create a composite that will contain the control buttons.\n Composite bottonBtnComposite = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(3, true);\n gl.horizontalSpacing = 10;\n bottonBtnComposite.setLayout(gl);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n bottonBtnComposite.setLayoutData(gd);\n\n // Create the Interpolate button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n interpolateBtn = new Button(bottonBtnComposite, SWT.PUSH);\n interpolateBtn.setText(\"Interpolate\");\n interpolateBtn.setLayoutData(gd);\n interpolateBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorData upperColorData = upperColorWheel.getColorData();\n ColorData lowerColorData = lowerColorWheel.getColorData();\n\n colorBar.interpolate(upperColorData, lowerColorData, rgbRdo\n .getSelection());\n undoBtn.setEnabled(true);\n updateColorMap();\n }\n });\n\n // Create the Undo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n undoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n undoBtn.setText(\"Undo\");\n undoBtn.setEnabled(false);\n undoBtn.setLayoutData(gd);\n undoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n undoBtn.setEnabled(colorBar.undoColorBar());\n updateColorMap();\n redoBtn.setEnabled(true);\n }\n });\n\n // Create the Redo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n redoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n redoBtn.setText(\"Redo\");\n redoBtn.setEnabled(false);\n redoBtn.setLayoutData(gd);\n redoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n redoBtn.setEnabled(colorBar.redoColorBar());\n updateColorMap();\n undoBtn.setEnabled(true);\n }\n });\n\n // Create the Revert button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n revertBtn = new Button(bottonBtnComposite, SWT.PUSH);\n revertBtn.setText(\"Revert\");\n revertBtn.setLayoutData(gd);\n revertBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n colorBar.revertColorBar();\n updateColorMap();\n undoBtn.setEnabled(false);\n redoBtn.setEnabled(false);\n }\n });\n\n // Create the Save button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n saveBtn = new Button(bottonBtnComposite, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n if( seldCmapName == null ) {\n saveBtn.setEnabled(false);\n }\n \n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorMap cm = (ColorMap) cmapParams.getColorMap();\n seldCmapName = selCmapCombo.getText();\n \n// int sepIndx = seldCmapName.indexOf(File.separator);\n// String cmapCat = seldCmapName.substring(0,seldCmapName.indexOf(File.separator));\n// String cmapName = seldCmapName.substring( seldCmapName.indexOf(File.separator));\n if (lockedCmaps != null && lockedCmaps.isLocked(seldCmapName)) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists and is locked.\\n\\n\" +\n \t\t\t\"You cannot overwrite it.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tconfirmDlg.open();\n \tcolorBar.undoColorBar();\n updateColorMap();\n \treturn;\n } \n else if( ColorMapUtil.colorMapExists( seldCmapCat, seldCmapName ) ) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists.\\n\\n\" +\n \t\t\t\"Do you want to overwrite it?\",\n \t\t\tMessageDialog.QUESTION, new String[]{\"Yes\", \"No\"}, 0);\n \tconfirmDlg.open();\n\n \tif( confirmDlg.getReturnCode() == MessageDialog.CANCEL ) {\n \t\treturn;\n \t}\n }\n\n try {\n ColorMapUtil.saveColorMap( cm, seldCmapCat, seldCmapName );\n \n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Colormap Saved\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" Saved.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n } catch (VizException e) {\n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Error\", null, \n \t\t\t\"Error Saving Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\"\\n\"+e.getMessage(),\n \t\t\tMessageDialog.ERROR, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n }\n\n completeSave();\n }\n });\n\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.grabExcessHorizontalSpace = false;\n deleteBtn = new Button(bottonBtnComposite, SWT.PUSH);\n deleteBtn.setText(\"Delete\");\n deleteBtn.setLayoutData(gd);\n deleteBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tdeleteColormap();\n }\n });\n Label sep = new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n sep.setLayoutData(gd);\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.HORIZONTAL_ALIGN_END);\n Button closeBtn = new Button(shell, SWT.PUSH);\n closeBtn.setText(\" Close \");\n closeBtn.setLayoutData(gd);\n closeBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tshell.dispose();\n }\n });\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n panelChart = new javax.swing.JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jButton1.setText(\"Balansas\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n panelChart.setBackground(new java.awt.Color(255, 255, 255));\n panelChart.setLayout(new java.awt.BorderLayout());\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelChart, javax.swing.GroupLayout.DEFAULT_SIZE, 686, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGap(306, 306, 306)\n .addComponent(jButton1)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(panelChart, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addContainerGap())\n );\n\n pack();\n }", "@Override\n protected void layoutPlotChildren() {\n for(int index=0; index < getData().size(); index++){\n Series<X,Y> series = getData().get(index);\n Iterator<Data<X,Y>> it = getDisplayedDataIterator(series);\n while(it.hasNext()){\n Data<X,Y> data = it.next();\n double y = getYAxis().getDisplayPosition(data.getYValue());\n double x = getXAxis().getDisplayPosition(data.getXValue());\n if( Double.isNaN(x) || Double.isNaN(y)){ // CHECK THIS AND CHANGE\n continue;\n }\n Node frame = data.getNode();\n javafx.scene.shape.Rectangle rectangle;\n if (frame != null) {\n if (frame instanceof StackPane) {\n StackPane region = (StackPane)data.getNode();\n if (region.getShape() == null) {\n double width = getLength(data.getExtraValue());\n rectangle = new javafx.scene.shape.Rectangle(width,getFrameHeight());\n } else if( region.getShape() instanceof Rectangle) {\n rectangle = (Rectangle)region.getShape();\n } else return;\n rectangle.setWidth(getLength(data.getExtraValue()) * ((getXAxis() instanceof NumberAxis)\n ? Math.abs(((NumberAxis)getXAxis()).getScale()) : 1));\n rectangle.setHeight(getFrameHeight() * ((getYAxis() instanceof NumberAxis)\n ? Math.abs(((NumberAxis)getYAxis()).getScale()) : 1));\n y -= getFrameHeight() / 2;\n\n region.setShape(null);\n region.setShape(rectangle);\n region.setScaleShape(false);\n region.setCenterShape(false);\n region.setCacheShape(false);\n\n frame.setLayoutX(x);\n frame.setLayoutY(y);\n }\n\n }\n }\n\n }\n }", "public void groupFunction ()\n { \n // Set layouts.\n g = new GroupLayout (this);\n setLayout (g);\n \n // Button initialization.\n getInfoButton = new JButton (\"getMethods()\");\n stringButton = new JButton (\"String\");\n setContainGapsButton = new JButton (\"setAutoCreateContainerGaps()\");\n setAutoGapsButton = new JButton (\"setAutoCreateGaps()\");\n setHonorsVisButton = new JButton (\"setHonorsVisibility()\");\n diagonalButton = new JButton (\"Diagonal\");\n verticalButton = new JButton (\"Vertical\");\n horizontalButton = new JButton (\"Horizontal\");\n linkSizeButton = new JButton (\"linkSize()\");\n replaceButton = new JButton (\"replace()\");\n returnButton = new JButton (\"Return\");\n \n // Default Layout\n g.setVerticalGroup(\n g.createSequentialGroup()\n .addComponent(getInfoButton)\n .addComponent(diagonalButton)\n .addComponent(verticalButton)\n .addComponent(horizontalButton)\n .addComponent(replaceButton)\n .addComponent(stringButton)\n .addComponent(setContainGapsButton)\n .addComponent(setAutoGapsButton)\n .addComponent(linkSizeButton)\n .addComponent(setHonorsVisButton));\n g.setHorizontalGroup(\n g.createSequentialGroup()\n .addComponent(getInfoButton)\n .addComponent(diagonalButton)\n .addComponent(verticalButton)\n .addComponent(horizontalButton)\n .addComponent(replaceButton)\n .addComponent(stringButton)\n .addComponent(setContainGapsButton)\n .addComponent(setAutoGapsButton)\n .addComponent(linkSizeButton)\n .addComponent(setHonorsVisButton));\n \n // Horizontal Layout\n horizontalButton.addActionListener (new ActionListener ()\n {\n public void actionPerformed (ActionEvent ae)\n {\n remove (returnButton);\n g.setVerticalGroup(\n g.createParallelGroup()\n .addComponent(getInfoButton)\n .addComponent(diagonalButton)\n .addComponent(verticalButton)\n .addComponent(horizontalButton)\n .addComponent(replaceButton)\n .addComponent(stringButton)\n .addComponent(setContainGapsButton)\n .addComponent(setAutoGapsButton)\n .addComponent(linkSizeButton)\n .addComponent(setHonorsVisButton));\n g.setHorizontalGroup(\n g.createSequentialGroup()\n .addComponent(getInfoButton)\n .addComponent(diagonalButton)\n .addComponent(verticalButton)\n .addComponent(horizontalButton)\n .addComponent(replaceButton)\n .addComponent(stringButton)\n .addComponent(setContainGapsButton)\n .addComponent(setAutoGapsButton)\n .addComponent(linkSizeButton)\n .addComponent(setHonorsVisButton));\n \n }\n }); \n \n // Diagonal Layout\n diagonalButton.addActionListener (new ActionListener ()\n {\n public void actionPerformed (ActionEvent ae)\n {\n remove (returnButton);\n g.setVerticalGroup(\n g.createSequentialGroup()\n .addComponent(getInfoButton)\n .addComponent(diagonalButton)\n .addComponent(verticalButton)\n .addComponent(horizontalButton)\n .addComponent(replaceButton)\n .addComponent(stringButton)\n .addComponent(setContainGapsButton)\n .addComponent(setAutoGapsButton)\n .addComponent(linkSizeButton)\n .addComponent(setHonorsVisButton));\n g.setHorizontalGroup(\n g.createSequentialGroup()\n .addComponent(getInfoButton)\n .addComponent(diagonalButton)\n .addComponent(verticalButton)\n .addComponent(horizontalButton)\n .addComponent(replaceButton)\n .addComponent(stringButton)\n .addComponent(setContainGapsButton)\n .addComponent(setAutoGapsButton)\n .addComponent(linkSizeButton)\n .addComponent(setHonorsVisButton));\n \n }\n }); \n \n // Vertical Layout\n verticalButton.addActionListener (new ActionListener ()\n {\n public void actionPerformed (ActionEvent ae)\n {\n remove (returnButton);\n g.setVerticalGroup(\n g.createSequentialGroup()\n .addComponent(getInfoButton)\n .addComponent(diagonalButton)\n .addComponent(verticalButton)\n .addComponent(horizontalButton)\n .addComponent(replaceButton)\n .addComponent(stringButton)\n .addComponent(setContainGapsButton)\n .addComponent(setAutoGapsButton)\n .addComponent(linkSizeButton)\n .addComponent(setHonorsVisButton));\n g.setHorizontalGroup(\n g.createParallelGroup()\n .addComponent(getInfoButton)\n .addComponent(diagonalButton)\n .addComponent(verticalButton)\n .addComponent(horizontalButton)\n .addComponent(replaceButton)\n .addComponent(stringButton)\n .addComponent(setContainGapsButton)\n .addComponent(setAutoGapsButton)\n .addComponent(linkSizeButton)\n .addComponent(setHonorsVisButton));\n \n }\n }); \n \n // get() Methods\n getInfoButton.addActionListener (new ActionListener ()\n {\n public void actionPerformed (ActionEvent ae)\n {\n new JOptionPane().showMessageDialog (GroupLayoutRonald.this, \"Auto Create Container Gaps Enabled: \" + g.getAutoCreateContainerGaps () + \"\\n\"\n + \"Auto Create Component Gaps Enabled: \" + g.getAutoCreateGaps () + \"\\n\"\n + \"Honors Component Visibility: \" + g.getHonorsVisibility () + \"\\n\"\n + \"Horizontal Alignment: \" + g.getLayoutAlignmentX(GroupLayoutRonald.this) + \"\\n\"\n + \"Vertical Alignment: \" + g.getLayoutAlignmentY (GroupLayoutRonald.this) + \"\\n\"\n + \"Layout Style: \" + g.getLayoutStyle () + \"\\n\"\n + \"Minimum Layout Size: \" + g.minimumLayoutSize(GroupLayoutRonald.this).getWidth() + \" by \" + g.minimumLayoutSize(GroupLayoutRonald.this).getHeight() + \"\\n\"\n + \"Maximum Layout Size: \" + g.maximumLayoutSize(GroupLayoutRonald.this).getWidth() + \" by \" + g.maximumLayoutSize(GroupLayoutRonald.this).getHeight() + \"\\n\"\n + \"Preferred Layout Size: \" + g.preferredLayoutSize(GroupLayoutRonald.this).getWidth() + \" by \" + g.preferredLayoutSize(GroupLayoutRonald.this).getHeight() + \"\\n\"\n , \"About: Layout Data\", JOptionPane.PLAIN_MESSAGE);\n }\n });\n \n // toString() Method\n stringButton.addActionListener (new ActionListener ()\n {\n public void actionPerformed (ActionEvent ae)\n {\n new JOptionPane().showMessageDialog (GroupLayoutRonald.this, g.toString(), \"String Representation of Layout\", JOptionPane.PLAIN_MESSAGE);\n }\n });\n \n \n // setAutoCreateContainerGaps() Method\n setContainGapsButton.addActionListener (new ActionListener ()\n {\n public void actionPerformed (ActionEvent ae)\n {\n if (g.getAutoCreateContainerGaps() == true)\n g.setAutoCreateContainerGaps (false);\n else\n g.setAutoCreateContainerGaps (true);\n }\n });\n \n // setAutoCreateGaps() Method\n setAutoGapsButton.addActionListener (new ActionListener ()\n {\n public void actionPerformed (ActionEvent ae)\n {\n if (g.getAutoCreateGaps() == true)\n g.setAutoCreateGaps(false);\n else\n g.setAutoCreateGaps(true);\n }\n });\n \n // setHonorsVisibility() Method\n setHonorsVisButton.addActionListener (new ActionListener ()\n {\n public void actionPerformed (ActionEvent ae)\n {\n if (g.getHonorsVisibility() == true)\n g.setHonorsVisibility (false);\n else\n g.setHonorsVisibility (true);\n }\n });\n \n // linkSize() Method\n linkSizeButton.addActionListener (new ActionListener ()\n {\n public void actionPerformed (ActionEvent ae)\n {\n g.linkSize(SwingConstants.HORIZONTAL, linkSizeButton, setHonorsVisButton, setAutoGapsButton);\n }\n });\n \n // replace() Method\n replaceButton.addActionListener (new ActionListener ()\n {\n public void actionPerformed (ActionEvent ae)\n {\n g.replace (replaceButton, returnButton);\n }\n });\n \n // replace() Method\n returnButton.addActionListener (new ActionListener ()\n {\n public void actionPerformed (ActionEvent ae)\n {\n g.replace (returnButton, replaceButton);\n }\n });\n }", "@Override\n public void onClick(View view) {\n\n ft2 = getFragmentManager().beginTransaction();\n chartFragment = ChartFragment.newInstance(\"chart-fragment\");\n chartFragment.setArguments(bundleHourlyArr);\n ft2.add(R.id.main_holder, chartFragment, \"chart-fragment-tag\");\n ft2.show(chartFragment);\n ft2.commit();\n }", "public void actionPerformed(ActionEvent ae)\n\t{\n\t\tif(ae.getSource()==ok)//ae.getActionCommand().equals(\" OK \")) // pie chart\n\t\t{\n\t\t\tif(!processTitles())\n\t\t\t\treturn;\n\t\t\tif(type==0)\n\t\t\t{\n\t\t\t\tvalues=ws.buildBarChart();\n\t\t\t\tif(values.length>15)\n\t\t\t\t{\n\t\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\t\tString checkRange1 = wordBundle.getString(\"checkRange1\");\n\t\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\t\tint select = map.showDialog(map,\"checkRange1\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tws.buildPieChart(titles,xvalues,map);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(type==1) // vertical bar chart\n\t\t\t{\n\t\t\t\tvalues=ws.buildBarChart();\n\t\t\t\tif(checkDataValidity(values))\n\t\t\t\t{\n\t\t\t\t\tif(values.length>10)\n\t\t\t\t\t{\n\t\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\t\tString checkRange = wordBundle.getString(\"checkRange\");\n\t\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\t\tint select = map.showDialog(map,\"checkRange\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tJFrame bcV =new barChartV(map,values,titles,xvalues);\n\t\t\t\t\t\tbcV.repaint();\n\t\t\t\t\t\tbcV.validate();\n\t\t\t\t\t\tbcV.show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"Chart can not be drawn\");\n\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\tString DataCheck = wordBundle.getString(\"DataCheck\");\n\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\tint select = map.showDialog(map,\"DataCheck\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(type==2)//horizontal bar chart\n\t\t\t{\n\t\t\t\tvalues=ws.buildBarChart();\n\t\t\t\t//arrValue av=new arrValue();\n\t\t\t\t//av.selValues=values;\n\t\t\t\tif(checkDataValidity(values))\n\t\t\t\t{\n\t\t\t\t\tif(values.length>10)\n\t\t\t\t\t{\n\t\t\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\t\t\tString checkRange = wordBundle.getString(\"checkRange\");\n\t\t\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\t\t\tint select = map.showDialog(map,\"checkRange\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tJFrame bcH =new barChartH(map,values,titles,xvalues);\n\t\t\t\t\t\tbcH.repaint();\n\t\t\t\t\t\tbcH.validate();\n\t\t\t\t\t\tbcH.show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\twordBundle = map.getWordBundle();\n\t\t\t\t\tObject[] options = {wordBundle.getString(\"ok\")};\n\t\t\t\t\tString DataCheck = wordBundle.getString(\"DataCheck\");\n\t\t\t\t\tString messageTitle = wordBundle.getString(\"messageTitle\");\n\t\t\t\t\tint select = map.showDialog(map,\"DataCheck\",JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null,options, 0);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tsetVisible(false);\n\t\t}\n\t\telse if(ae.getSource()==cancel)//getActionCommand().equals(\"CANCEL\"))\n\t\t\tsetVisible(false);\n\n\t}", "@Override protected void layoutPlotChildren() {\n\n for (int seriesIndex=0; seriesIndex < getData().size(); seriesIndex++) {\n Series<X,Y> series = getData().get(seriesIndex);\n Iterator<Data<X,Y>> iter = getDisplayedDataIterator(series);\n\n //Iterate through list of tasks\n while(iter.hasNext()) {\n Data<X,Y> item = iter.next();\n double x = getXAxis().getDisplayPosition(item.getXValue());\n double y = getYAxis().getDisplayPosition(item.getYValue());\n\n if (Double.isNaN(x) || Double.isNaN(y)) { //Check for null\n continue;\n }\n\n Node block = item.getNode();\n Rectangle rectangle;\n //Create stackpane for each rectangle\n if (block != null) {\n if (block instanceof StackPane) {\n StackPane region = (StackPane)item.getNode();\n if (region.getShape() == null) {\n rectangle = new Rectangle( getLength( item.getExtraValue()), getBlockHeight());\n } else if (region.getShape() instanceof Rectangle) {\n rectangle = (Rectangle)region.getShape();\n } else {\n return;\n }\n\n //Set rectangle width and height and positioning\n rectangle.setWidth( getLength( item.getExtraValue()) * ((getXAxis() instanceof NumberAxis) ? Math.abs(((NumberAxis)getXAxis()).getScale()) : 1));\n rectangle.setHeight(getBlockHeight() * ((getYAxis() instanceof NumberAxis) ? Math.abs(((NumberAxis)getYAxis()).getScale()) : 1));\n y -= getBlockHeight() / 2.0;\n\n //Get positions of blocks\n double paddingHeight = getBlockHeight() * ((getYAxis() instanceof NumberAxis) ? Math.abs(((NumberAxis)getYAxis()).getScale()) : 1);\n double paddingWidth = getLength( item.getExtraValue()) * ((getXAxis() instanceof NumberAxis) ? Math.abs(((NumberAxis)getXAxis()).getScale()) : 1);\n\n //Create regions with create rectangles\n region.setShape(null);\n region.setShape(rectangle);\n region.setScaleShape(false);\n region.setCenterShape(false);\n region.setCacheShape(false);\n\n //Set positioning and addBBA text with padding\n region.setMaxHeight(rectangle.getHeight());\n region.setMinHeight(rectangle.getHeight());\n region.setPrefHeight(rectangle.getHeight());\n\n //Create label according to properties id\n Label text = new Label(getTaskId(item.getExtraValue())); //don't delete\n text.setStyle(\"-fx-font-family: 'Space Mono', monospace; -fx-font-weight: BOLD; -fx-text-fill: white;\");\n text.setPadding(new Insets(paddingHeight, 0, 0, paddingWidth));\n region.getChildren().add(text); //don't delete\n\n //Set rectangle position\n block.setLayoutX(x);\n block.setLayoutY(y);\n }\n }\n }\n }\n }", "@Test\n public void test35() throws Throwable {\n Line2D.Double line2D_Double0 = new Line2D.Double(67.227245, 67.227245, 67.227245, 0.18);\n line2D_Double0.setLine((-1200.58567454322), (-329.479065), (-238.92597), 90.0);\n line2D_Double0.x1 = 50.0;\n double double0 = line2D_Double0.getY1();\n NumberAxis numberAxis0 = new NumberAxis(\"\");\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot((ValueAxis) numberAxis0);\n StackedAreaRenderer stackedAreaRenderer0 = new StackedAreaRenderer();\n combinedRangeCategoryPlot0.setRenderer((CategoryItemRenderer) stackedAreaRenderer0);\n AxisLocation axisLocation0 = combinedRangeCategoryPlot0.getRangeAxisLocation();\n DefaultValueDataset defaultValueDataset0 = new DefaultValueDataset(50.0);\n ThermometerPlot thermometerPlot0 = new ThermometerPlot((ValueDataset) defaultValueDataset0);\n PlotOrientation plotOrientation0 = thermometerPlot0.getOrientation();\n RectangleEdge rectangleEdge0 = Plot.resolveRangeAxisLocation(axisLocation0, plotOrientation0);\n SubCategoryAxis subCategoryAxis0 = new SubCategoryAxis(\"GT-wuOa\");\n List list0 = combinedRangeCategoryPlot0.getCategoriesForAxis(subCategoryAxis0);\n combinedRangeCategoryPlot0.setRangeAxis(0, (ValueAxis) numberAxis0, true);\n SystemColor systemColor0 = SystemColor.windowText;\n StatisticalBarRenderer statisticalBarRenderer0 = new StatisticalBarRenderer();\n BasicStroke basicStroke0 = (BasicStroke)statisticalBarRenderer0.getErrorIndicatorStroke();\n CategoryMarker categoryMarker0 = null;\n try {\n categoryMarker0 = new CategoryMarker((Comparable) 90.0, (Paint) systemColor0, (Stroke) basicStroke0, (Paint) systemColor0, (Stroke) basicStroke0, (-2471.265F));\n } catch(IllegalArgumentException e) {\n //\n // The 'alpha' value must be in the range 0.0f to 1.0f\n //\n assertThrownBy(\"org.jfree.chart.plot.Marker\", e);\n }\n }", "public static void setEvent(StackPane stackPane) {\n stackPane.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n\n tiles.entrySet().stream().map(oTile -> oTile.getValue())\n .filter(tile -> tile.isEmpty())\n .forEach(tile -> tile.changeTileFillToNull());\n\n tiles.entrySet().stream().map(oTile -> oTile.getValue())\n .filter(tile -> !tile.isEmpty())\n .forEach(tile -> tile.changeTileFillToLightPink());\n\n int posX = (int) (event.getX() / 50);\n int posY = (int) (event.getY() / 50);\n Coordinates coordinates = new Coordinates(posX, posY);\n tiles.get(coordinates).changeTileFillToPink();\n setLastClicked(coordinates);\n }\n }\n );\n }", "@Override\r\npublic void mouseClicked(MouseEvent e) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "void toggleButton_actionPerformed(ActionEvent e) {\n this.togglePlot();\n }", "@Override\n public void handle(MouseEvent event) {\n if( tradeBankGroup.isVisible() || domesticTradeGroup.isVisible())\n return;\n settlement_selected_rectangle.setVisible(true);\n city_selected_rectangle.setVisible(false);\n road_selected_rectangle.setVisible(false);\n \n construct_type = Construction_type.SETTLEMENT;\n }", "public void mouseClicked(MouseEvent e) {\n\t\t\tJLabel button = (JLabel)e.getSource();\n\t\t//BorderFactory.createLoweredBevelBorder());\n\t\t\t\n\t\t}", "public void claShapeArea(){\r\n\t\tshape.calArea();\r\n\t}", "private void constructChartPanel() {\n chartPanel = new JPanel();\n chartPanel.setBorder(BorderFactory.createTitledBorder(\"Price Chart\"));\n chartPanel.setPreferredSize(relativeSize(0.4f, 0.35f));\n \n displayChartButton = new JButton(\"Click to Display Price Chart\");\n displayChartButton.setEnabled(false);\n displayChartButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n JPanel cPanel = chart.getChartPanel();\n chartPanel.removeAll();\n chartPanel.add(cPanel);\n cPanel.setPreferredSize(relativeSize(0.4f, 0.35f));\n \n pack();\n repaint();\n }\n });\n \n chartPanel.add(displayChartButton);\n }", "@Override\r\npublic void mouseExited(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "private void initChart() {\n Cartesian cartesian = AnyChart.line();\n\n cartesian.animation(true);\n\n cartesian.padding(10d, 20d, 5d, 20d);\n\n cartesian.crosshair().enabled(true);\n cartesian.crosshair()\n .yLabel(true)\n // TODO ystroke\n .yStroke((Stroke) null, null, null, (String) null, (String) null);\n\n cartesian.tooltip().positionMode(TooltipPositionMode.POINT);\n\n cartesian.title(\"Steps taken in this week and last week\");\n\n cartesian.yAxis(0).title(\"Steps\");\n cartesian.xAxis(0).labels().padding(5d, 5d, 5d, 5d);\n\n List<DataEntry> seriesData = new ArrayList<>();\n Log.d(\"Size This Week\",stepsTakenModelsThisWeek.size()+\"\");\n for(int i = 0 ; i<7 ; i++){\n CustomDataEntry c = new CustomDataEntry(days[i],stepsTakenModelsLastWeek.get(i).getSteps());\n if(i<stepsTakenModelsThisWeek.size()){\n c.setValue(\"value2\",stepsTakenModelsThisWeek.get(i).getSteps());\n }else{\n if(DateUtilities.getDayInAbbBySelectedDate(stepsTakenModelsLastWeek.get(i).getDate()).equals(\n DateUtilities.getCurrentDayInAbb()))\n {\n c.setValue(\"value2\",stepsToday);\n }else{\n c.setValue(\"value2\",0);\n }\n }\n seriesData.add(c);\n }\n\n Set set = Set.instantiate();\n set.data(seriesData);\n Mapping series1Mapping = set.mapAs(\"{ x: 'x', value: 'value' }\");\n Mapping series2Mapping = set.mapAs(\"{ x: 'x', value: 'value2' }\");\n\n Line series1 = cartesian.line(series1Mapping);\n series1.name(\"Last Week\");\n series1.hovered().markers().enabled(true);\n series1.hovered().markers()\n .type(MarkerType.CIRCLE)\n .size(4d);\n series1.tooltip()\n .position(\"right\")\n .anchor(Anchor.LEFT_CENTER)\n .offsetX(5d)\n .offsetY(5d);\n\n Line series2 = cartesian.line(series2Mapping);\n series2.name(\"This Week\");\n series2.hovered().markers().enabled(true);\n series2.hovered().markers()\n .type(MarkerType.CIRCLE)\n .size(4d);\n series2.tooltip()\n .position(\"right\")\n .anchor(Anchor.LEFT_CENTER)\n .offsetX(5d)\n .offsetY(5d);\n\n\n cartesian.legend().enabled(true);\n cartesian.legend().fontSize(13d);\n cartesian.legend().padding(0d, 0d, 10d, 0d);\n\n chart.setChart(cartesian);\n }", "private void createGridSizeButton() {\n\t\tEventHandler<MouseEvent> eventHandler = new EventHandler<MouseEvent>() {\n\t @Override public void handle(MouseEvent e) {\n\t \tinputGridSize();}\n };\n \tcreateGenericButton(2, 1, myResources.getString(\"userinput\"), eventHandler);\n }", "public AreaRenderer() {\n\t\tsuper();\n\t\tthis.endType = AreaRendererEndType.TAPER;\n\t}", "public void generateBarChart(float[] act, float[] act1)\n {\n\n HorizontalBarChart barChart= (HorizontalBarChart) findViewById(R.id.chart);\n /*\n ArrayList<BarEntry> entries = new ArrayList<>();\n entries.add(new BarEntry(4f, 0));\n entries.add(new BarEntry(8f, 1));\n entries.add(new BarEntry(6f, 2));\n entries.add(new BarEntry(12f, 3));\n entries.add(new BarEntry(18f, 4));\n entries.add(new BarEntry(10f, 6));\n entries.add(new BarEntry(14f, 7));\n entries.add(new BarEntry(2f, 5));\n\n BarDataSet dataset1 = new BarDataSet(entries, \"# of Calls\");\n */\n\n ArrayList<String> labels = new ArrayList<String>();\n labels.add(\"Food\");\n labels.add(\"Cloth\");\n labels.add(\"Travelling\");\n labels.add(\"Stationary\");\n labels.add(\"Furniture\");\n labels.add(\"Medicine\");\n labels.add(\"Bill\");\n labels.add(\"Utensils\");\n\n\n /* for create Grouped Bar chart*/\n ArrayList<BarEntry> group1 = new ArrayList<>();\n group1.add(new BarEntry(act1[0], 0));\n group1.add(new BarEntry(act1[1], 1));\n group1.add(new BarEntry(act1[2], 2));\n group1.add(new BarEntry(act1[3], 3));\n group1.add(new BarEntry(act1[4], 4));\n group1.add(new BarEntry(act1[5], 5));\n group1.add(new BarEntry(act1[6], 6));\n group1.add(new BarEntry(act1[7], 7));\n\n ArrayList<BarEntry> group2 = new ArrayList<>();\n group2.add(new BarEntry(act[0], 0));\n group2.add(new BarEntry(act[1], 1));\n group2.add(new BarEntry(act[2], 2));\n group2.add(new BarEntry(act[3], 3));\n group2.add(new BarEntry(act[4], 4));\n group2.add(new BarEntry(act[5], 5));\n group2.add(new BarEntry(act[6], 6));\n group2.add(new BarEntry(act[7], 7));\n\n BarDataSet barDataSet1 = new BarDataSet(group1, \"Planned Amount\");\n //barDataSet1.setColor(Color.rgb(0, 155, 0));\n barDataSet1.setColor(getResources().getColor(R.color.darkgreen));\n\n BarDataSet barDataSet2 = new BarDataSet(group2, \"Actual Amount\");\n barDataSet2.setColor(getResources().getColor(R.color.purered));\n\n\n ArrayList<IBarDataSet> dataset = new ArrayList<>();\n dataset.add(barDataSet1);\n dataset.add(barDataSet2);\n /**/\n\n BarData data = new BarData(labels,dataset);\n// // dataset.setColors(ColorTemplate.COLORFUL_COLORS); //\n barChart.setData(data);\n barChart.animateY(5000);\n barChart.setDescription(\"Expense Graph\");\n barChart.setDescriptionPosition(2f, 2f);\n\n }", "public void mouseClicked(MouseEvent e) {\n\t\t\tint x = e.getX();\n\t\t\tint y = e.getY();\n\n\t\t\t// selected area is highlighted by drawing a rectangle around it\n\t\t\t// areaLabel flashes the name of the area selected\n\t\t\tif ((x >= 230 && x <= 329) && (y >= 155 && y <= 295)) {\n\n\t\t\t\tsection = new Rectangle(230, 155, 99, 140);\n\t\t\t\trepaint();\n\t\t\t\tsectionLabel.setText(\"TOILET 1\");\n\n\t\t\t\tid = 1;\n\n\t\t\t} else if ((x >= 319 && x <= 480) && (y >= 225 && y <= 507)) {\n\t\t\t\tsection = new Rectangle(319, 225, 161, 282);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"BEDROOM 1\");\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 2;\n\n\t\t\t} else if ((x >= 478 && x <= 651) && (y >= 226 && y <= 437)) {\n\t\t\t\tsection = new Rectangle(478, 226, 173, 211);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"LIVING ROOM\");\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 3;\n\n\t\t\t} else if ((x >= 478 && x <= 686) && (y >= 450 && y <= 581)) {\n\t\t\t\tsection = new Rectangle(478, 450, 208, 131);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"DINING ROOM\");\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 4;\n\n\t\t\t} else if ((x >= 654 && x <= 779) && (y >= 227 && y <= 405)) {\n\t\t\t\tsection = new Rectangle(654, 227, 125, 178);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"KITCHEN\");\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 5;\n\n\t\t\t} else if ((x >= 776 && x <= 929) && (y >= 225 && y <= 404)) {\n\t\t\t\tsection = new Rectangle(776, 225, 153, 179);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"BEDROOM 2\");\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 6;\n\n\t\t\t} else if ((x >= 688 && x <= 782) && (y >= 460 && y <= 589)) {\n\t\t\t\tsection = new Rectangle(688, 460, 94, 129);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"TOILET 2\");\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 7;\n\t\t\t} else if ((x >= 929 && x <= 1094) && (y >= 226 && y <= 486)) {\n\t\t\t\tsection = new Rectangle(929, 224, 165, 262);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"MASTER BEDROOM\");\n\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 8;\n\n\t\t\t} else if ((x >= 958 && x <= 1095) && (y >= 489 && y <= 590)) {\n\t\t\t\tsection = new Rectangle(958, 489, 137, 101);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"TOILET 3\");\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 9;\n\n\t\t\t} else if ((x >= 346 && x <= 1095) && (y >= 138 && y <= 223)) {\n\t\t\t\tsection = new Rectangle(346, 138, 748, 85);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"BALCONY\");\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 10;\n\t\t\t} else {\n\t\t\t\tsection = null;\n\t\t\t\tsectionLabel.setText(\"\");\n\n\t\t\t\tid = 0;\n\t\t\t}\n\n\t\t}", "@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\tsuper.mouseEntered(e);\r\n\t\t\t\t\tbrushToolHelper.hidePopup();\r\n\t\t\t\t}", "public void plotData(boolean appendingData, boolean mean) {\n\n // Add data to existing plaot if appending.\n if (appendingData && chartpanel != null) {\n appendData();\n } else {\n String xaxisname = \"Plane\";\n // Create an chart empty.\n if (mean) {\n xaxisname = \"Length\";\n }\n final JFreeChart chart = createChart(xaxisname);\n chart.setBackgroundPaint(Color.WHITE); //DJ: 09/22/2014\n\n // Get the data.\n if (mean) {\n data = getLineDataset();\n } else {\n data = getDataset();\n }\n\n // Apply data to the plot\n MimsXYPlot xyplot = (MimsXYPlot) chart.getPlot();\n\n xyplot.setBackgroundPaint(Color.WHITE); //DJ: 09/22/2014\n\n xyplot.setDataset(data);\n xyplot.setRois(rois);\n xyplot.setParent(this);\n\n //DJ 09/22/2014\n final int numberOfSeries = xyplot.getSeriesCount();\n //System.out.println(\"number-of-series = \" + numberOfSeries);\n\n /*\n System.out.println(\"range up limit = \" + xyplot.getRangeAxis().getRange().getUpperBound());\n System.out.println(\"range down limit = \" + xyplot.getRangeAxis().getRange().getLowerBound());\n System.out.println(\"domain up limit = \" + xyplot.getDomainAxis().getRange().getUpperBound());\n System.out.println(\"domain down limit = \" + xyplot.getDomainAxis().getRange().getLowerBound());\n */\n // Generate the layout.\n //chartpanel = new MimsChartPanel(chart);\n chartpanel = new MimsChartPanel(chart);\n chartpanel.addMouseListener(this);\n chartpanel.setPreferredSize(new java.awt.Dimension(600, 400));\n String lastFolder = ui.getLastFolder();\n if (lastFolder != null) {\n if (new File(lastFolder).exists()) {\n chartpanel.setDefaultDirectoryForSaveAs(new File(lastFolder));\n }\n }\n this.add(chartpanel);\n\n chartpanel.setNumberOfSeries(numberOfSeries);\n\n // DJ: 09/22/2014\n // Add menu item for thikining or the plot lines\n // increase lines thikness\n JMenuItem incresaseLinesThikness = new JMenuItem(\"Increase Lines Thickness\");\n incresaseLinesThikness.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n //DJ\n\n lineThikness = chartpanel.getLineThikness();\n\n if (chartpanel.setLineThikness(lineThikness + 0.5f)) {\n lineThikness = chartpanel.getLineThikness();\n //if (lineThikness + 1.0f <= maxThikness) {\n // lineThikness += 1.0f;\n\n BasicStroke stroke = new BasicStroke(lineThikness);\n Plot plot = chart.getXYPlot();\n\n if (plot instanceof CategoryPlot) {\n CategoryPlot categoryPlot = chart.getCategoryPlot();\n CategoryItemRenderer cir = categoryPlot.getRenderer();\n try {\n for (int i = 0; i < numberOfSeries; i++) {\n cir.setSeriesStroke(i, stroke); //series line style\n }\n } catch (Exception ex) {\n System.err.println(ex);\n }\n } else if (plot instanceof XYPlot) {\n\n XYPlot xyPlot = chart.getXYPlot();\n XYItemRenderer xyir = xyPlot.getRenderer();\n try {\n for (int i = 0; i < numberOfSeries; i++) {\n xyir.setSeriesStroke(i, stroke); //series line style\n }\n } catch (Exception ex) {\n System.err.println(ex);\n }\n }\n }\n }\n });\n\n // increase lines thikness\n JMenuItem decreaseLinesThikness = new JMenuItem(\"Decrease Lines Thickness\");\n decreaseLinesThikness.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n //DJ\n lineThikness = chartpanel.getLineThikness();\n\n if (chartpanel.setLineThikness(lineThikness - 0.5f)) {\n lineThikness = chartpanel.getLineThikness();\n //if (lineThikness - 1.0f >= minThikness) {\n // lineThikness -= 1.0f;\n\n BasicStroke stroke = new BasicStroke(lineThikness);\n Plot plot = chart.getXYPlot();\n\n if (plot instanceof CategoryPlot) {\n CategoryPlot categoryPlot = chart.getCategoryPlot();\n CategoryItemRenderer cir = categoryPlot.getRenderer();\n try {\n for (int i = 0; i < numberOfSeries; i++) {\n cir.setSeriesStroke(i, stroke); //series line style\n }\n } catch (Exception ex) {\n System.err.println(ex);\n }\n } else if (plot instanceof XYPlot) {\n\n XYPlot xyPlot = chart.getXYPlot();\n XYItemRenderer xyir = xyPlot.getRenderer();\n try {\n for (int i = 0; i < numberOfSeries; i++) {\n xyir.setSeriesStroke(i, stroke); //series line style\n }\n } catch (Exception ex) {\n System.err.println(ex);\n }\n }\n }\n }\n });\n\n chartpanel.getPopupMenu().addSeparator();\n chartpanel.getPopupMenu().add(incresaseLinesThikness);\n chartpanel.getPopupMenu().add(decreaseLinesThikness);\n\n JMenu changePlotColor = new JMenu(\"Change Plot Color\");\n final JMenuItem black = new JMenuItem(\"BLACK\");\n final JMenuItem blue = new JMenuItem(\"BLUE\");\n final JMenuItem grey = new JMenuItem(\"GRAY\");\n final JMenuItem green = new JMenuItem(\"GREEN\");\n final JMenuItem red = new JMenuItem(\"RED\");\n final JMenuItem yellow = new JMenuItem(\"YELLOW\");\n final JMenuItem purple = new JMenuItem(\"PURPLE\");\n final JMenuItem brown = new JMenuItem(\"BROWN\");\n final JMenuItem orange = new JMenuItem(\"ORANGE\");\n final JMenuItem darkGreen = new JMenuItem(\"DARK GREEN\");\n final JMenuItem lightBlue = new JMenuItem(\"LIGHT BLUE\");\n\n black.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(black.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 97, 'a');\n chartpanel.keyPressed(ev);\n }\n });\n blue.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(blue.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 98, 'b');\n chartpanel.keyPressed(ev);\n }\n });\n grey.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(grey.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 101, 'e');\n chartpanel.keyPressed(ev);\n }\n });\n green.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(green.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 103, 'g');\n chartpanel.keyPressed(ev);\n }\n });\n red.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(red.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 114, 'r');\n chartpanel.keyPressed(ev);\n }\n });\n yellow.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(yellow.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 121, 'y');\n chartpanel.keyPressed(ev);\n }\n });\n purple.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(purple.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 112, 'p');\n chartpanel.keyPressed(ev);\n }\n });\n brown.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(brown.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 119, 'w');\n chartpanel.keyPressed(ev);\n }\n });\n orange.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(orange.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 111, 'o');\n chartpanel.keyPressed(ev);\n }\n });\n darkGreen.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(darkGreen.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 100, 'd');\n chartpanel.keyPressed(ev);\n }\n });\n lightBlue.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n KeyEvent ev = new KeyEvent(lightBlue.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), 108, 'l');\n chartpanel.keyPressed(ev);\n }\n });\n\n changePlotColor.add(black);\n changePlotColor.add(blue);\n changePlotColor.add(grey);\n changePlotColor.add(green);\n changePlotColor.add(red);\n changePlotColor.add(yellow);\n changePlotColor.add(purple);\n changePlotColor.add(brown);\n changePlotColor.add(orange);\n changePlotColor.add(darkGreen);\n changePlotColor.add(lightBlue);\n\n chartpanel.getPopupMenu().add(changePlotColor);\n\n // Add menu item for showing/hiding crosshairs.\n JMenuItem xhairs = new JMenuItem(\"Show/Hide Crosshairs\");\n xhairs.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n showHideCrossHairs(chartpanel);\n }\n });\n chartpanel.getPopupMenu().addSeparator();\n chartpanel.getPopupMenu().add(xhairs);\n // Add menu item for showing/hiding crosshairs.\n JMenuItem pointhairs = new JMenuItem(\"Add point roi at crosshairs\");\n pointhairs.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n if (pointX > 0 && pointY > 0) {\n ui.getRoiManager().add(new PointRoi(pointX, pointY));\n ui.updateAllImages();\n }\n }\n });\n chartpanel.getPopupMenu().add(pointhairs);\n // Add menu item for toggling between linear and log scales.\n JMenuItem logscale = new JMenuItem(\"Log/Linear scale\");\n logscale.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n MimsJFreeChart.logLinScale(chartpanel);\n }\n });\n chartpanel.getPopupMenu().add(logscale);\n\n // Add menu item for exporting plot to report.\n /*JMenuItem genreport = new JMenuItem(\"Generate Report\");\n genreport.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n generateReport();\n }\n });\n chartpanel.getPopupMenu().add(genreport);*/\n JMenuItem libreoffice = new JMenuItem(\"Add to Libreoffice\");\n libreoffice.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mimsUno.insertGraph(getImage(), \"test\", \"test\", \"test\");\n }\n });\n chartpanel.getPopupMenu().add(libreoffice);\n\n // Replace Save As... menu item.\n chartpanel.getPopupMenu().remove(3);\n JMenuItem saveas = new JMenuItem(\"Save as...\");\n saveas.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n saveAs();\n }\n });\n chartpanel.getPopupMenu().add(saveas, 3);\n\n // Add an option for getting the underlying data\n JMenuItem asTextMenuItem = new javax.swing.JMenuItem(\"Display text\");\n asTextMenuItem.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n displayProfileData();\n }\n });\n chartpanel.getPopupMenu().add(asTextMenuItem, 2);\n\n // Add key listener.\n KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new KeyEventDispatcher() {\n public boolean dispatchKeyEvent(KeyEvent e) {\n if (e.getID() == KeyEvent.KEY_PRESSED && thisHasFocus()) {\n chartpanel.keyPressed(e);\n }\n return false;\n }\n });\n\n pack();\n setVisible(true);\n\n }\n }", "public Rectangle getChartArea() {\n return chartArea;\n }", "private void createRgbHsbButtons() {\n \t\n Composite comp1 = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(3, false);\n gl.horizontalSpacing = 10;\n comp1.setLayout(gl);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n comp1.setLayoutData(gd);\n\n // Create a group to contain the RGB and HSB radio buttons.\n Group colorGroup = new Group(comp1, SWT.NONE);\n colorGroup.setText(\" Use color model: \");\n\n RowLayout groupRowLayout = new RowLayout();\n groupRowLayout.marginLeft = 10;\n groupRowLayout.marginRight = 10;\n groupRowLayout.spacing = 10;\n colorGroup.setLayout(groupRowLayout);\n\n // Create the RGB radio button. When the radio button is selected\n // update the upper and lower color wheel objects to display the RGB\n // sliders.\n rgbRdo = new Button(colorGroup, SWT.RADIO);\n rgbRdo.setText(\"RGB\");\n rgbRdo.setSelection(true);\n rgbRdo.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n changeColorWheels();\n }\n });\n\n // Create the HSB radio button. When the radio button is selected\n // update the upper and lower color wheel objects to display the HSB\n // sliders.\n hsbRdo = new Button(colorGroup, SWT.RADIO);\n hsbRdo.setText(\"HSB\");\n hsbRdo.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n changeColorWheels();\n }\n });\n \n Composite catComp = new Composite(comp1, SWT.NONE);\n gl = new GridLayout(1, false);\n gl.horizontalSpacing = 20;\n catComp.setLayout(gl);\n gd = new GridData(GridData.CENTER);\n gd.horizontalAlignment = SWT.CENTER;\n \n catComp.setLayoutData(gd);\n\n Label selCatLbl = new Label( catComp, SWT.None );\n selCatLbl.setText(\"Category\");\n \n final Combo selCmapCatCombo = new Combo( catComp, SWT.DROP_DOWN | SWT.READ_ONLY );\n selCmapCatCombo.setItems( availColorMapCats );\n selCmapCatCombo.select(0);\n \n selCmapCatCombo.addSelectionListener( new SelectionAdapter() {\n \tpublic void widgetSelected(SelectionEvent event) {\n \t\tString seldCat = selCmapCatCombo.getText();\n \t\tif( seldCat.equals( seldCmapCat ) ) {\n \t\t\treturn;\n \t\t}\n \t\t\n \t\tseldCmapCat = seldCat;\n \t\tseldCmapName = null;\n \t\tavailColorMaps.clear();\n \t\t\n for( String cmap : ColorMapUtil.listColorMaps(seldCmapCat) ) {\n \tif( seldCmapName == null ) {\n \t\tseldCmapName = cmap;\n \t\tif( !initColorMap() ) {\n \t\tseldCmapName = null;\n \t\t\tcontinue; // don't add to the list\n \t\t}\n \t}\n \tavailColorMaps.add(cmap);\n }\n \t\n createSliderData();\n selCmapCombo.setItems( availColorMaps.toArray(new String[0] ) );\n selCmapCombo.select(0);\n colorBar.setNewColorMap(sliderText, colorArray);\n \t}\n });\n \n Composite cmapComp = new Composite(comp1, SWT.NONE);\n gl = new GridLayout(1, false);\n gl.horizontalSpacing = 10;\n cmapComp.setLayout(gl);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n cmapComp.setLayoutData(gd);\n\n Label selCmapLbl = new Label( cmapComp, SWT.None );\n selCmapLbl.setText(\"Colormap\");\n \n selCmapCombo = new Combo( cmapComp, SWT.DROP_DOWN );\n selCmapCombo.setItems( availColorMaps.toArray(new String[0] ) );\n selCmapCombo.select(0);\n \n selCmapCombo.addSelectionListener( new SelectionAdapter() {\n \tpublic void widgetSelected(SelectionEvent event) {\n \t\tString seldCmap = selCmapCombo.getText();\n \t\tif( seldCmap.equals( seldCmapName ) ) {\n \t\t\treturn;\n \t\t}\n \t\t\n \t\tseldCmapName = seldCmap;\n\n \t\tif( initColorMap() ) {\n createSliderData();\n \t\t}\n colorBar.setNewColorMap(sliderText, colorArray);\n \t}\n });\n \n// selCmapCombo.addModifyListener( new ModifyListener() {\n//\t\t\t@Override\n//\t\t\tpublic void modifyText(ModifyEvent e) { \n//\t\t\t\tseldCmapName = selCmapCombo.getText();\n//\t\t\t}\n// });\n }", "public static void main(String[] args) {\n\n OverlaidBarChartDemo demo = new OverlaidBarChartDemo(\"Overlaid Bar Chart Demo\");\n demo.pack();\n RefineryUtilities.centerFrameOnScreen(demo);\n demo.setVisible(true);\n\n }", "@Test\n public void test79() throws Throwable {\n DefaultBoxAndWhiskerCategoryDataset defaultBoxAndWhiskerCategoryDataset0 = new DefaultBoxAndWhiskerCategoryDataset();\n SubCategoryAxis subCategoryAxis0 = new SubCategoryAxis(\":HD:3P^w7T\");\n DateAxis dateAxis0 = new DateAxis();\n DefaultPolarItemRenderer defaultPolarItemRenderer0 = new DefaultPolarItemRenderer();\n Color color0 = (Color)defaultPolarItemRenderer0.getBaseFillPaint();\n subCategoryAxis0.setSubLabelPaint(color0);\n StackedBarRenderer3D stackedBarRenderer3D0 = new StackedBarRenderer3D(729.43602760018, 729.43602760018, true);\n CategoryPlot categoryPlot0 = new CategoryPlot((CategoryDataset) defaultBoxAndWhiskerCategoryDataset0, (CategoryAxis) subCategoryAxis0, (ValueAxis) dateAxis0, (CategoryItemRenderer) stackedBarRenderer3D0);\n BasicStroke basicStroke0 = (BasicStroke)categoryPlot0.getRangeGridlineStroke();\n categoryPlot0.setDomainAxis(2052, (CategoryAxis) subCategoryAxis0, true);\n JFreeChart jFreeChart0 = new JFreeChart((Plot) categoryPlot0);\n ChartPanel chartPanel0 = new ChartPanel(jFreeChart0, true);\n ChartRenderingInfo chartRenderingInfo0 = chartPanel0.getChartRenderingInfo();\n PlotRenderingInfo plotRenderingInfo0 = chartRenderingInfo0.getPlotInfo();\n ScrollPane scrollPane0 = null;\n try {\n scrollPane0 = new ScrollPane();\n } catch(HeadlessException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"java.awt.GraphicsEnvironment\", e);\n }\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public Tastatur(){\n\t\t\n\t\t/* \n\t\t * Rufe Konstruktor auf, erzeuge JPanel mit GridLayout\n\t\t * GridLayout(int AnzahlZeilen, int AnzahlSpalten, int hAbstand, int vAbstand)\n\t\t */\n\t\tsuper(new GridLayout(3,3,0,0));\n\t\t\n\t\t/* Elemte von rechts nach links dem Layout hinzufuegen */\n\t\tthis.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\n\t\t\n\t\t//Array mit den Buttons zur Steuerung\n\t\tJButton button [] = new JButton[10];\n\t\t\n\t\t//Verzeichnis in dem sich die icons befinden\n\t\tString verzeichnis = \"icons\"+File.separator+\"Navigator\"+File.separator;\n\t\t\n\t\t//Array mit den Namen der Icons\n\t\tString tastatur_icons [] = {\"taste1.gif\", \"taste2.gif\", \"taste3.gif\", \"taste4.gif\", \"taste5.gif\", \"taste6.gif\", \"taste7.gif\", \"taste8.gif\", \"taste9.gif\"};\n\t\n\t\t\n\t\t//9 Buttons erzeugen\n\t\tfor(int button_nr=8; button_nr>= 0; button_nr--){\n\t\t\tbutton[button_nr] = new JButton();\n\t\t\tbutton[button_nr].setIcon(new ImageIcon(verzeichnis+tastatur_icons[button_nr]));\n\t\t\tbutton[button_nr].setActionCommand(String.valueOf(button_nr+1));\t\n\t\t\tbutton[button_nr].setPreferredSize(new Dimension(50, 50));\n\t\t\t//button[button_nr].setMargin(new Insets(0, 0, 0, 0));\n\t\t\t\n\t\t\tif(button_nr == 4){\n\t\t\t\tbutton[button_nr].addActionListener(new ListenerWaffe()); // ActionListener Waffe dem Button zuweisen\n\t\t\t}else{\n\t\t\t\tbutton[button_nr].addActionListener(new ListenerBewegung()); // ActionListener Bewegen dem Button zuweisen\n\t\t\t}\n\t\t\t \n\t\t\tthis.add(button[button_nr]);\n\t\t}\n\t}", "void createButton(Button main){\n\t\tActions handler = new Actions();\r\n\t\tmain.setOnAction(handler);\r\n\t\tmain.setFont(font);\r\n\t\t//sets button preference dimensions and label \r\n\t\tmain.setPrefWidth(100);\r\n\t\tmain.setPrefHeight(60);\r\n\t\tmain.setText(\"Close\");\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(550, 400);\n\t\tshell.setText(\"Source A Antenna 1 Data\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnNewButton_1.setBounds(116, 10, 98, 30);\n\t\tbtnNewButton_1.setText(\"pol 1\");\n\t\t\n\t\tButton btnPol = new Button(shell, SWT.NONE);\n\t\tbtnPol.setText(\"pol 2\");\n\t\tbtnPol.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol.setBounds(220, 10, 98, 30);\n\t\t\n\t\tButton btnPol_1 = new Button(shell, SWT.NONE);\n\t\tbtnPol_1.setText(\"pol 3\");\n\t\tbtnPol_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_1.setBounds(324, 10, 98, 30);\n\t\t\n\t\tButton btnPol_2 = new Button(shell, SWT.NONE);\n\t\tbtnPol_2.setText(\"pol 4\");\n\t\tbtnPol_2.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_2.setBounds(428, 10, 98, 30);\n\t\t\n\t\tButton button_3 = new Button(shell, SWT.NONE);\n\t\tbutton_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tPlot_graph nw = new Plot_graph();\n\t\t\t\tnw.GraphScreen();\n\t\t\t}\n\t\t});\n\t\tbutton_3.setBounds(116, 46, 98, 30);\n\t\t\n\t\tButton button_4 = new Button(shell, SWT.NONE);\n\t\tbutton_4.setBounds(116, 83, 98, 30);\n\t\t\n\t\tButton button_5 = new Button(shell, SWT.NONE);\n\t\tbutton_5.setBounds(116, 119, 98, 30);\n\t\t\n\t\tButton button_6 = new Button(shell, SWT.NONE);\n\t\tbutton_6.setBounds(116, 155, 98, 30);\n\t\t\n\t\tButton button_7 = new Button(shell, SWT.NONE);\n\t\tbutton_7.setBounds(220, 155, 98, 30);\n\t\t\n\t\tButton button_8 = new Button(shell, SWT.NONE);\n\t\tbutton_8.setBounds(220, 119, 98, 30);\n\t\t\n\t\tButton button_9 = new Button(shell, SWT.NONE);\n\t\tbutton_9.setBounds(220, 83, 98, 30);\n\t\t\n\t\tButton button_10 = new Button(shell, SWT.NONE);\n\t\tbutton_10.setBounds(220, 46, 98, 30);\n\t\t\n\t\tButton button_11 = new Button(shell, SWT.NONE);\n\t\tbutton_11.setBounds(428, 155, 98, 30);\n\t\t\n\t\tButton button_12 = new Button(shell, SWT.NONE);\n\t\tbutton_12.setBounds(428, 119, 98, 30);\n\t\t\n\t\tButton button_13 = new Button(shell, SWT.NONE);\n\t\tbutton_13.setBounds(428, 83, 98, 30);\n\t\t\n\t\tButton button_14 = new Button(shell, SWT.NONE);\n\t\tbutton_14.setBounds(428, 46, 98, 30);\n\t\t\n\t\tButton button_15 = new Button(shell, SWT.NONE);\n\t\tbutton_15.setBounds(324, 46, 98, 30);\n\t\t\n\t\tButton button_16 = new Button(shell, SWT.NONE);\n\t\tbutton_16.setBounds(324, 83, 98, 30);\n\t\t\n\t\tButton button_17 = new Button(shell, SWT.NONE);\n\t\tbutton_17.setBounds(324, 119, 98, 30);\n\t\t\n\t\tButton button_18 = new Button(shell, SWT.NONE);\n\t\tbutton_18.setBounds(324, 155, 98, 30);\n\n\t}", "@FXML \n\tprivate void handleQuadradoButtonCH0() throws Exception {\n\t\tif(quadradoButtonCH0.isSelected()){\n\t\t\t//System.out.println(\"quadrado seleteed\");\n\t\t\tdutyFieldCH0.setDisable(false);\n\t\t\tdutyLabelCH0.setText(\"Duty\");\n\t\t\tdutyUnitLabelCH0.setText(\"%\");\n\t\t\tchartDrawer.drawQua();\n\t\t}\n\t\telse{\n\t\t\t//clear the chart\n\t\t\tdutyFieldCH0.setDisable(true);\n\t\t\tchartDrawer.clear();\n\t\t}\n\t}", "@FXML\n void zOutPressed(ActionEvent event) {\n\t\tcanvas.setScaleX(canvas.getScaleX()*0.9);\n\t\tcanvas.setScaleY(canvas.getScaleY()*0.9);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n background = new javax.swing.JPanel();\n barChart = new javax.swing.JPanel();\n barChartMonth = new javax.swing.JPanel();\n inputSearch = new javax.swing.JTextField();\n statisBtn = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n yearLabel = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n barChart.setBackground(new java.awt.Color(255, 255, 255));\n barChart.setLayout(new java.awt.BorderLayout());\n\n barChartMonth.setBackground(new java.awt.Color(255, 255, 255));\n barChartMonth.setLayout(new java.awt.BorderLayout());\n\n inputSearch.setFont(new java.awt.Font(\"Times New Roman\", 0, 24)); // NOI18N\n\n statisBtn.setBackground(new java.awt.Color(255, 255, 255));\n statisBtn.setFont(new java.awt.Font(\"Times New Roman\", 0, 24)); // NOI18N\n statisBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icon/area_chart_48px.png\"))); // NOI18N\n statisBtn.setText(\"Thống kê\");\n\n jLabel1.setFont(new java.awt.Font(\"Times New Roman\", 1, 16)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(51, 51, 255));\n jLabel1.setText(\"Năm thống kê\");\n\n yearLabel.setFont(new java.awt.Font(\"Times New Roman\", 0, 36)); // NOI18N\n yearLabel.setForeground(new java.awt.Color(51, 51, 255));\n yearLabel.setText(\"Năm\");\n\n javax.swing.GroupLayout backgroundLayout = new javax.swing.GroupLayout(background);\n background.setLayout(backgroundLayout);\n backgroundLayout.setHorizontalGroup(\n backgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(barChart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(barChartMonth, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, backgroundLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(yearLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 533, Short.MAX_VALUE)\n .addGroup(backgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addGroup(backgroundLayout.createSequentialGroup()\n .addComponent(inputSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 345, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26)\n .addComponent(statisBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(27, 27, 27))\n );\n backgroundLayout.setVerticalGroup(\n backgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(backgroundLayout.createSequentialGroup()\n .addGroup(backgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(yearLabel)\n .addGroup(backgroundLayout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(backgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(inputSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(statisBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(barChart, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(barChartMonth, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(background, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(background, javax.swing.GroupLayout.PREFERRED_SIZE, 683, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }", "private void btnSiguienteMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnSiguienteMouseClicked\r\n \r\n if(PanelBalanceGeneral.getX() != 0){\r\n \r\n Contador++;\r\n Avanzar();\r\n \r\n if(PanelBalanceGeneral.getX() == 0){PanelActual = Paneles[1];}\r\n \r\n if(Contador-1 >= 0){\r\n \r\n btnAnterior.setToolTipText(Paneles[Contador-1]);\r\n btnSiguiente.setToolTipText(Paneles[Contador+1]);\r\n \r\n }\r\n \r\n }\r\n // TODO add your handling code here:\r\n }", "@Override\n public void mouseExited(MouseEvent e) {\n\n // Reset mouse position memory as mouse exit the canvas\n mousePosition = new MousePosition();\n\n // Update display\n if (getChart() != null) {\n getChart().getView().shoot();\n\n }\n }", "private void TabbedPaneMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_TabbedPaneMouseClicked\n DefaultPieDataset pieDataset = new DefaultPieDataset();\n // import spending data\n getSpendingData();\n // assign data a title & add to chart\n pieDataset.setValue(\"mortgage\", mort);\n pieDataset.setValue(\"credit\", cred);\n pieDataset.setValue(\"loans\", loan);\n pieDataset.setValue(\"auto\", auto);\n pieDataset.setValue(\"grocery\", groc);\n pieDataset.setValue(\"medical\", medi);\n pieDataset.setValue(\"utilities\", util);\n pieDataset.setValue(\"entertainment\", ente);\n pieDataset.setValue(\"other\", othe);\n\n JFreeChart chart = ChartFactory.createPieChart3D(\"How You Spend Your Money\",\n pieDataset, true, true, true);\n PiePlot3D P = (PiePlot3D) chart.getPlot();\n // Add chart to existing JPanel...\n chartPanel.setLayout(new java.awt.BorderLayout());\n ChartPanel CP = new ChartPanel(chart);\n chartPanel.add(CP, BorderLayout.CENTER);\n chartPanel.validate();\n }", "@Test\n public void test70() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) null);\n Color color0 = (Color)combinedDomainCategoryPlot0.getRangeGridlinePaint();\n CategoryAxis categoryAxis0 = combinedDomainCategoryPlot0.getDomainAxis();\n JFreeChart jFreeChart0 = new JFreeChart((Plot) combinedDomainCategoryPlot0);\n ChartPanel chartPanel0 = new ChartPanel(jFreeChart0, (-1369), (-797), (-797), (-797), (-797), (-797), true, false, true, true, false, false);\n ChartRenderingInfo chartRenderingInfo0 = chartPanel0.getChartRenderingInfo();\n PlotRenderingInfo plotRenderingInfo0 = new PlotRenderingInfo(chartRenderingInfo0);\n Button button0 = null;\n try {\n button0 = new Button(\"yw{>Kt*0}\");\n } catch(HeadlessException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"java.awt.GraphicsEnvironment\", e);\n }\n }", "void clearButton_actionPerformed(ActionEvent e) {\n clearPlot(true);\n }", "public void button3Pushed(ActionEvent event)\r\n {\n GraphicsContext gc = canvas.getGraphicsContext2D();\r\n \r\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n \r\n \r\n }", "public void mousePressed(MouseEvent e) {\n\n if(Objects.equals(ToolSelect.GetTool(), \"zoom/pan\")){\n released = false;\n sPoint = MouseInfo.getPointerInfo().getLocation();\n }else {\n\n startPoint = e.getPoint();\n shape = new ColoredRectangle(ToolSelect.GetBorderColor(), ToolSelect.GetFillColor(), new Rectangle(), ToolSelect.GetTool(), null);\n if (Objects.equals(ToolSelect.GetTool(), \"plot\") || Objects.equals(ToolSelect.GetTool(), \"line\")) {\n shape.shape.setBounds(e.getX(), e.getY(), 1, 1);\n }\n }\n\n }", "@Override\n \tpublic void onClick(View arg0) {\n \t\ttry{\n \t\t\tSeriesSelection selectedPoint = lineGraph.getCurrentSeriesAndPoint();\n \n \t\t\tif(selectedPoint!=null)\n \t\t\t{\n \t\t\t\tString time = xAxisLabelsFinal[(int)selectedPoint.getXValue()];\n \n \t\t\t\tdouble amount=(double)selectedPoint.getValue();\n \t\t\t\t\n \t\t\t\tToast.makeText(caller.getBaseContext(), \"Crowdedness at \" + time + \": \" + amount + \"%\", Properties.TOAST_DEFAULT_DURATION).show();\n \t\t\t}\n \t\t} catch(Exception e){\n \t\t\t\n \t\t}\n \t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\r\n\t\t\t\t}", "private JButton createApplyButton() {\r\n apply = new JButton();\r\n apply.setBounds(5, 260, 100, 25);\r\n\r\n add(new SComponent(apply,\r\n new String[] {\"Anpassen\", \"Apply\"},\r\n new String[] {\"Speichert die Farbeinstellungen.\",\r\n \"Saves the color settings.\"}));\r\n\r\n apply.addActionListener(new ActionListener() {\r\n\r\n /** Zeichnet den Graphen mit den ausgewählten\r\n * Frabeinstellungen\r\n *\r\n * @param e ActionEvent\r\n */\r\n public void actionPerformed(final ActionEvent e) {\r\n Color[] col = new Color[8];\r\n for (int i = 0; i < 8; i++) {\r\n if (mainclass.getGraphTyp()\r\n == AbstractGraph.GRAPHTYP_RESIDUAL) {\r\n switch (i) {\r\n case COLOR_EDGE_ONE:\r\n col[i] = chooser[COLOR_EDGE_FLOW]\r\n .getColorSelected();\r\n break;\r\n case COLOR_EDGE_TWO:\r\n col[i] = chooser[COLOR_EDGE_CAP]\r\n .getColorSelected();\r\n break;\r\n case COLOR_EDGE_TOP:\r\n col[i] = chooser[COLOR_EDGE_RTOP]\r\n .getColorSelected();\r\n break;\r\n default: col[i] = chooser[i].getColorSelected();\r\n }\r\n } else {\r\n col[i] = chooser[i].getColorSelected();\r\n }\r\n }\r\n drawer.setColorSettings(col);\r\n\r\n /*GAModel gam = mainclass.getModel();\r\n if (gam.getGraphComponentState()\r\n == GAModel.COMPONENT_VALID) {\r\n gam.setGraphComponentState(GAModel.COMPONENT_OUTDATED);\r\n }*/\r\n mainclass.repaint();\r\n }\r\n });\r\n\r\n return apply;\r\n }", "public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n if(type == \"close\"){//if the close button is being edited\n button.setBackground(new Color(237,64,64));//colour chosen for the \n }\n if(type == \"scale\"){//if the fullscreen button is being edited\n button.setBackground(coloursObject.getMenuPanelColour());\n }\n }", "private void addGraphButton() {\n\t\tgraphButton = new JButton(\"Graph\");\n\t\tadd (graphButton, SOUTH);\n\t\tgraphButton.addActionListener(this);\n\t}", "@Test\n public void test70() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n ValueMarker valueMarker0 = new ValueMarker(349.98275646987);\n MarkerChangeEvent markerChangeEvent0 = new MarkerChangeEvent((Marker) valueMarker0);\n XYBlockRenderer xYBlockRenderer0 = new XYBlockRenderer();\n RectangleAnchor rectangleAnchor0 = xYBlockRenderer0.getBlockAnchor();\n Line2D.Float line2D_Float0 = new Line2D.Float((-216.01F), 4682.902F, (-216.01F), (-216.01F));\n Rectangle2D.Float rectangle2D_Float0 = (Rectangle2D.Float)line2D_Float0.getBounds2D();\n Point2D.Double point2D_Double0 = (Point2D.Double)RectangleAnchor.coordinates(rectangle2D_Float0, (RectangleAnchor) null);\n valueMarker0.setLabelAnchor(rectangleAnchor0);\n combinedRangeCategoryPlot0.markerChanged(markerChangeEvent0);\n boolean boolean0 = combinedRangeCategoryPlot0.isRangeCrosshairLockedOnData();\n RectangleInsets rectangleInsets0 = combinedRangeCategoryPlot0.getAxisOffset();\n combinedRangeCategoryPlot0.setAnchorValue(Double.NEGATIVE_INFINITY);\n Line2D.Double line2D_Double0 = new Line2D.Double((Point2D) point2D_Double0, (Point2D) point2D_Double0);\n double double0 = line2D_Double0.getY2();\n double double1 = line2D_Double0.getX1();\n boolean boolean1 = combinedRangeCategoryPlot0.isRangeZoomable();\n int int0 = combinedRangeCategoryPlot0.getDatasetCount();\n boolean boolean2 = combinedRangeCategoryPlot0.isRangeCrosshairVisible();\n combinedRangeCategoryPlot0.clearDomainAxes();\n BasicStroke basicStroke0 = (BasicStroke)combinedRangeCategoryPlot0.getRangeCrosshairStroke();\n List list0 = combinedRangeCategoryPlot0.getAnnotations();\n Layer layer0 = Layer.BACKGROUND;\n Collection collection0 = combinedRangeCategoryPlot0.getDomainMarkers(layer0);\n StandardEntityCollection standardEntityCollection0 = new StandardEntityCollection();\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo((EntityCollection) standardEntityCollection0);\n PlotRenderingInfo plotRenderingInfo0 = new PlotRenderingInfo(chartRenderingInfo0);\n combinedRangeCategoryPlot0.zoomDomainAxes(0.0, plotRenderingInfo0, (Point2D) point2D_Double0);\n LogAxis logAxis0 = new LogAxis();\n CombinedDomainXYPlot combinedDomainXYPlot0 = new CombinedDomainXYPlot((ValueAxis) logAxis0);\n AxisLocation axisLocation0 = combinedDomainXYPlot0.getDomainAxisLocation(1308);\n combinedRangeCategoryPlot0.setRangeAxisLocation(axisLocation0, false);\n }" ]
[ "0.57064533", "0.5665667", "0.55928636", "0.5548753", "0.55349696", "0.54839367", "0.54609144", "0.54247385", "0.5417356", "0.53651553", "0.5363174", "0.5333167", "0.5333129", "0.53030676", "0.5268467", "0.52492136", "0.5240236", "0.52389586", "0.5212691", "0.5171182", "0.51685303", "0.5155098", "0.5147751", "0.51438487", "0.5136865", "0.51252085", "0.51215005", "0.5121373", "0.51197296", "0.51023424", "0.5090529", "0.5085703", "0.5076744", "0.50758016", "0.50718194", "0.5049045", "0.5044809", "0.504211", "0.5033371", "0.5010436", "0.50058246", "0.5003618", "0.49941605", "0.49834126", "0.49743038", "0.49738243", "0.49566853", "0.49540946", "0.4942144", "0.49126783", "0.49083734", "0.49026003", "0.49001402", "0.48955405", "0.48946363", "0.4879607", "0.48748523", "0.4871719", "0.48692772", "0.48662978", "0.48569956", "0.48562583", "0.48559287", "0.4850362", "0.4849441", "0.48479903", "0.484765", "0.483562", "0.48355693", "0.4834726", "0.48323727", "0.48323727", "0.48323727", "0.48323727", "0.48323727", "0.48323727", "0.48323727", "0.48323727", "0.48323727", "0.48323727", "0.48323727", "0.48290735", "0.48287898", "0.4828624", "0.482075", "0.48134613", "0.48108345", "0.48106652", "0.48037994", "0.4799416", "0.47929034", "0.47870022", "0.4786929", "0.47861433", "0.47860977", "0.47814053", "0.47788796", "0.47778627", "0.47733945", "0.47712782" ]
0.7473591
0
Makes the XYSpline Chart button
public void MakeXYSpline() { XYSplineButton = new JButton( new ImageIcon(getClass().getResource( GetXYSplineChartImage()))); XYSplineButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { GetHost().instructionText.setVisible(false); GetHost().ExportEnabled(); if(GetHost().GetTitle() == UNSET) { GetHost().LeftPanelContent(new XYSplineChart( GetHost().GetGraphData(), "XYSpline Chart", GetHost().GetColourScheme(),GetHost())); }else { GetHost().LeftPanelContent(new XYSplineChart( GetHost().GetGraphData(), GetHost().GetTitle(), GetHost().GetColourScheme(),GetHost())); } } }); ChartTypeInterface.add(XYSplineButton); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void MakeScatter() {\n\t\tScatterButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(\n\t\t\t\tGetScatterPlotChartImage())));\n\t\tScatterButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Scatter Plot Chart \", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(ScatterButton);\n\t}", "public void MakeLine() {\n\t\tLineButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetLineChartImage())));\n\t\tLineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Line Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(LineButton);\n\t}", "@FXML\n public void drawXButtonPressed()\n {\n //get the GraphicsContent, which is used to draw on the canvas\n GraphicsContext gc = clearCanvasAndGetGraphicsContext();\n\n //draw line from top corner to bottom corner\n gc.strokeLine(\n 0,\n 0,\n canvas.getWidth(),\n canvas.getHeight()\n );\n\n //draw line from bottom left corner to upper right corner\n gc.strokeLine(\n 0,\n canvas.getHeight(),\n canvas.getWidth(),\n 0\n );\n }", "public void chartMouseClicked(ChartMouseEvent event) {\n }", "public void toChartData() {\n //this.chart = chart;\n chart.getData().clear();\n Set<String> labels = new HashSet<>(getLabels().values());\n Object[] names = getLocations().keySet().toArray();\n \n for (String label : labels) \n {\n XYChart.Series<Number, Number> series = new XYChart.Series<>();\n series.setName(label);\n getLabels().entrySet().stream().filter(entry -> entry.getValue().equals(label)).forEach(entry -> {\n Point2D point = getLocations().get(entry.getKey());\n \n XYChart.Data data = new XYChart.Data<>(point.getX(), point.getY()); \n series.getData().add(data);\n \n \n });\n\n getChart().getData().add(series);\n for (XYChart.Series<Number, Number> s : getChart().getData()) {\n s.getNode().setStyle(\"-fx-stroke-width: 0; \");\n s.getNode().setStyle(\"-fx-stroke: transparent; \");\n\n } \n\n\n }\n getChart().setAnimated(false);\n getChart().getData().add(new XYChart.Series<Number,Number>());\n \n for (XYChart.Series<Number, Number> s : getChart().getData()) {\n for (XYChart.Data<Number, Number> d : s.getData()) {\n\n for(Object name: names)\n {\n if(getLocations().get((String)name).getX()==d.getXValue().doubleValue()\n && getLocations().get((String)name).getY()==d.getYValue().doubleValue())\n {\n Tooltip.install(d.getNode(),new Tooltip((String)name));\n }\n \n \n }\n d.getNode().setCursor(Cursor.CROSSHAIR);\n \n \n }\n \n }\n \n\n \n /* getChart().getXAxis().setAutoRanging(false);\n getChart().getYAxis().setAutoRanging(false);\n //System.out.print(minX+\" \"+maxX+\" \"+minY+\" \"+maxY);\n double deltaX = maxX-minX;\n double deltaY = maxY-minY;\n double lowerY = deltaY>1?minY-deltaY*0.05:minY*0.1;\n double upperY = deltaY>1?maxY+deltaY*0.05:maxY*0.1;\n if(deltaY==0)\n {\n lowerY = -0.5;\n upperY = 0.5;\n }\n double lowerX = deltaX>1?minX-deltaX*0.05:minX*0.1;\n double upperX = deltaX>1?minX+deltaX*0.05:maxX*0.1;\n if(deltaX == 0)\n {\n lowerX = -0.5;\n upperX = 0.5;\n }\n \n ((NumberAxis)getChart().getXAxis()).setLowerBound(lowerX);\n ((NumberAxis)getChart().getXAxis()).setUpperBound(upperX);\n ((NumberAxis)getChart().getYAxis()).setLowerBound(lowerY);\n ((NumberAxis)getChart().getYAxis()).setUpperBound(upperY);\n */\n getChart().getXAxis().setAutoRanging(false);\n getChart().getYAxis().setAutoRanging(false);\n \n double deltaY = getMaxY()-getMinY();\n double deltaX = getMaxX()-getMinX();\n if(deltaX==0) \n {\n deltaX = 1;\n setMinX(getMinX()-getMinX()*0.1-1);\n setMaxX(getMaxX()+getMaxX()*0.1+1);\n }\n if(deltaY==0)\n {\n deltaY = 1;\n setMinY(getMinY()-getMinY()*0.1-1);\n setMaxY(getMaxY()+getMaxY()*0.1+1);\n }\n\n getChart().getXAxis().setAutoRanging(false);\n getChart().getYAxis().setAutoRanging(false);\n ((NumberAxis)getChart().getXAxis()).setLowerBound(getMinX()-Math.abs(deltaX/10));\n ((NumberAxis)getChart().getXAxis()).setUpperBound(getMaxX()+Math.abs(deltaX/10));\n ((NumberAxis)getChart().getYAxis()).setLowerBound(getMinY()-Math.abs(deltaY/10));\n ((NumberAxis)getChart().getYAxis()).setUpperBound(getMaxY()+Math.abs(deltaY/10));\n\n \n }", "@Override\n public void run() {\n XYChart.Data<Number, Number> data = new XYChart.Data<>(-x, y);\n data.setNode(new Circle(5, javafx.scene.paint.Color.GREY));\n series.getData().add(data);\n lineChart.getData().add(series);\n }", "public void setGraph(ActionEvent event)\n {\n theLineGraph.getData().clear();\n double temporary=0;\n theLineGraph.getXAxis().setLabel(\"Days\");\n\n XYChart.Series<String, Number> theGraph = new XYChart.Series<String, Number>();\n\n for (int i=0; i<Driver.save.getLog().size();i++)\n {\n String myI=i+\"\";\n\n if (event.getSource()==caloriesButton)\n {\n temporary=Driver.save.getDayCalories(i);\n theLineGraph.getYAxis().setLabel(\"Calories\");\n\n } else if(event.getSource()==protienButton)\n {\n temporary=Driver.save.getDayProtein(i);\n theLineGraph.getYAxis().setLabel(\"protien\");\n }\n else if (event.getSource()==carbsButton)\n {\n temporary=Driver.save.getDayCarbo(i);\n theLineGraph.getYAxis().setLabel(\"Carbs\");\n }\n else if (event.getSource()==fatsButton)\n {\n temporary=Driver.save.getDayFats(i);\n theLineGraph.getYAxis().setLabel(\"Fats\");\n }\n else if (event.getSource()==bevButton)\n {\n temporary=Driver.save.getDayBevarage(i);\n theLineGraph.getYAxis().setLabel(\"Drinks in ml\");\n }\n\n theGraph.getData().add(new XYChart.Data<String, Number>(myI ,temporary));\n }\n theLineGraph.getData().addAll(theGraph);\n\n }", "private void btnRenderActionPerformed(java.awt.event.ActionEvent evt) {\n \r\n String x = jcbX_Axis.getSelectedItem().toString();\r\n String y = jcbY_Axis.getSelectedItem().toString();\r\n \r\n if(y.equals(\"Depth\")){\r\n //log plot\r\n \r\n WitsmlLogCurve ydata = currentCurves.get(0);\r\n WitsmlLogCurve xdata = null;\r\n // the selected value by looping through the curve object\r\n \r\n for(int i = 1; i < currentCurves.size(); i ++){\r\n if(x.equals(currentCurves.get(i).getDescription())){\r\n xdata = currentCurves.get(i);\r\n // System.out.println(\"got \"+currentCurves.get(i).getDescription());\r\n break;\r\n }\r\n }\r\n \r\n \r\n List<Object> yvalues = ydata.getValues();\r\n List<Object> xvalues = xdata.getValues();\r\n \r\n \r\n String title = \"Depth against \"+xdata.getDescription();\r\n XYSeries series = new XYSeries(title);\r\n for(int i = 0; i<yvalues.size(); i++){\r\n Object vx = xvalues.get(i);\r\n Object vy = yvalues.get(i);\r\n double dx = Double.parseDouble(vx.toString());\r\n double dy = Double.parseDouble(vy.toString());\r\n // System.out.println(\"depth : \"+dy +\" : \"+title+\" : \"+dx);\r\n series.add(dx, dy);\r\n }\r\n XYSeriesCollection data = new XYSeriesCollection();\r\n data.addSeries(series);\r\n \r\n // create a chart using the createYLineChart method...\r\n JFreeChart chart = ChartFactory.createXYLineChart(title, // chart title\r\n xdata.getDescription(), \"Depth\", // x and y axis labels\r\n data); // data\r\n \r\n XYPlot plot = (XYPlot) chart.getPlot();\r\n XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();\r\n renderer.setSeriesLinesVisible(0, true);\r\n renderer.setSeriesShapesVisible(0, false);\r\n renderer.setSeriesLinesVisible(1, false);\r\n renderer.setSeriesShapesVisible(1, true); \r\n plot.setRenderer(renderer);\r\n ChartPanel cp = new ChartPanel(chart);\r\n setDisplayArea(cp);\r\n \r\n }else{\r\n // trajectory\r\n \r\n ArrayList<Double> ax = getValues(x);\r\n ArrayList<Double> ay = getValues(y);\r\n \r\n XYSeries series = new XYSeries(trajName);\r\n for(int i = 0; i < ax.size(); i++){\r\n series.add(ax.get(i), ay.get(i));\r\n }\r\n XYSeriesCollection data = new XYSeriesCollection();\r\n data.addSeries(series);\r\n JFreeChart chart = ChartFactory.createXYLineChart(trajName, // chart title\r\n x, y, // x and y axis labels\r\n data);\r\n ChartPanel cp = new ChartPanel(chart);\r\n setDisplayArea(cp);\r\n// call a method to select the method here \r\n }\r\n }", "@Override\r\n public void chartMouseClicked(ChartMouseEvent cme) {\n }", "void toggleButton_actionPerformed(ActionEvent e) {\n this.togglePlot();\n }", "private void smooth_plot(Bundle bundle, boolean spliceCurve, String suffix) {\n\n int[] xdata = bundle.getIntArray(\"xdata\" + suffix);\n float[] ydata = bundle.getFloatArray(\"ydata\" + suffix);\n\n // create a list of the points\n int totalPoints = xdata.length;\n ArrayList<UtilsMisc.XYPoint> details = new ArrayList<>();\n for (int i = 0; i < totalPoints; i++)\n details.add(new UtilsMisc.XYPoint(xdata[i], ydata[i]));\n\n // break up the list into chunks of NUM_POINTS based on the number of curves\n List<List<UtilsMisc.XYPoint>> partitions = new ArrayList<>();\n int NUM_CURVES = (int) Math.round(Math.log10(totalPoints)) * 2;\n int NUM_POINTS = (NUM_CURVES == 0) ? 1 : totalPoints / NUM_CURVES;\n for (int i = 0; i < totalPoints; i += NUM_POINTS)\n partitions.add(details.subList(i, Math.min(i + NUM_POINTS, totalPoints)));\n\n // for each partition, get 4 control points\n ArrayList<UtilsMisc.XYPoint> fourPoints = new ArrayList<>();\n int color = 0;\n for (int i = 0; i < partitions.size(); i++) {\n // verify that there are at least four points\n if (partitions.get(i).size() < 4) continue;\n\n // get the subset of details\n List<UtilsMisc.XYPoint> subDetails = partitions.get(i);\n UtilsMisc.XYPoint[] p = new UtilsMisc.XYPoint[4];\n\n // set the first and last control points\n double x, y;\n int first = (i == 0) ? 1 : 0;\n //x = (subDetails.get(first).getTimestamp() - start_time) / 1000.0;\n //y = getYCoordinate(subDetails, first, dataIndex);\n x = subDetails.get(first).getX();\n y = subDetails.get(first).getY();\n p[0] = new UtilsMisc.XYPoint(x, y, color);\n\n int last = subDetails.size() - 1;\n //x = (subDetails.get(last).getTimestamp() - start_time) / 1000.0;\n //y = getYCoordinate(subDetails, last, dataIndex);\n x = subDetails.get(last).getX();\n y = subDetails.get(last).getY();\n p[3] = new UtilsMisc.XYPoint(x, y, color);\n\n // find the min. and max values for the second and third control points\n // in between the first and last control points\n int min_index = 0;\n int max_index = 0;\n float max_sub_value = 0.0f;\n float min_sub_value = Constants.LARGE_FLOAT;\n for (int j = 1; j < subDetails.size() - 1; j++) {\n // float value = getYCoordinate(subDetails, j, dataIndex);\n float value = (float) subDetails.get(j).getY();\n if (value < min_sub_value) {\n min_index = j;\n min_sub_value = value;\n }\n if (value > max_sub_value) {\n max_index = j;\n max_sub_value = value;\n }\n }\n\n double xmin = subDetails.get(min_index).getX();\n double ymin = subDetails.get(min_index).getY();\n double xmax = subDetails.get(max_index).getX();\n double ymax = subDetails.get(max_index).getY();\n\n if (max_index > min_index) {\n p[1] = new UtilsMisc.XYPoint(xmin, ymin, color);\n p[2] = new UtilsMisc.XYPoint(xmax, ymax, color);\n } else {\n p[2] = new UtilsMisc.XYPoint(xmin, ymin, color);\n p[1] = new UtilsMisc.XYPoint(xmax, ymax, color);\n }\n\n fourPoints.addAll(Arrays.asList(p)); // build the list of main points\n }\n\n // build the list of control points,\n ArrayList<UtilsMisc.XYPoint> controlPoints = new ArrayList<>();\n for (int i = 0; i < fourPoints.size(); i++) {\n controlPoints.add(fourPoints.get(i));\n // in a spliced curve, add a center control point for every alternate pair of points\n if (spliceCurve && (i % 2 == 0) && (i > 0) && (i + 3) < fourPoints.size()) {\n controlPoints.add(UtilsMisc.center(fourPoints.get(i), fourPoints.get(i + 1)));\n }\n }\n\n // for a spliced curve do the 4 point bezier interpolation from 0..3, 3..6, 6..9\n // otherwise, do the 4 point bezier interpolation from 0..3, 4..7, 8..11\n UtilsMisc.XYPoint p1, p2, p3, p4;\n ArrayList<UtilsMisc.XYPoint> allPoints = new ArrayList<>();\n int INCREMENT = spliceCurve ? 3 : 4;\n for (int i = 0; i < controlPoints.size(); i += INCREMENT) {\n if ((i + 3) < controlPoints.size()) {\n p1 = controlPoints.get(i);\n p2 = controlPoints.get(i + 1);\n p3 = controlPoints.get(i + 2);\n p4 = controlPoints.get(i + 3);\n allPoints.addAll(UtilsMisc.BezierInterpolate(p1, p2, p3, p4));\n }\n }\n\n // remove duplicate x coordinates\n ArrayList<Integer> times_list = new ArrayList<>();\n ArrayList<Float> values_list = new ArrayList<>();\n Hashtable<Integer, Boolean> seenInt = new Hashtable<>();\n for (int i = 0; i < allPoints.size(); i++) {\n int xloc = (int) Math.round(allPoints.get(i).getX());\n if (seenInt.containsKey(xloc)) continue;\n seenInt.put(xloc, true);\n times_list.add(xloc);\n values_list.add((float) allPoints.get(i).getY());\n }\n\n // convert array list to array\n int[] smooth_times = UtilsMisc.convertIntegers(times_list);\n float[] smooth_values = UtilsMisc.convertFloats(values_list);\n\n bundle.putIntArray(\"xdata\" + suffix, smooth_times);\n bundle.putFloatArray(\"ydata\" + suffix, smooth_values);\n }", "private void initChart() {\n Cartesian cartesian = AnyChart.line();\n\n cartesian.animation(true);\n\n cartesian.padding(10d, 20d, 5d, 20d);\n\n cartesian.crosshair().enabled(true);\n cartesian.crosshair()\n .yLabel(true)\n // TODO ystroke\n .yStroke((Stroke) null, null, null, (String) null, (String) null);\n\n cartesian.tooltip().positionMode(TooltipPositionMode.POINT);\n\n cartesian.title(\"Steps taken in this week and last week\");\n\n cartesian.yAxis(0).title(\"Steps\");\n cartesian.xAxis(0).labels().padding(5d, 5d, 5d, 5d);\n\n List<DataEntry> seriesData = new ArrayList<>();\n Log.d(\"Size This Week\",stepsTakenModelsThisWeek.size()+\"\");\n for(int i = 0 ; i<7 ; i++){\n CustomDataEntry c = new CustomDataEntry(days[i],stepsTakenModelsLastWeek.get(i).getSteps());\n if(i<stepsTakenModelsThisWeek.size()){\n c.setValue(\"value2\",stepsTakenModelsThisWeek.get(i).getSteps());\n }else{\n if(DateUtilities.getDayInAbbBySelectedDate(stepsTakenModelsLastWeek.get(i).getDate()).equals(\n DateUtilities.getCurrentDayInAbb()))\n {\n c.setValue(\"value2\",stepsToday);\n }else{\n c.setValue(\"value2\",0);\n }\n }\n seriesData.add(c);\n }\n\n Set set = Set.instantiate();\n set.data(seriesData);\n Mapping series1Mapping = set.mapAs(\"{ x: 'x', value: 'value' }\");\n Mapping series2Mapping = set.mapAs(\"{ x: 'x', value: 'value2' }\");\n\n Line series1 = cartesian.line(series1Mapping);\n series1.name(\"Last Week\");\n series1.hovered().markers().enabled(true);\n series1.hovered().markers()\n .type(MarkerType.CIRCLE)\n .size(4d);\n series1.tooltip()\n .position(\"right\")\n .anchor(Anchor.LEFT_CENTER)\n .offsetX(5d)\n .offsetY(5d);\n\n Line series2 = cartesian.line(series2Mapping);\n series2.name(\"This Week\");\n series2.hovered().markers().enabled(true);\n series2.hovered().markers()\n .type(MarkerType.CIRCLE)\n .size(4d);\n series2.tooltip()\n .position(\"right\")\n .anchor(Anchor.LEFT_CENTER)\n .offsetX(5d)\n .offsetY(5d);\n\n\n cartesian.legend().enabled(true);\n cartesian.legend().fontSize(13d);\n cartesian.legend().padding(0d, 0d, 10d, 0d);\n\n chart.setChart(cartesian);\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tint month;\n\t\tdouble maxtempereture,monthlytempereture,mintempereture;\n\t\tResultSet rs;\n\t\tlib.MySQL mysql = new lib.MySQL();\n\t\trs = mysql.selectAll();\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\ttry{\n\t\t\twhile(rs.next()){\n\t\t\t\tmonth = rs.getInt(\"Month\");\n\t\t\t\tmaxtempereture = rs.getDouble(\"MaxTempereture\");\n\t\t\t\tmonthlytempereture = rs.getDouble(\"MonthkyTempereture\");\n\t\t\t\tmintempereture = rs.getDouble(\"MinTempereture\");\n System.out.println(\"月:\" + month);\n System.out.println(\"最高気温:\" + maxtempereture);\n System.out.println(\"月間平均気温:\" + monthlytempereture);\n System.out.println(\"最低気温:\" + mintempereture);\n data.addValue(maxtempereture,\"MaxTempereture\",month+\"\");\n data.addValue(monthlytempereture,\"MonthlyTempereture\",month+\"\");\n data.addValue(mintempereture,\"MinTempereture\",month+\"\");\n\t\t }\n\t\t}catch(SQLException et){}\n\t\t JFreeChart chart = \n\t\t\t ChartFactory.createLineChart(\"TOKYO TEMPERETURE\",\n\t\t\t \"month\",\n\t\t\t \"tempereture\",\n\t\t\t data,\n\t\t\t PlotOrientation.VERTICAL,\n\t\t\t true,\n\t\t\t false,\n\t\t\t false);\n \n\n ChartPanel cpanel = new ChartPanel(chart);\n panel1.add(cpanel);\n cardlayout.next(this);\n\t}", "public void onPlot(View view) {\r\n\t\t// Respond to the button click\r\n\t\tIntent intent = new Intent(this, PlotActivity.class);\r\n\t\tstartActivity(intent);\t\r\n\t}", "@Override\r\n public void onClick(View v) {\n Intent intent = new Intent(getActivity(), SimpleXYPlotActivity.class);\r\n startActivity(intent);\r\n }", "public void onBtnGenerateClick() {\n taskSpan2s = dataManager.load(TaskSpan2.class)\n .query(\"select t from gantt_TaskSpan2 t\")\n .view(\"taskSpan2-view\")\n .list();\n // prepare the new dataProvider\n ListDataProvider dataProvider = new ListDataProvider();\n\n // fetch the list of -selected- taskSpan\n for (TaskSpan2 taskSpan2: taskSpan2s) {\n // 1. create the list to hold the dynSegments\n List<DynSegment> dynSegments = new ArrayList<>();\n\n // 2. get the list of attached segments\n List<Segment2> segment2s = taskSpan2.getSegments();\n\n // 3. fetch the list of Segments\n for (Segment2 segment2: segment2s) {\n System.out.println(segment2.getTask() + \" \" + segment2.getStart().compareTo(Objects.requireNonNull(dateFrom.getValue())));\n // filters on the dates\n if (\n (segment2.getStart().compareTo(Objects.requireNonNull(dateFrom.getValue())) >= 0)\n &&\n (segment2.getEnd().compareTo(Objects.requireNonNull(dateTo.getValue())) <= 0)\n ) {\n // 3.a create the new dynSegment\n DynSegment dynSegment = new DynSegment(\n segment2.getColor(),\n segment2.getTask(),\n segment2.getStart(),\n segment2.getEnd());\n // 3.b add the new dynSegment to the lis\n dynSegments.add(dynSegment);\n }\n }\n\n // 4. create the dynTaskSpan\n DynTaskSpan dynTaskSpan = new DynTaskSpan(\n taskSpan2.getCategory(),\n dynSegments);\n\n // 5. adds the new dynTaskSpan to the dataProvider\n dataProvider.addItem(new SimpleDataItem(dynTaskSpan));\n }\n\n // sets the dataProvider for the chart\n chart.setDataProvider(dataProvider);\n chart.repaint();\n }", "@Override\n \tpublic void onClick(View arg0) {\n \t\ttry{\n \t\t\tSeriesSelection selectedPoint = lineGraph.getCurrentSeriesAndPoint();\n \n \t\t\tif(selectedPoint!=null)\n \t\t\t{\n \t\t\t\tString time = xAxisLabelsFinal[(int)selectedPoint.getXValue()];\n \n \t\t\t\tdouble amount=(double)selectedPoint.getValue();\n \t\t\t\t\n \t\t\t\tToast.makeText(caller.getBaseContext(), \"Crowdedness at \" + time + \": \" + amount + \"%\", Properties.TOAST_DEFAULT_DURATION).show();\n \t\t\t}\n \t\t} catch(Exception e){\n \t\t\t\n \t\t}\n \t}", "JFreeChart generateDot();", "@Override\n public void initialize(URL url, ResourceBundle rb) { \n \n XYChart.Series series = new XYChart.Series<>();\n \n \n series.setName(\"Gagnant\");\n series.getData().add(new XYChart.Data(\"Jan\", 100));\n series.getData().add(new XYChart.Data(\"Fev\", 170));\n series.getData().add(new XYChart.Data(\"Mars\", 197));\n series.getData().add(new XYChart.Data(\"Avr\", 160));\n series.getData().add(new XYChart.Data(\"Mai\", 165));\n series.getData().add(new XYChart.Data(\"Juin\", 179));\n series.getData().add(new XYChart.Data(\"Juil\", 195));\n series.getData().add(new XYChart.Data(\"Aout\", 140));\n series.getData().add(new XYChart.Data(\"Sept\", 121));\n series.getData().add(new XYChart.Data(\"Oct\", 173));\n series.getData().add(new XYChart.Data(\"Nov\", 185));\n series.getData().add(new XYChart.Data(\"Dec\", 150));\n \n XYChart.Series perdant = new XYChart.Series<>();\n perdant.setName(\"Perdant\");\n \n perdant.getData().add(new XYChart.Data(\"Jan\", 80));\n perdant.getData().add(new XYChart.Data(\"Fev\", 60));\n perdant.getData().add(new XYChart.Data(\"Mars\", 80));\n perdant.getData().add(new XYChart.Data(\"Avr\", 70));\n perdant.getData().add(new XYChart.Data(\"Mai\", 70));\n perdant.getData().add(new XYChart.Data(\"Juin\", 60));\n perdant.getData().add(new XYChart.Data(\"Juil\", 100));\n perdant.getData().add(new XYChart.Data(\"Aout\", 80));\n perdant.getData().add(new XYChart.Data(\"Sept\", 50));\n perdant.getData().add(new XYChart.Data(\"Oct\", 79));\n perdant.getData().add(new XYChart.Data(\"Nov\", 70));\n perdant.getData().add(new XYChart.Data(\"Dec\", 12));\n \n\n Tooltip tooltip = new Tooltip(\"Le nombre de gagnants ou cours des mois augmentent souvent.\");\n areaChart.getStylesheets().add(\"-fx-color:green;\");\n areaChart.getData().addAll(series, perdant);\n BarChart.getStylesheets().add(\"chart-bar series<1> bar-legend-symbol default-color<red>\");\n BarChart.getData().addAll(perdant);\n\n\n }", "public void button2Pushed(ActionEvent event)\r\n {\n GraphicsContext gc = canvas.getGraphicsContext2D();\r\n \r\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from 0,0 to lower right\r\n for (int start = 0; start <= canvas.getWidth(); start += 20)\r\n gc.strokeLine(start, canvas.getHeight()-start, canvas.getWidth(), canvas.getHeight());\r\n \r\n \r\n for (int start = 0; start <= canvas.getWidth(); start += 20)\r\n gc.strokeLine(0, 0, start, canvas.getHeight()-start);\r\n \r\n }", "private void initializeChartPanel() {\n\n Rectangle region = new Rectangle(0, 0, clip.getFrameCount(), clip.getFrameFreqSamples());\n\n //toClipCoords(region);\n region.y = clip.getFrameFreqSamples() - (region.y + region.height);\n\n final int endCol = region.x + region.width;\n final int endRow = region.y + region.height;\n\n //System.out.println(\"endCol = \" + endCol + \" endRow = \" + endRow);\n\n XYSeries xy = new XYSeries(\"data\");\n XYSeries xySpline = new XYSeries(\"spline\");\n\n // Displays the single MAX or STRONGEST Frequency for each column\n // captures every x'th element for fitting spline\n int maxItensity = 0;\n int[] rows = new int[endCol];\n int[] intensities = new int[endCol];\n\n// int SPLINEPRECISION = chartPrefJSlider2.getValue(); // 1 is highest precision; default = 40\n int SPLINEPRECISION = 40; // 1 is highest precision; default = 40\n int splineCounter = 0;\n\n for (int col = region.x; col < endCol; col++) {\n Frame fr = clip.getFrame(col);\n int strongestFreq = 0;\n int strongestFreqStrength = 0;\n for (int row = region.y; row < endRow; row++) {\n // the following is a MUCH faster equivalent to: img.setRGB(col, row, greyVal);\n //int greyVal = (int) (brightness + (contrast * Math.log1p(Math.abs(preMult * val))));\n int greyVal = (int) (0 + (625.0 * Math.log1p(Math.abs(11.2 * fr.getReal(row)))));\n greyVal = Math.min(255, Math.max(0, greyVal));\n int thisFreqStrength = (greyVal << 16) | (greyVal << 8) | (greyVal);\n\n if (thisFreqStrength > strongestFreqStrength) {\n strongestFreqStrength = thisFreqStrength;\n strongestFreq = row;\n }\n if (thisFreqStrength > maxItensity) {\n maxItensity = thisFreqStrength;\n }\n }\n rows[col] = strongestFreq;\n intensities[col] = strongestFreqStrength;\n }\n System.out.println(\"maxItensity = \" + maxItensity);\n\n // Average neighboring data values\n // Use minIntensity amoung neighbors for averaged row\n // Use threshold to exclude weak signals\n //int NUMPOINTSAVERAGED = 20;\n int NUMPOINTSAVERAGED = jSlider1.getValue(); // default = 20\n double INTENSITYTHRESHOLD = 0.95;\n int[] data = new int[endCol - NUMPOINTSAVERAGED];\n int[] dataAveraged = new int[endCol - NUMPOINTSAVERAGED];\n int[] minIntensities = new int[endCol - NUMPOINTSAVERAGED];\n for (int col = region.x; col < endCol - NUMPOINTSAVERAGED; col++) {\n int sumRows = 0;\n int minIntensity = maxItensity;\n for (int i = col; i < col + NUMPOINTSAVERAGED; i++) {\n sumRows += rows[i];\n minIntensity = java.lang.Math.min(minIntensity, intensities[i]);\n }\n data[col] = rows[col];\n dataAveraged[col] = java.lang.Math.round(sumRows / NUMPOINTSAVERAGED);\n minIntensities[col] = minIntensity;\n }\n\n for (int col = region.x; col < endCol - 2 * NUMPOINTSAVERAGED; col++) {\n splineCounter++;\n for (int row = region.y; row < endRow; row++) {\n if (row == data[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds actual data\n xy.add((double) col, (double) convertYCoordToFreq(row));\n //System.out.println(\"adding data point (\" + col + \",\" + row + \")\");\n }\n\n if (row == dataAveraged[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds averaged data\n //xy.add((double) col, (double) convertYCoordToFreq(row));\n //System.out.println(\"adding data point (\" + col + \",\" + row + \")\");\n if (splineCounter % SPLINEPRECISION == 0) {\n xySpline.add((double) (col + NUMPOINTSAVERAGED / 2), (double) convertYCoordToFreq(row));\n }\n }\n }\n }\n\n dataset.removeAllSeries();\n dataset.addSeries(xy);\n\n //XYSeriesCollection splineDataset = new XYSeriesCollection();\n dataset.addSeries(xySpline);\n\n JFreeChart chart = ChartFactory.createXYLineChart(\n //JFreeChart chart = ChartFactory.createScatterPlot(\n clip.getFileName(), \"Time (ms)\", \"Frequency (Hz)\", dataset, PlotOrientation.VERTICAL, true, true, false);\n XYPlot xyplot = (XYPlot) chart.getPlot();\n xyplot.setRenderer(new XYSplineRenderer());\n XYLineAndShapeRenderer xylineandshaperenderer = (XYLineAndShapeRenderer) xyplot.getRenderer();\n xylineandshaperenderer.setSeriesShape(0, new java.awt.Rectangle(1, 1, 1, 1));\n xylineandshaperenderer.setSeriesLinesVisible(0, false);\n xylineandshaperenderer.setSeriesShapesVisible(0, true);\n xylineandshaperenderer.setSeriesLinesVisible(1, false);\n xylineandshaperenderer.setSeriesShapesVisible(1, false);\n\n// ChartFrame frame = new ChartFrame(\"First\", chart);\n// frame.pack();\n// frame.setVisible(true);\n\n\n jCheckBox1.setEnabled(true);\n jCheckBox1.setSelected(true);\n\n jCheckBox2.setEnabled(true);\n jCheckBox2.setSelected(false);\n\n jSlider1.setEnabled(true);\n jSlider2.setEnabled(true);\n\n jTextField9.setText(clip.getFileName());\n\n chartPanel = new ChartPanel(chart);\n }", "public void button1Pushed(ActionEvent event)\r\n {\n GraphicsContext gc = canvas.getGraphicsContext2D();\r\n \r\n //clear any content out of the canvas\r\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from upper-left to lower-right of the canvas\r\n gc.strokeLine(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from upper-right to lower-left corner\r\n gc.strokeLine(canvas.getWidth(), 0, 0, canvas.getHeight());\r\n \r\n }", "@Override\n BackgroundLineChart generateLineChart() {\n\n final BackgroundLineChart lineChart;\n final NumberAxis xAxis = new NumberAxis();\n xAxis.setLabel(\"Time\");\n\n List<XYChart.Series<Number, Number>> seriesList = FXCollections.observableArrayList();\n\n for (DataPoint.Type type : DataPoint.Types.values()) {\n XYChart.Series<Number, Number> series = new XYChart.Series<>();\n series.setName(type.getName());\n seriesList.add(series);\n this.getSeriesMap().put(type, series);\n }\n\n lineChart = new BackgroundLineChart(this.captureSession, xAxis, new NumberAxis(), FXCollections.observableArrayList(seriesList));\n\n //@Source - https://stackoverflow.com/a/44957354 - Enables Toggle of Data Series by clicking on their icon in the legend\n for (Node n : lineChart.getChildrenUnmodifiable()) {\n if (n instanceof Legend) {\n Legend l = (Legend) n;\n for (Legend.LegendItem li : l.getItems()) {\n for (XYChart.Series<Number, Number> s : lineChart.getData()) {\n if (s.getName().equals(li.getText())) {\n li.getSymbol().setCursor(Cursor.HAND); // Hint user that legend symbol is clickable\n li.setText(li.getText() + \" On\");\n li.getSymbol().setOnMouseClicked(me -> {\n if (me.getButton() == MouseButton.PRIMARY) {\n s.getNode().setVisible(!s.getNode().isVisible()); // Toggle visibility of line\n\n String[] displayName = li.getText().split(\" \");\n li.setText(String.format(\"%s %s\", String.join(\" \", Arrays.copyOfRange(displayName, 0, displayName.length - 1)), (s.getNode().isVisible() ? \"On\" : \"Off\")));\n for (XYChart.Data<Number, Number> d : s.getData()) {\n if (d.getNode() != null) {\n d.getNode().setVisible(s.getNode().isVisible()); // Toggle visibility of every node in the series\n }\n }\n lineChart.redraw();\n }\n });\n break;\n }\n }\n }\n }\n }\n //---\n\n return lineChart;\n }", "JFreeChart generateBox();", "public void MakeStacked() {\n\t\tStackedButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetStackedAreaChartImage())));\n\t\tStackedButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Stacked Area Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new StackedAreaChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(StackedButton);\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\t \n\t\t for(int g = 0;g<i;g++){\n\t\t String s = String.valueOf(datas[1][g]);\n\t\t data.addValue(this.datas[2][g], this.name[g], s);\n\t\t }\n\t\t \n\t\t if(e.getSource() == button1){\n\t\t JFreeChart chart = ChartFactory.createLineChart(\"Import Volume\",\n\t\t \"Year\",\n\t\t \"Ton\",\n\t\t data,\n\t\t PlotOrientation.VERTICAL,\n\t\t true,\n\t\t false,\n\t\t false);\n\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t add(cpanel, BorderLayout.CENTER);\n\t\t setVisible(true);\n\t\t } else if(e.getSource() == button2){\n\t\t\t JFreeChart chart = ChartFactory.createBarChart(\"Import Volume\",\n \"Year\",\n \"Ton\",\n data,\n PlotOrientation.VERTICAL,\n true,\n false,\n false);\n\t\t\t ChartPanel cpanel = new ChartPanel(chart);\n\t\t\t add(cpanel, BorderLayout.CENTER);\n\t\t\t setVisible(true);\n} \n\n\t\t\n\t}", "@FXML \n\tprivate void handleSerraButtonCH0() throws Exception {\n\t\tif(serraButtonCH0.isSelected()){\n\t\t\t//draw the chart\n\t\t\tdutyFieldCH0.setDisable(true);\n\t\t\tchartDrawer.drawSerra();\n\t\t}\n\t\telse{\n\t\t\t//clear the chart\n\t\t\tdutyFieldCH0.setDisable(false);\n\t\t\tchartDrawer.clear();\n\t\t}\n\t}", "protected void plotScatterDiagram(){\n double xmax = a + 5. * gamma;\r\n double xmin = a - 5. * gamma;\r\n DatanGraphics.openWorkstation(getClass().getName(), \"\");\r\n DatanGraphics.setFormat(0., 0.);\r\n DatanGraphics.setWindowInComputingCoordinates(xmin, xmax, 0., .5);\r\n DatanGraphics.setViewportInWorldCoordinates(-.15, .9, .16, .86);\r\n DatanGraphics.setWindowInWorldCoordinates(-.414, 1., 0., 1.);\r\n DatanGraphics.setBigClippingWindow();\r\n DatanGraphics.chooseColor(2);\r\n DatanGraphics.drawFrame();\r\n DatanGraphics.drawScaleX(\"y\");\r\n DatanGraphics.drawScaleY(\"f(y)\");\r\n DatanGraphics.drawBoundary();\r\n double xpl[] = new double[2];\r\n double ypl[] = new double[2];\r\n// plot scatter diagram\r\n DatanGraphics.chooseColor(1);\r\n for(int i = 0; i < y.length; i++){\r\n xpl[0] = y[i];\r\n xpl[1] = y[i];\r\n ypl[0] = 0.;\r\n ypl[0] = .1;\r\n DatanGraphics.drawPolyline(xpl, ypl); \r\n }\r\n// draw Breit-Wigner corresponding to solution\r\n int npl = 100;\r\n xpl = new double[npl];\r\n ypl = new double[npl];\r\n double dpl = (xmax - xmin) / (double)(npl - 1);\r\n for(int i = 0; i < npl; i++){\r\n xpl[i] = xmin + (double)i * dpl;\r\n ypl[i] = breitWigner(xpl[i], x.getElement(0), x.getElement(1));\r\n }\r\n DatanGraphics.chooseColor(5);\r\n DatanGraphics.drawPolyline(xpl, ypl);\r\n// draw caption\r\n String sn = \"N = \" + nny;\r\n\t numForm.setMaximumFractionDigits(3);\r\n \t numForm.setMinimumFractionDigits(3);\r\n String sx1 = \", x_1# = \" + numForm.format(x.getElement(0));\r\n String sx2 = \", x_2# = \" + numForm.format(x.getElement(1));\r\n String sdx1 = \", &D@x_1# = \" + numForm.format(Math.sqrt(cx.getElement(0,0)));\r\n String sdx2 = \", &D@x_2# = \" + numForm.format(Math.sqrt(cx.getElement(1,1)));\r\n caption = sn + sx1 + sx2 + sdx1 + sdx2;\r\n DatanGraphics.setBigClippingWindow();\r\n DatanGraphics.chooseColor(2);\r\n DatanGraphics.drawCaption(1., caption);\r\n DatanGraphics.closeWorkstation();\r\n\r\n }", "public GraphController(GUI view){\r\n\t\tview.setGvWindowListener(new GvWindowListener(){\r\n\t\t\tpublic void buttonClicked(GraphingEvent ge){\r\n\t\t\t\tmodel = ge.getDJAI_GV();\r\n\t\t\t\tmodel.setDate(ge.getDJAI_GV().getDate());\r\n\t\t\t\tmodel.setValue(ge.getDJAI_GV().getValue());\r\n\t\t\t\tSystem.out.println(ge.getSource());\r\n\t\t\t\t\r\n\t\t\t\tData = new ArrayList<String>();\r\n\t\t\t\tData = DataSaver.dowArray_C;\r\n\t\t\t\t\r\n\t\t\t\tvalue = new double[Data.size()];\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < Data.size(); i++){\r\n\t\t\t\t\tvalue[i] = Double.parseDouble(Data.get(i).substring(10));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tParent root;\r\n\t\t\t\tStage stage = new Stage();\r\n\t\t\t\tstage.setTitle(\"Graph Data\");\r\n\t\t\t\t\r\n\t\t\t\tfinal CategoryAxis xAxis = new CategoryAxis();\r\n\t\t\t final NumberAxis yAxis = new NumberAxis();\r\n\t\t\t xAxis.setLabel(\"Number of Month\");\r\n\t\t\t final LineChart<String, Number> lineChart = new LineChart<String, Number>(\r\n\t\t\t xAxis, yAxis);\t\t \r\n\t\t\t xAxis.setLabel(\"Date\");\r\n\t\t\t xAxis.setTickMarkVisible(false);\r\n\t\t\t \r\n\t\t\t yAxis.setLabel(\"DJAI Value\");\r\n\t\t\t yAxis.setAutoRanging(false);\r\n\t\t\t yAxis.setTickMarkVisible(false);\r\n\t\t\t yAxis.setUpperBound(20000);\r\n\t\t\t yAxis.setLowerBound(6000);\r\n\t\t\t yAxis.setTickUnit(2000);\r\n\t\t\t yAxis.setMinorTickCount(14);\r\n\t\t\t XYChart.Series<String, Number> series = new XYChart.Series<String, Number>();\r\n\t\t\t series.setName(\"DJAI Chart \");\r\n\t\t\t\r\n\t\t\t for(int i = 0; i < Data.size(); i++){\r\n\t\t\t \tseries.getData().add(new XYChart.Data<String, Number>(Data.get(i).substring(0, 10),\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t value[i]));\r\n\t\t\t }\r\n\t\t\t lineChart.setCreateSymbols(false);\r\n\t\t\t lineChart.getData().add(series);\r\n\t\t\t\tlineChart.isResizable();\r\n\t\t\t Scene scene = new Scene(lineChart,14000,600);\r\n\t\t\t stage.setScene(scene);\r\n\t\t\t\tstage.show();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public XYSeries getXYSeries(String serie_name){ \n XYSeries serie = new XYSeries(serie_name); \n Point2D[] points_bezier = getPoint2DArray(); \n for(int j = 0 ; j < points_bezier.length; j++){ \n \n serie.add(points_bezier[j].getX(),points_bezier[j].getY()); \n } \n return serie; \n}", "@Override\n public void onValueSelected(Entry e, int dataSetIndex, Highlight h) {\n if (e == null)\n return;\n\n dataset_line.setDrawValues(true);\n dataset_line2.setDrawValues(true);\n PlaceholderFragment.toastLineChart(getContext(),arrayListKonsum.get(e.getXIndex()));\n //Toast.makeText(getActivity(), arrayListKonsum.get(e.getXIndex()), Toast.LENGTH_SHORT).show();\n }", "private void initX_ValuesControl(){\n if(xValuesPanel == null)\n xValuesPanel = new X_ValuesInCurveControlPanel(this,this);\n if(!useCustomX_Values)\n xValuesPanel.useDefaultX_Values();\n else\n xValuesPanel.setX_Values(function);\n xValuesPanel.pack();\n xValuesPanel.setVisible(true);\n }", "public void onClick(View v) {\n\t \t\t\tSeriesSelection seriesSelection = mChartView.getCurrentSeriesAndPoint();\n\t \t\t\tif (seriesSelection == null) {\n\t \t\t\t\tToast.makeText(XYChartActivity.this, \"No chart element\", Toast.LENGTH_SHORT).show();\n\t \t\t\t} else {\n\t \t\t\t\t// display information of the clicked point\n\t \t\t\t\tToast.makeText(\n\t \t\t\t\t\t\tXYChartActivity.this,\n\t \t\t\t\t\t\t\"Chart element in series index \" + seriesSelection.getSeriesIndex()\n\t \t\t\t\t\t\t+ \" data point index \" + seriesSelection.getPointIndex() + \" was clicked\"\n\t \t\t\t\t\t\t+ \" closest point value X=\" + seriesSelection.getXValue() + \", Y=\"\n\t \t\t\t\t\t\t+ seriesSelection.getValue(), Toast.LENGTH_SHORT).show();\n\t \t\t\t}\n\t \t\t}", "public void chart() {\r\n setLayout(new FlowLayout());\r\n String[] testNumbers = {\"LINEAR SEARCH\", \"TEST 1\", \"TEST 2\", \"TEST 3\", \"TEST 4\", \"TEST 5\", \"TEST 6\", \"TEST 7\", \"TEST 8\", \"TEST 9\", \"TEST 10\", \"AVERAGE\", \"STANDARD DEV.\"};\r\n Object[][] testResult = {{\"500\", lin[0][0], lin[0][1], lin[0][2], lin[0][3], lin[0][4], lin[0][5], lin[0][6], lin[0][7], lin[0][8], lin[0][0], linAvAndDev[0][0], linAvAndDev[0][1]},\r\n {\"10,000\", lin[1][0], lin[1][1], lin[1][2], lin[1][3], lin[1][4], lin[1][5], lin[1][6], lin[1][7], lin[1][8], lin[1][9], linAvAndDev[1][0], linAvAndDev[1][1]},\r\n {\"100,000\", lin[2][0], lin[2][1], lin[2][2], lin[2][3], lin[2][4], lin[2][5], lin[2][6], lin[2][7], lin[2][8], lin[2][9], linAvAndDev[2][0], linAvAndDev[2][1]},\r\n {\"1,000,000\", lin[3][0], lin[3][1], lin[3][2], lin[3][3], lin[3][4], lin[3][5], lin[3][6], lin[3][7], lin[3][8], lin[3][9], linAvAndDev[3][0], linAvAndDev[3][1]},\r\n {\"5,000,000\", lin[4][0], lin[4][1], lin[4][2], lin[4][3], lin[4][4], lin[4][5], lin[4][6], lin[4][7], lin[4][8], lin[4][9], linAvAndDev[4][0], linAvAndDev[4][1]},\r\n {\"7,000,000\", lin[5][0], lin[5][1], lin[5][2], lin[5][3], lin[5][4], lin[5][5], lin[5][6], lin[5][7], lin[5][8], lin[5][9], linAvAndDev[5][0], linAvAndDev[5][1]},\r\n {\"10,000,000\", lin[6][0], lin[6][1], lin[6][2], lin[6][3], lin[6][4], lin[6][5], lin[6][6], lin[6][7], lin[6][8], lin[6][9], linAvAndDev[6][0], linAvAndDev[6][1]},\r\n {\"BINARY SEARCH\", \"TEST 1\", \"TEST 2\", \"TEST 3\", \"TEST 4\", \"TEST 5\", \"TEST 6\", \"TEST 7\", \"TEST 8\", \"TEST 9\", \"TEST 10\", \"AVERAGE\", \"STANDARD DEV.\"},\r\n {\"500\", bin[0][0], bin[0][1], bin[0][2], bin[0][3], bin[0][4], bin[0][5], bin[0][6], bin[0][7], bin[0][8], bin[0][9], linAvAndDev[7][0], linAvAndDev[7][1]},\r\n {\"10,000\", bin[1][0], bin[1][1], bin[1][2], bin[1][3], bin[1][4], bin[1][5], bin[1][6], bin[1][7], bin[1][8], bin[1][9], linAvAndDev[8][0], linAvAndDev[8][1]},\r\n {\"100,000\", bin[2][0], bin[2][1], bin[2][2], bin[2][3], bin[2][4], bin[2][5], bin[2][6], bin[2][7], bin[2][8], bin[2][9], linAvAndDev[9][0], linAvAndDev[9][1]},\r\n {\"1,000,000\", bin[3][0], bin[3][1], bin[3][2], bin[3][3], bin[3][4], bin[3][5], bin[3][6], bin[3][7], bin[3][8], bin[3][9], linAvAndDev[10][0], linAvAndDev[10][1]},\r\n {\"5,000,000\", bin[4][0], bin[4][1], bin[4][2], bin[4][3], bin[4][4], bin[4][5], bin[4][6], bin[4][7], bin[4][8], bin[4][9], linAvAndDev[11][0], linAvAndDev[11][1]},\r\n {\"7,000,000\", bin[5][0], bin[5][1], bin[5][2], bin[5][3], bin[5][4], bin[5][5], bin[5][6], bin[5][7], bin[5][8], bin[5][9], linAvAndDev[12][0], linAvAndDev[12][1]},\r\n {\"10,000,000\", bin[6][0], bin[6][1], bin[6][2], bin[6][3], bin[6][4], bin[6][5], bin[6][6], bin[6][7], bin[6][8], bin[6][9], linAvAndDev[13][0], linAvAndDev[13][1]}};\r\n chart = new JTable(testResult, testNumbers);\r\n chart.setPreferredScrollableViewportSize(new Dimension(1500, 500)); // SETS SIZE OF CHART.\r\n chart.setFillsViewportHeight(true);\r\n JScrollPane scrollPane = new JScrollPane(chart);\r\n add(scrollPane);\r\n }", "@FXML \n\tprivate void handleTriButtonCH0() throws Exception {\n\t\tif(triButtonCH0.isSelected()){\n\t\t\t//draw the chart\n\t\t\tdutyFieldCH0.setDisable(true);\n\t\t\tchartDrawer.drawTri();\n\t\t}\n\t\telse{\n\t\t\t//clear the chart\n\t\t\tdutyFieldCH0.setDisable(false);\n\t\t\tchartDrawer.clear();\n\t\t}\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n panel.getChartPanel().restoreAutoBounds();\n }", "@FXML\n public void setGraph(){\n /*\n series.getData().clear();\n for(double x = -400; x <= 400; x += 1)\n series.getData().add(new XYChart.Data<Number,Number> (x, x));\n\n graph.getData().add(series);\n */\n System.out.println(\"vjksdl\");\n }", "private void updateChartPanel() {\n\n Rectangle region = new Rectangle(0, 0, clip.getFrameCount(), clip.getFrameFreqSamples());\n\n //toClipCoords(region);\n region.y = clip.getFrameFreqSamples() - (region.y + region.height);\n\n final int endCol = region.x + region.width;\n final int endRow = region.y + region.height;\n\n //System.out.println(\"endCol = \" + endCol + \" endRow = \" + endRow);\n\n XYSeries xy = new XYSeries(\"data\");\n XYSeries xySpline = new XYSeries(\"spline\");\n\n // Displays the single MAX or STRONGEST Frequency for each column\n // captures every x'th element for fitting spline\n int maxItensity = 0;\n int[] rows = new int[endCol];\n int[] intensities = new int[endCol];\n\n int SPLINEPRECISION = jSlider2.getValue(); // 1 is highest precision; default = 40\n// int SPLINEPRECISION = 40; // 1 is highest precision; default = 40\n int splineCounter = 0;\n\n for (int col = region.x; col < endCol; col++) {\n Frame fr = clip.getFrame(col);\n int strongestFreq = 0;\n int strongestFreqStrength = 0;\n for (int row = region.y; row < endRow; row++) {\n // the following is a MUCH faster equivalent to: img.setRGB(col, row, greyVal);\n //int greyVal = (int) (brightness + (contrast * Math.log1p(Math.abs(preMult * val))));\n int greyVal = (int) (0 + (625.0 * Math.log1p(Math.abs(11.2 * fr.getReal(row)))));\n greyVal = Math.min(255, Math.max(0, greyVal));\n int thisFreqStrength = (greyVal << 16) | (greyVal << 8) | (greyVal);\n\n if (thisFreqStrength > strongestFreqStrength) {\n strongestFreqStrength = thisFreqStrength;\n strongestFreq = row;\n }\n if (thisFreqStrength > maxItensity) {\n maxItensity = thisFreqStrength;\n }\n }\n rows[col] = strongestFreq;\n intensities[col] = strongestFreqStrength;\n }\n //System.out.println(\"maxItensity = \" + maxItensity);\n\n // Average neighboring data values\n // Use minIntensity amoung neighbors for averaged row\n // Use threshold to exclude weak signals\n //int NUMPOINTSAVERAGED = 20;\n int NUMPOINTSAVERAGED = jSlider1.getValue(); // default = 20\n double INTENSITYTHRESHOLD = 0.95;\n int[] data = new int[endCol - NUMPOINTSAVERAGED];\n int[] dataAveraged = new int[endCol - NUMPOINTSAVERAGED];\n int[] minIntensities = new int[endCol - NUMPOINTSAVERAGED];\n for (int col = region.x; col < endCol - NUMPOINTSAVERAGED; col++) {\n int sumRows = 0;\n int minIntensity = maxItensity;\n for (int i = col; i < col + NUMPOINTSAVERAGED; i++) {\n sumRows += rows[i];\n minIntensity = java.lang.Math.min(minIntensity, intensities[i]);\n }\n data[col] = rows[col];\n dataAveraged[col] = java.lang.Math.round(sumRows / NUMPOINTSAVERAGED);\n minIntensities[col] = minIntensity;\n }\n\n for (int col = region.x; col < endCol - 2 * NUMPOINTSAVERAGED; col++) {\n splineCounter++;\n for (int row = region.y; row < endRow; row++) {\n if (row == data[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds actual data\n xy.add((double) col, calibrate((double) convertYCoordToFreq(row)));\n System.out.println(\"adding data point (\" + col + \",\" + calibrate((double) convertYCoordToFreq(row)) + \")\");\n }\n if (row == dataAveraged[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds averaged data\n //xy.add((double) col, (double) convertYCoordToFreq(row));\n //System.out.println(\"adding data point (\" + col + \",\" + row + \")\");\n if (splineCounter % SPLINEPRECISION == 0) {\n xySpline.add((double) (col + NUMPOINTSAVERAGED / 2), calibrate((double) convertYCoordToFreq(row)));\n }\n }\n }\n }\n //replace Data with new series\n dataset.removeSeries(1);\n dataset.removeSeries(0);\n dataset.addSeries(xy);\n dataset.addSeries(xySpline);\n\n XYPlot xyplot = (XYPlot) chartPanel.getChart().getPlot();\n XYLineAndShapeRenderer xylineandshaperenderer = (XYLineAndShapeRenderer) xyplot.getRenderer();\n xylineandshaperenderer.setSeriesShapesVisible(0, jCheckBox1.isSelected());\n xylineandshaperenderer.setSeriesLinesVisible(1, jCheckBox2.isSelected());\n\n if (jCheckBox3.isSelected()) {\n xyplot.getRangeAxis().setLabel(jTextField8.getText() + \" (\" + jTextField3.getText() + \")\");\n } else {\n xyplot.getRangeAxis().setLabel(\"Frequency (Hz)\");\n }\n\n // Show Crosshairs\n chartPanel.setVerticalAxisTrace(true);\n\n chartPanel.repaint();\n }", "@FXML\n\tprivate void handleSenButtonCH0(){\n\t\tif(senButtonCH0.isSelected()){\n\t\t\t//draw the chart\n\t\t\tchartDrawer.drawSin();\n\t\t\tdutyFieldCH0.setDisable(false);\n\t\t\tdutyLabelCH0.setText(\"Fase\");\n\t\t\tdutyUnitLabelCH0.setText(\"Grau\");\n\t\t}\n\t\telse{\n\t\t\tchartDrawer.clear();\n\t\t}\n\t}", "private void btn_stockMouseClicked(java.awt.event.MouseEvent evt) {\n \n }", "public GUIVerbrauchsdiagramm(String title, EnergyData energyData) {\n super(title);\n this.energyData = energyData;\n setExtendedState(JFrame.MAXIMIZED_BOTH);\n ChartPanel chartPanel = (ChartPanel) createPanel(energyData);\n\n buttonGroup.add(verbrauchDiagramm);\n buttonGroup.add(zaehlerDiagramm);\n pRadiobuttons.add(verbrauchDiagramm);\n pRadiobuttons.add(zaehlerDiagramm);\n pRadiobuttons.setBorder(new EmptyBorder(0, 20, 0, 0));\n verbrauchDiagramm.setSelected(true);\n tDate.setForeground(Color.gray);\n\n pSkipDay.setLayout(new GridLayout(1, 7, 5, 0));\n pSkipDay.add(bBackwardsM);\n pSkipDay.add(bBackwardsW);\n pSkipDay.add(bBackwards);\n pSkipDay.add(tDate);\n pSkipDay.add(bForwards);\n pSkipDay.add(bForwardsW);\n pSkipDay.add(bForwardsM);\n\n pDate.add(lCurrentDate);\n pDate.add(lEmpty2);\n pDate.add(pSkipDay);\n\n\n pCsv.add(bExportCSV);\n pCsv.add(lEmpty);\n pCsv.add(bExportJSON);\n\n\n pHeader.add(pRadiobuttons);\n pHeader.add(pDate);\n pHeader.add(pCsv);\n\n this.add(chartPanel, BorderLayout.CENTER);\n this.add(pHeader, BorderLayout.NORTH);\n\n //Actionlistener\n ActionListener actionListenerDiagramm = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (verbrauchDiagramm.isSelected()) {\n System.out.println(\"Verbrauchsdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetVerbrauchsdiagramm(energyData);\n chart.setTitle(\"Stromzählerübersicht\");\n }\n if (zaehlerDiagramm.isSelected()) {\n System.out.println(\"Zählerdiagramm selected\");\n dataset.removeAllSeries();\n createDatasetZaehlerdiagramm(energyData);\n chart.setTitle(\"Zählerstand\");\n }\n }\n };\n\n bExportCSV.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n try {\n JFileChooser fileChooser = new JFileChooser(\"./CSV\");\n fileChooser.setDialogTitle(\"CSV-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.csv\",\"csv\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".csv\")){\n path = path +\".csv\";\n }\n FileHandler.writeCSV(map,path);\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden in ein CSV-File exportiert\");\n }\n });\n\n bExportJSON.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n TreeMap<Long, csvData> map = FileHandler.getFileHandler().getCSVData();\n FileHandler.saveJSON(map);\n\n try {\n JFileChooser fileChooser = new JFileChooser(\"./JSON\");\n fileChooser.setDialogTitle(\"JSON-Datei speichern\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.json\",\"json\"));\n\n int userSelection = fileChooser.showSaveDialog(getFrame());\n\n if (userSelection == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n String path = fileToSave.getPath();\n if (!path.contains(\".json\")){\n path = path +\".json\";\n }\n FileWriter fileWriter = new FileWriter(path);\n fileWriter.write(FileHandler.saveJSON(map));\n fileWriter.flush();\n fileWriter.close();\n System.out.println(\"Save as file: \" + fileToSave.getAbsolutePath());\n }\n\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n lEmpty.setText(\"Daten wurden zum JSON exportiert \\n\" + \"https://api.npoint.io/0dc854da1619aca3be45\");\n }\n });\n\n bForwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, true);\n }\n });\n\n bBackwards.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(86400000, false);\n }\n });\n bBackwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, false);\n }\n });\n bForwardsW.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(604800000, true);\n }\n });\n bBackwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, false);\n }\n });\n bForwardsM.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeDate(2629800000L, true);\n }\n });\n\n /*chart.getXYPlot().addChangeListener(new PlotChangeListener() {\n @Override\n public void plotChanged(PlotChangeEvent plotChangeEvent) {\n XYPlot plot = plotChangeEvent.getPlot().getChart().getXYPlot();\n PlotChangeListener plotChangeListener = this;\n\n plot.removeChangeListener(plotChangeListener);\n long upperBound = (long) plot.getDomainAxis().getUpperBound();\n long lowerBound = (long) plot.getDomainAxis().getLowerBound();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(upperBound / 900000 * 900000);\n upperBound = calendar.getTimeInMillis();\n\n calendar.setTimeInMillis(lowerBound / 900000 * 900000);\n lowerBound = calendar.getTimeInMillis();\n System.out.println(new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\").format(new Date(lowerBound)));\n\n System.out.println(getEnergyData().getSdatData().containsKey(lowerBound));\n\n double highestValue = 0;\n if (getEnergyData().getSdatData().containsKey(lowerBound)) {\n for (long i = lowerBound; i < upperBound; i = i + 86400000) {\n if (getEnergyData().getSdatData().get(i).getRelativBezug() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getRelativBezug();\n\n }\n if (getEnergyData().getSdatData().get(i).getRelativeEinspeisung() > highestValue) {\n highestValue = getEnergyData().getSdatData().get(i).getZaehlerstandEinspeisung();\n }\n }\n\n System.out.println(highestValue);\n System.out.println(highestValue + 1);\n\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(highestValue + 1);\n }else {\n plot.getRangeAxis().setLowerBound(0);\n plot.getRangeAxis().setUpperBound(plot.getRangeAxis().getUpperBound());\n }\n plot.addChangeListener(plotChangeListener);\n\n }\n\n });\n */\n\n tDate.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent e) {\n checkDate(e);\n }\n\n @Override\n public void keyPressed(KeyEvent e) {\n\n }\n\n @Override\n public void keyReleased(KeyEvent e) {\n\n }\n });\n\n tDate.addFocusListener(new FocusListener() {\n @Override\n public void focusGained(FocusEvent e) {\n if (tDate.getText().equals(\"Datum:\")) {\n tDate.setText(\"\");\n tDate.setForeground(Color.BLACK);\n }\n }\n\n @Override\n public void focusLost(FocusEvent e) {\n if (tDate.getText().isEmpty()) {\n tDate.setForeground(Color.GRAY);\n tDate.setText(\"Datum:\");\n }\n }\n });\n\n\n verbrauchDiagramm.addActionListener(actionListenerDiagramm);\n zaehlerDiagramm.addActionListener(actionListenerDiagramm);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawType = 2;\n\t\t\t}", "private void constructChartPanel() {\n chartPanel = new JPanel();\n chartPanel.setBorder(BorderFactory.createTitledBorder(\"Price Chart\"));\n chartPanel.setPreferredSize(relativeSize(0.4f, 0.35f));\n \n displayChartButton = new JButton(\"Click to Display Price Chart\");\n displayChartButton.setEnabled(false);\n displayChartButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n JPanel cPanel = chart.getChartPanel();\n chartPanel.removeAll();\n chartPanel.add(cPanel);\n cPanel.setPreferredSize(relativeSize(0.4f, 0.35f));\n \n pack();\n repaint();\n }\n });\n \n chartPanel.add(displayChartButton);\n }", "@FXML \n\tprivate void handleSerraInvButtonCH0() throws Exception {\n\t\tif(serraInvButtonCH0.isSelected()){\n\t\t\t//draw the chart\n\t\t\tdutyFieldCH0.setDisable(true);\n\t\t\tchartDrawer.drawInv();\n\t\t}\n\t\telse{\n\t\t\t//clear the chart\n\t\t\tdutyFieldCH0.setDisable(false);\n\t\t\tchartDrawer.clear();\n\t\t}\n\t}", "@Override\n public final void initButtons(int x, int y, int addy){\n \n String data = s_datapath;\n addButton(data + \"SM_NeuesSpiel\" + s_typ, x, y, 1);\n addButton(data + \"OM_SpielSpeichern\" + s_typ, x, y + addy, 2);\n addButton(data + \"SM_SpielLaden\" + s_typ, x, y + addy * 2, 3);\n //addButton(data,x, y + addy*3, 4);\n addButton(data + \"Menu_Element_Blank\" + s_typ, x,/*715*/ y + addy * 4, 5);\n addButton(data + \"SM_SpielBeenden\" + s_typ, x,/*845*/ y + addy * 5, 6);\n }", "public Chart(double[][] result, double[][] observed){\n //Create a new Frame object\n final Frame f1 = new Frame(\"Model Fit\");\n\t//Set the Frame object size\t\n\tf1.setSize(600,400);\n //Add a window listener to the Frame to close it\n\tf1.addWindowListener(new WindowAdapter() {\n @Override\n\t\tpublic void windowClosing(WindowEvent we) {\n\t\t\tf1.dispose();\n\t\t}\n\t});\n \n //add in the code to create the chart\n //create a data object to hold the XY data\n DefaultXYDataset data = new DefaultXYDataset();\n //cycle through the origins\n for (int i = 0; i < observed.length; i++) {\n //create a two dimensional array to hold the observed and result\n double dataArray[][] = new double[2][observed[i].length];\n //put the observed data in element 0\n dataArray[0]=observed[i];\n //put the result data in element 1\n dataArray[1]=result[i];\n //add the data series with a unique name\n data.addSeries(\"Origin \"+i, dataArray);\n }\n\t//Create the chart with the correct title and axis names and data etc.\n\tJFreeChart chart = ChartFactory.createScatterPlot(\"Observed vs. Results\", \n\t\t\"Observed\", // x axis label\n\t\t\"Results\", // y axis label\n\t\tdata, // data\n\t\tPlotOrientation.VERTICAL, // orientation\n\t\ttrue, // legend\n\t\ttrue, // tooltips\n\t\tfalse // URLs\n\t);\n\t//get the plot area and format it to the desired colours\n\tXYPlot plot = (XYPlot) chart.getPlot();\n\tplot.setBackgroundPaint(Color.white);\n\tplot.setDomainGridlinePaint(Color.darkGray);\n\tplot.setDomainGridlinesVisible(true);\n\tplot.setRangeGridlinePaint(Color.black);\n\t\n\t// We're going to add some regression stuff here shortly.\n double[] coeffs = Regression.getOLSRegression(createTwoDArray(result, observed));\n\tLineFunction2D linefunction2d = new LineFunction2D(coeffs[0], coeffs[1]);\n\tXYDataset series2 = DatasetUtilities.sampleFunction2D(linefunction2d, 10, 50, 5, \"Linear Regression Line\");\n\tplot.setDataset(2, series2); \n\tXYLineAndShapeRenderer lineDrawer = new XYLineAndShapeRenderer(true, false);\n\tlineDrawer.setSeriesPaint(0, Color.BLACK);\n\tplot.setRenderer(2, lineDrawer);\n\t\n //create a chart panel to render to the screnn\n\tChartPanel chartPanel = new ChartPanel(chart);\n //add the chart panel to the frame\n\tf1.add(chartPanel);\n //set the frame to be visible\n\tf1.setVisible(true);\n }", "public void onDisplay(Bundle savedInstanceState, Number[] stockValues)\r\n {\n plot = (XYPlot) findViewById(R.id.mySimpleXYPlot);\r\n \r\n // Turn the above arrays into XYSeries':\r\n XYSeries series1 = new SimpleXYSeries(\r\n Arrays.asList(stockValues), // SimpleXYSeries takes a List so turn our array into a List\r\n SimpleXYSeries.ArrayFormat.Y_VALS_ONLY, // Y_VALS_ONLY means use the element index as the x value\r\n \"Series1\"); // Set the display title of the series\r\n\r\n // Create a formatter to use for drawing a series using LineAndPointRenderer\r\n // and configure it from xml:\r\n //LineAndPointFormatter series1Format = new LineAndPointFormatter();\r\n //series1Format.setPointLabelFormatter(new PointLabelFormatter());\r\n //series1Format.configure(getApplicationContext(),\r\n //R.xml.line_point_formatter_with_plf1);\r\n\r\n LineAndPointFormatter series1Format = new LineAndPointFormatter(\r\n \t\tColor.rgb(0, 200, 0),\r\n \t\tColor.rgb(0, 100, 0),\r\n \t\tnull,\r\n \t\tnew PointLabelFormatter(Color.WHITE));\r\n \r\n // add a new series' to the xyplot:\r\n plot.addSeries(series1, series1Format);\r\n\r\n\r\n // reduce the number of range labels\r\n plot.setTicksPerRangeLabel(3);\r\n plot.getGraphWidget().setDomainLabelOrientation(-45);\r\n\r\n }", "public void keyPressed() {\n if (key == CODED) {\n if (keyCode == RETURN) {\n println(\"Enter pressed\");\n }\n }\n if (key=='1') { \n currentSample =1;\n }\n if (key=='2') { \n currentSample =2;\n }\n if (key=='3') { \n currentSample =3;\n }\n if (key=='4') { \n currentSample =4;\n }\n if (key=='5') { \n currentSample =5;\n }\n if (key=='6') { \n currentSample =6;\n }\n if (key=='7') { \n currentSample =7;\n } \n if (key=='8') { \n currentSample =8;\n } \n if (key=='s') { \n Start(0);\n }\n if (key=='x') { \n totSamples[currentSample-1] = 0;\n list_Samples[currentSample -1].clear();\n String name = \"sample_\" + currentSample;\n plot2.removeLayer(name);\n \n plot2.addLayer(name, points_C);\n plot2.getLayer(name).setLineColor(plotColor[currentSample-1]);\n plot2.getLayer(name).setLineWidth(1.5f);\n\n}\n if (key=='l') { \n // Change the log scale\n logScale = !logScale;\n\n if (logScale) {\n plot2.setLogScale(\"y\");\n plot2.getYAxis().setAxisLabelText(\"log y\");\n } else {\n plot2.setLogScale(\"\");\n plot2.getYAxis().setAxisLabelText(\"y\");\n }\n }\n}", "private void peelOffCurves(){\n graphWindow = new GraphWindow(this);\n clearPlot(true);\n graphWindow.setVisible(true);\n }", "public void insertPriceChart(Vector priceChart) {\n try {\n chart = new PriceChart();\n chart.setSecurities(priceChart);\n java.awt.EventQueue.invokeLater(new Runnable() {\n\n public void run() {\n chartPanel.removeAll();\n chartPanel.add(displayChartButton);\n displayChartButton.setEnabled(true);\n chartPanel.repaint();\n }\n });\n /*\n Runnable doUpdate = new Runnable() {\n public void run() {\n chartPanel.removeAll();\n chartPanel.add(displayChartButton);\n displayChartButton.setEnabled(true);\n }\n };\n SwingUtilities.invokeAndWait(doUpdate);\n * */\n }catch(Exception e) {\n e.printStackTrace();\n }\n }", "public TestPlotter() {\n\t\tplot = new Plot2D(title, xLabel, yLabel, true);\n\t\tplot.addChartMouseListener(new PlotListener());\n\t\tplot.addDismissListener(new AL());\n\t\tplot.setDefaultCloseOperation(plotter.EXIT_ON_CLOSE);\n\t\t\n\t}", "public void drawGraph(){\n this.post(new Runnable(){\n @Override\n public void run(){\n removeAllSeries();\n addSeries(xySeries);\n addSeries(currentPoint);\n //addSeries(currentPoint);\n }\n });\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawType = 1;\n\t\t\t}", "private void addButton() {\n // do not show warning messages in IMR gui bean. this is needed\n // so that warning messages for site parameters are not shown when Add graph is clicked\n imrGuiBean.showWarningMessages(false);\n try{\n calc = new HazardCurveCalculator();\n }catch(Exception e){\n e.printStackTrace();\n }\n // check if progress bar is desired and set it up if so\n if(this.progressCheckBox.isSelected()) {\n Thread t = new Thread(this);\n t.start();\n\n timer = new Timer(200, new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n try{\n if(calc.getCurrRuptures()!=-1){\n progressClass.updateProgress(numSA_PeriodValDone,numSA_PeriodVals);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n if(isIndividualCurves) {\n drawGraph();\n //isIndividualCurves = false;\n }\n if (hazCalcDone) {\n timer.stop();\n progressClass.dispose();\n drawGraph();\n }\n }\n });\n\n // timer for disaggregation progress bar\n /*disaggTimer = new Timer(500, new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n if(disaggCalc.getCurrRuptures()!=-1)\n disaggProgressClass.updateProgress(disaggCalc.getCurrRuptures(), disaggCalc.getTotRuptures());\n if (disaggCalc.done()) {\n // Toolkit.getDefaultToolkit().beep();\n disaggTimer.stop();\n disaggProgressClass.dispose();\n }\n }\n });*/\n }\n else {\n this.computeHazardCurve();\n this.drawGraph();\n }\n }", "private JPanel createChartPanel(XYSeriesCollection li) {\n\n String chartTitle = \" Movement Chart\";\n String xAxisLabel = \"Matrix Size\";\n String yAxisLabel = \"time in ms\";\n\n XYSeriesCollection dataset = li;\n // System.out.println(\"tesst count \" + dataset.getSeriesCount());\n\n //XYDataset dataset = createDataset(li);\n JFreeChart chart = ChartFactory.createXYLineChart(chartTitle, xAxisLabel, yAxisLabel, dataset);\n XYPlot plot = chart.getXYPlot();\n XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();\n plot.setRenderer(renderer);\n\n return new ChartPanel(chart);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n panelChart = new javax.swing.JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jButton1.setText(\"Balansas\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n panelChart.setBackground(new java.awt.Color(255, 255, 255));\n panelChart.setLayout(new java.awt.BorderLayout());\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelChart, javax.swing.GroupLayout.DEFAULT_SIZE, 686, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGap(306, 306, 306)\n .addComponent(jButton1)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(panelChart, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addContainerGap())\n );\n\n pack();\n }", "public void draw()\n {\n super.draw();\n k = 0;\n traceOK = true;\n\n // Initialize n, x0, and xn in the control panel.\n nText.setText(\" \");\n x0Text.setText(\" \");\n xnText.setText(\" \");\n\n PlotFunction plotFunction = getSelectedPlotFunction();\n\n // Create the fixed-point iteration root finder.\n finder = new FixedPointRootFinder((Function) plotFunction.getFunction());\n }", "private void setDataLineChart() {\n\t\t\n\t\tchartLine.setTitle(\"Evolution du Solde\");\n\t\tchartLine.getData().clear();\n\t\t\n\t\tXYChart.Series series = new XYChart.Series();\n\t\tseries.getData().clear();\n\t\tseries.setName(\"Evolution du solde\");\n\t\t\n\t\tdouble solde = bal.getAmount();\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR);\n\t\tint currentMonth = Calendar.getInstance().get(Calendar.MONTH);\n\t\tint currentDay = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);\n\t\t\n\t\t\n\t\t// Create a calendar object and set year and month\n\t\tCalendar mycal = new GregorianCalendar(currentYear, currentMonth,\n\t\t\t\tcurrentDay);\n\t\t\n\t\t// Get the number of days in that month\n\t\tint daysInMonth = mycal.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\n\t\tif (!bal.getTransactions().isEmpty()) {\n\t\t\tfor (IOTransactionLogic transaction : bal.getTransactions()\n\t\t\t\t\t.get(currentYear)[currentMonth]) {\n\t\t\t\tsolde -= transaction.getAmount();\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < currentDay; ++i) {\n\t\t\tif (!bal.getTransactions().isEmpty()) {\n\t\t\t\tfor (IOTransactionLogic transaction : bal.getTransactions()\n\t\t\t\t\t\t.get(currentYear)[currentMonth]) {\n\t\t\t\t\tjava.sql.Date dat = transaction.getDate();\n\t\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\t\tcal.setTime(dat);\n\t\t\t\t\tif (cal.get(Calendar.DAY_OF_MONTH) - 1 == i) {\n\t\t\t\t\t\tsolde += transaction.getAmount();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tseries.getData()\n\t\t\t\t\t.add(new XYChart.Data(String.valueOf(i + 1), solde));\n\t\t}\n\t\t\n\t\tchartLine.getData().addAll(series);\n\t\tchartLine.setLegendVisible(false);\n\t}", "public void onModuleLoad() {\n\n Chart chart = new Chart()\n .setType(Series.Type.SPLINE)\n .setChartTitleText(\"Temperaturen\")\n .setMarginRight(10);\n\t\n\tSeries series = chart.createSeries()\n\t.setName(\"°C in Palma\")\n\t.setPoints(new Number[] { 22.4, 25.6, 20.5, 19.0, 17.0, 18.0, 19.0, 18.3 });\n\tchart.addSeries(series);\n\n\tSeries series2 = chart.createSeries()\n\t.setName(\"°C in Leipzig\")\n\t.setPoints(new Number[] { 13.5, 14.3, 16.4, 9.9, 12.5, 13.0, 15.9, 20.0} );\n\tchart.addSeries(series2);\n\t\n\tRootPanel.get().add(chart);\n\t\n\t}", "public void plotAction() {\n final PlotProperties props = new PlotProperties();\n addPlotRegister(props);\n\n final PlotManager pm = this.manager.getPlotManager();\n pm.showPlotUI(props);\n }", "@Override\n\tpublic void callButton(TrafficSignal TS) {\n\t\t\n\t}", "public void setAutoRange() {\n this.customAxis=false;\n addGraphPanel();\n }", "public void plot(){\n\t\tplot = true;\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n pnlChart = new javax.swing.JPanel();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n pnlChart.setBackground(new java.awt.Color(0, 0, 0));\n pnlChart.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n pnlChart.setForeground(new java.awt.Color(255, 255, 255));\n pnlChart.setAlignmentX(1.5F);\n pnlChart.setAlignmentY(0.35F);\n pnlChart.setMaximumSize(new java.awt.Dimension(1000, 1000));\n pnlChart.setMinimumSize(new java.awt.Dimension(1, 1));\n pnlChart.setPreferredSize(new java.awt.Dimension(1, 1));\n pnlChart.setLayout(new java.awt.BorderLayout());\n\n jButton2.setText(\"jButton2\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n pnlChart.add(jButton2, java.awt.BorderLayout.PAGE_START);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(pnlChart, javax.swing.GroupLayout.PREFERRED_SIZE, 631, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 993, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(pnlChart, javax.swing.GroupLayout.PREFERRED_SIZE, 595, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 801, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void initializeChart(String subtitle) {\n JFreeChart jfreechart = ChartFactory.createXYLineChart(\n subtitle, \"X\", \"Y\", this.dataset.getXYDataset(),\n PlotOrientation.VERTICAL, true, true, false);\n XYPlot xyplot = (XYPlot) jfreechart.getPlot();\n XYLineAndShapeRenderer xylineandshaperenderer = new XYLineAndShapeRenderer();\n xylineandshaperenderer.setBaseLinesVisible(true);\n\n // System.out.println(\"date set series count: \" + xydataset.getSeriesCount());\n // set visible or not shapes of series\n// System.out.printf(\"sets in the dataset: \"); // TODO delete this \"print\" if necessary\n for (int i = 0; i < this.dataset.seriesCount(); i++) {\n// System.out.printf(this.dataset.getSeries(i).getKey() + \" \");\n xylineandshaperenderer.setSeriesLinesVisible(i, false);\n xylineandshaperenderer.setSeriesShapesVisible(i, this.dataset.shapeVisible(i));\n }\n xylineandshaperenderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator());\n xyplot.setRenderer(xylineandshaperenderer);\n NumberAxis numberaxis = (NumberAxis) xyplot.getRangeAxis();\n numberaxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n this.jPanel = new ChartPanel(jfreechart);\n }", "public void SetXYSplineChartImage(String XYSpline) {\n\t\tboolean test = true;\n\t\t\n\t\tif((XYSpline.isEmpty()) && (test)) {\n\t\t\tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t\t\"SetXYSplineChartImage():: image is set to an empty string.\");\n\t\t}\n\t\tif ((XYSpline.length() > MAX_SIZE) && (test)) {\n\t\t \tSystem.err.println(\"*** Warning ChartTypeChooser::\" +\n\t\t \t\"SetXYSplineChartImage():: image is a very long name.\");\n\t\t}\n\t\telse if (test) {\n\t\t \tSystem.out.println(\"ChartTypeChooser:: \" +\n\t\t \t\"SetXYSplineChartImage():: chosen image is set to: \" \n\t\t \t+ XYSpline);\n\t\t}\n\t\tm_XYSplineChartImage = XYSpline;\n\t}", "Axis (Timeline timeline) {\n\n// assigns a Timeline to the Axis\n this.timeline = timeline;\n\n// creates a common y value for all Elements of the Axis\n// also used by all Markers on this Axis\n y = (axes.size() + 1) * 120;\n\n// places and styles the Axis\n this.setText(timeline.name.toUpperCase());\n this.setLayoutY(y - 12);\n this.setStyle(stylesheet.toString());\n this.getStyleClass().add(\"marker\");\n\n// places and styles the persistentLabel\n persistentLabel = new Label(timeline.name.toUpperCase());\n persistentLabel.setLayoutY(y - 13);\n persistentLabel.setStyle(stylesheet.toString());\n persistentLabel.getStyleClass().add(\"marker\");\n persistentLabel.setStyle(\"-fx-text-fill: #cccccc\");\n persistentLabel.setLayoutX(20);\n persistentLabel.setVisible(false);\n\n// sets start as the startDate of the first Event\n start = timeline.events.peekFirst().startDate[2];\n\n// sets right click on the Label and persistentLabel to expand Timeline\n this.setOnMouseClicked(mouseEvent -> {\n if (mouseEvent.getButton() == MouseButton.SECONDARY)\n expandElement(timeline);\n });\n persistentLabel.setOnMouseClicked(mouseEvent -> {\n if (mouseEvent.getButton() == MouseButton.SECONDARY)\n expandElement(timeline);\n });\n }", "public ThongKeHD() {\n initComponents();\n initialization();\n performEvent();\n //drawChart(2021);\n }", "public void createChart(StatisticPreviewChartViewModel statistic, Chart chart){\n\t chart.getTitle().setText(mainUser.getUsername());\r\n\t chart.getAxisSet().getXAxis(0).getTitle().setText(\"Dzień\");\r\n\t chart.getAxisSet().getYAxis(0).getTitle().setText(\"Kwoty\");\r\n\t // create scatter series\r\n\t ILineSeries series = (ILineSeries) chart.getSeriesSet().createSeries(SeriesType.LINE, \"Wartość\");\r\n\t series.setLineStyle(LineStyle.SOLID);\r\n\r\n\t Date[] days = statistic.getDays().stream().toArray(Date[]::new);\r\n\t series.setYSeries(statistic.getPrices());\r\n\t series.setXDateSeries(days); // xSeries is an array of java.util.Date\r\n\t IAxisTick xTick = chart.getAxisSet().getXAxis(0).getTick();\r\n\t \r\n\t IAxis yAxis = chart.getAxisSet().getYAxis(0);\r\n\t yAxis.adjustRange();\r\n\t \r\n\t yAxis.scrollUp();\r\n\t yAxis.scrollDown();\r\n\t Color color = new Color(Display.getDefault(), 255, 0, 0);\r\n\t series.setSymbolColor(color);\r\n\t \r\n\r\n\t DateFormat format = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n\t xTick.setFormat(format);\r\n\t \r\n\t \r\n\t // adjust the axis range\r\n\t chart.getAxisSet().adjustRange();\r\n\t \r\n\t chart.getParent().layout();\r\n\t comp.getParent().layout();\r\n\t \r\n\r\n\t comp.getParent().layout();\r\n\t chart.setVisible(true);\r\n\t}", "public void drawChart() {\n ArrayList<Entry> confuse = new ArrayList<>();\n ArrayList<Entry> attention = new ArrayList<>();\n ArrayList<Entry> engagement = new ArrayList<>();\n ArrayList<Entry> joy = new ArrayList<>();\n ArrayList<Entry> valence = new ArrayList<>();\n // point = \"Brow Furrow: \\n\";\n String dum = null, dum2 = null;\n for (int i = 0; i < size; i++) {\n //point += (\"\" + Emotion.getBrowFurrow(i).getL() + \" seconds reading of \" + Emotion.getBrowFurrow(i).getR() + \"\\n\");\n dum2 = Emotion.getBrowFurrow(i).getL().toString();\n dum = Emotion.getBrowFurrow(i).getR().toString();\n confuse.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getAttention(i).getL().toString();\n dum = Emotion.getAttention(i).getR().toString();\n attention.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getEngagement(i).getL().toString();\n dum = Emotion.getEngagement(i).getR().toString();\n engagement.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getJoy(i).getL().toString();\n dum = Emotion.getJoy(i).getR().toString();\n joy.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getValence(i).getL().toString();\n dum = Emotion.getValence(i).getR().toString();\n valence.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n }\n\n LineDataSet data1 = new LineDataSet(confuse,\"Confuse\");\n LineDataSet data2 = new LineDataSet(attention,\"Attention\");\n LineDataSet data3 = new LineDataSet(engagement,\"Engagement\");\n LineDataSet data4 = new LineDataSet(joy,\"Engagement\");\n LineDataSet data5 = new LineDataSet(valence,\"Valence\");\n data1.setColor(Color.BLUE);\n data1.setDrawCircles(false);\n data2.setColor(Color.YELLOW);\n data2.setDrawCircles(false);\n data3.setColor(Color.GRAY);\n data3.setDrawCircles(false);\n data4.setColor(Color.MAGENTA);\n data4.setDrawCircles(false);\n data5.setColor(Color.GREEN);\n data5.setDrawCircles(false);\n\n\n dataSets.add(data1);\n dataSets.add(data2);\n dataSets.add(data3);\n dataSets.add(data4);\n dataSets.add(data5);\n }", "private void jcbX_AxisActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public static void main(String args[])\n {\n Frame test = new Frame();\n FixedPointPanel demo = new FixedPointPanel();\n\n Function function = new Function()\n {\n public float at( float x) { return (float) (x*x + 0.5); }\n// public float at( float x) { return (float) Math.sqrt(x); }\n };\n\n PlotFunction plotFunction =\n new PlotFunction(function, -2.25f, 2.25f, -1.25f, 5.25f);\n\n FUNCTIONS[0] = plotFunction;\n\n/*\n Function function = new Function()\n {\n public float at( float x) { return (float) Math.exp(1/x); }\n };\n\n PlotFunction plotFunction =\n new PlotFunction(function, -3.25f, 4.255f, -0.25f, 5.25f);\n*/\n\n test.setTitle(\"Fixed Point Test\");\n test.setSize(600, 500);\n\n test.setLayout(new BorderLayout());\n test.add(demo, BorderLayout.CENTER);\n\n test.setVisible(true);\n\n demo.chooseFunction(0);\n demo.draw();\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n lineChart.setLegendVisible(false);\n lineChart.setAnimated(false);\n lineChart.setCreateSymbols(false);\n\n NumberAxis xAxis = (NumberAxis)lineChart.getXAxis();\n xAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(xAxis) {\n @Override\n public String toString(Number value) {\n //minus value FIXME if you can\n return String.format(\"%.1f\", -value.doubleValue());\n }\n });\n\n //-- Tooltip for lineChart\n mouseLocationInScene = new SimpleObjectProperty<>();\n tooltip = new Tooltip();\n \n lineChart.setOnMouseMoved((MouseEvent evt) -> { \n mouseLocationInScene.set(new Point2D(evt.getSceneX(), evt.getSceneY()));\n double x = getXMouseCoordinate();\n double y = getYMouseCoordinate();\n tooltip.show(lineChart, evt.getScreenX() + 50, evt.getScreenY());\n tooltip.setText(String.format(\"[%.4f; %.4f]\", -x, y));\n });\n }", "@FXML\n public void drawLPatternButtonPressed()\n {\n GraphicsContext gc = clearCanvasAndGetGraphicsContext();\n\n // loop to draw lines for each number of lines\n for(int i = 0; i <= lines; i++) {\n\n // draw L shape in bottom left\n gc.strokeLine(\n 0,\n (canvas.getHeight()/lines)*i,\n (canvas.getWidth()/lines)*i,\n canvas.getHeight()\n );\n\n }\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tString command = e.getActionCommand();\n\t\t\tSystem.out.println(command);\n\t\t\tif (command.equals(BEFORE_DATA_COMMAND)) {\n\t\t\t\tdoImportBeforeData();\n\t\t\t} else if (command.equals(AFTER_DATA_COMMAND)) {\n\t\t\t\tdoImportAfterData();\n\t\t\t} else if (command.equals(CANCEL_BEFORE_DATA_COMMAND)) {\n\t\t\t\tbeforeHeavyChart.chartPanel.restoreAutoBounds();\n//\t\t\t\tbeforeHeavyChart.deleteSeries(\"first\");\n\t\t\t\tbeforeHeavyChart.deleteSeries(\"second\");\n\t\t\t\tbeforeMouseHandle.xline = beforeMouseHandle.firstXline;\n\t\t\t\tbeforeMouseHandle.ifdoubleClick = false;\n\t\t\t\n\t\t\t} else if (command.equals(CANCEL_AFTER_DATA_COMMAND)) {\n\t\t\t\tafterHeavyChart.chartPanel.restoreAutoBounds();\n//\t\t\t\tbeforeHeavyChart.deleteSeries(\"first\");\n\t\t\t\tafterHeavyChart.deleteSeries(\"second\");\n\t\t\t\tafterMouseHandle.xline = afterMouseHandle.firstXline;\n\t\t\t\tafterMouseHandle.ifdoubleClick = false;\n\t\t\t\t\n\t\t\t}\n\t\t}", "private void createChart() {\n LineChart lineChart = (LineChart) findViewById(R.id.line_chart);\n\n // LineChart DataSet\n ArrayList<LineDataSet> dataSets = new ArrayList<>();\n\n // x-coordinate format value\n XAxis xAxis = lineChart.getXAxis();\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setGranularity(1f); // only intervals of 1 day\n// xAxis.setValueFormatter(new DayAxisValueFormatter(lineChart));\n\n\n // x-coordinate value\n ArrayList<String> xValues = new ArrayList<>();\n xValues.add(\"No.1\");\n xValues.add(\"No.2\");\n xValues.add(\"No.3\");\n xValues.add(\"No.4\");\n xValues.add(\"No.5\");\n\n // value\n ArrayList<Entry> value = new ArrayList<>();\n String measureItemName = \"\";\n value.add(new Entry(100, 0));\n value.add(new Entry(120, 1));\n value.add(new Entry(150, 2));\n value.add(new Entry(250, 3));\n value.add(new Entry(500, 4));\n\n\n // add value to LineChart's DataSet\n LineDataSet valueDataSet = new LineDataSet(value, measureItemName);\n dataSets.add(valueDataSet);\n\n // set LineChart's DataSet to LineChart\n// lineChart.setData(new LineData(xValues, dataSets));\n lineChart.setData(new LineData(valueDataSet));\n }", "@Override\n public void init() throws Exception {\n Mapper mapper = new Mapper() {\n public double f(double x, double y) {\n try {\n return i3d.evaluate(x, y);\n } catch (InterpolationException e) {\n e.printStackTrace();\n return 0;\n }\n }\n };\n \n // Define range and precision for the function to plot\n Range rangeX = new Range((float)i3d.lowerA(), (float)i3d.upperA());\n int stepsX = 100;\n Range rangeY = new Range((float)i3d.lowerB(), (float)i3d.upperB());\n int stepsY = 100;\n \n AbstractDrawable drawable;\n // Create the object to represent the surface\n final Shape surface = Builder.buildOrthonormal(new OrthonormalGrid(rangeX, stepsX, rangeY, stepsY), mapper);\n surface.setColorMapper(new ColorMapper(new ColorMapRainbow(),\n surface.getBounds().getZmin(), surface.getBounds().getZmax(), COLOR_BASE));\n surface.setWireframeDisplayed(true);\n surface.setWireframeWidth(1);\n surface.setWireframeColor(COLOR_WIRE);\n surface.setFaceDisplayed(true);\n drawable = surface;\n \n // Create a chart\n chart = AWTChartComponentFactory.chart(Quality.Advanced);\n chart.getAxeLayout().setXTickRenderer(new FixedDecimalTickRenderer(1));\n chart.getAxeLayout().setYTickRenderer(new FixedDecimalTickRenderer(1));\n chart.getAxeLayout().setZTickRenderer(new FixedDecimalTickRenderer(1));\n chart.getAxeLayout().setFaceDisplayed(false);\n chart.getAxeLayout().setMainColor(COLOR_MAIN);\n chart.getView().setBackgroundColor(COLOR_BG);\n chart.getScene().getGraph().add(drawable);\n \n chart.getAxeLayout().setXAxeLabel(\"Length\");\n chart.getAxeLayout().setYAxeLabel(\"Time\");\n chart.getAxeLayout().setZAxeLabel(\"Temperature\");\n }", "private static JFreeChart createChart(XYDataset dataset) {\n\n chart = ChartFactory.createTimeSeriesChart(\n \"Stromzählerübersicht\", // Titel\n \"Datum\", // x-Achse label\n \"kWh\", // y-Achse label\n dataset);\n\n chart.setBackgroundPaint(Color.WHITE);\n\n XYPlot plot = (XYPlot) chart.getPlot();\n plot.setBackgroundPaint(Color.LIGHT_GRAY);\n plot.setDomainGridlinePaint(Color.WHITE);\n plot.setRangeGridlinePaint(Color.WHITE);\n plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));\n plot.setDomainCrosshairVisible(true);\n plot.setRangeCrosshairVisible(true);\n\n XYItemRenderer r = plot.getRenderer();\n if (r instanceof XYLineAndShapeRenderer) {\n XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) r;\n renderer.setDefaultShapesVisible(false);\n renderer.setDefaultShapesFilled(false);\n renderer.setDrawSeriesLineAsPath(true);\n }\n\n DateAxis axis = (DateAxis) plot.getDomainAxis();\n axis.setDateFormatOverride(new SimpleDateFormat(\"dd-MM-yyyy\"));\n\n return chart;\n\n }", "public void mousePressedOnPlot(MouseEvent ev)\n {\n if (traceOK) animate(ev.getX());\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\n public void createNewLineChart() {\n\n ArrayList<Entry> yValues = new ArrayList<>();\n yValues.clear();\n\n //Todays Date\n Date date = new Date();\n LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n// String currentMonth = getMonthForInt(localDate.getMonthValue());\n if (monthSelectedAsInt > localDate.getMonthValue()){\n yValues.add(new Entry(0, 0));\n } else if (monthSelectedAsInt == localDate.getMonthValue()){\n for (int i = 1; i <= localDate.getDayOfMonth() ; i++) {\n yValues.add(new Entry(i, occupancyRate[i]));\n }\n } else {\n for (int i = 1; i <= numberOfDays ; i++) {\n yValues.add(new Entry(i, occupancyRate[i]));\n }\n }\n\n //chart.setOnChartValueSelectedListener(this);\n\n // enable scaling and dragging\n chart.setDragEnabled(true);\n chart.setScaleEnabled(true);\n\n // if disabled, scaling can be done on x- and y-axis separately\n chart.setPinchZoom(false);\n\n LineDataSet set1;\n\n set1 = new LineDataSet(yValues, \"Occupany Rate \");\n set1.setDrawCircles(false);\n set1.setDrawValues(false);\n set1.setColor(Color.RED);\n\n ArrayList <ILineDataSet> dataSets = new ArrayList<>();\n dataSets.add(set1);\n LineData dataLine = new LineData(set1);\n chart.getDescription().setEnabled(false);\n chart.getXAxis().setTextSize(10f);\n chart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);\n\n chart.getAxisLeft().setAxisMinimum(0);\n chart.getAxisLeft().setAxisMaximum(100);\n chart.getAxisRight().setAxisMinimum(0);\n chart.getAxisRight().setAxisMaximum(100);\n chart.getXAxis().setAxisMinimum(1);\n chart.getXAxis().setAxisMaximum(numberOfDays);\n\n chart.setData(dataLine);\n chart.invalidate();\n }", "private void previewXY() {\n Viewport tempViewport = new Viewport(chart.getMaximumViewport());\n // Make temp viewport smaller.\n float dx = tempViewport.width() / 4;\n float dy = tempViewport.height() / 4;\n tempViewport.inset(dx, dy);\n previewChart.setCurrentViewportWithAnimation(tempViewport);\n }", "void toChartData(XYChart<Number, Number> chart) {\n minX=0;\n maxX=0;\n Set<String> labels = new HashSet<>(dataLabels.values());\n for (String label : labels) {\n XYChart.Series<Number, Number> series = new XYChart.Series<Number, Number>();\n series.setName(label);\n dataLabels.entrySet().stream().filter(entry -> entry.getValue().equals(label)).forEach(entry -> {\n Point2D point = dataPoints.get(entry.getKey());\n series.getData().add(new XYChart.Data<>(point.getX(), point.getY()));\n if (minX == 0 || minX > point.getX()) {\n minX = point.getX();\n }\n if (maxX < point.getX()) {\n maxX = point.getX();\n }\n });\n\n series.setData(series.getData().sorted());\n chart.getData().add(series);\n }\n\n String[] lines = data.split(\"[\\n\\t]\");\n\n int i = 0;\n\n for (final Series<Number, Number> series : chart.getData()) {\n for (final Data<Number, Number> data : series.getData()) {\n Tooltip tooltip = new Tooltip();\n tooltip.setText(lines[3 * i] + \"\");\n Tooltip.install(data.getNode(), tooltip);\n i++;\n }\n }\n\n\n for (int k = 0; k < chart.getData().size(); k++) {\n chart.getData().get(k).getNode().setStyle(\"-fx-stroke: transparent;\");\n }\n\n }", "public void MakeBubble() {\n\t\tBubbleButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetBubbleChartImage())));\n\t\tBubbleButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetColumns().length >= 3){\n\t\t\t\t\t\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\tGetHost().LeftPanelContent(new BubbleChart(\n\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\"Bubble Chart\", \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost()));\n\t\t\t\t\t}else {\n\t\t\t\t\t\tGetHost().LeftPanelContent(new BubbleChart(\n\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost()));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"You must have three columns selected to use this chart\", \n\t\t\t\t\t\"Bubble Chart Format\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BubbleButton);\n\t}", "@FXML \n\tprivate void handleQuadradoButtonCH0() throws Exception {\n\t\tif(quadradoButtonCH0.isSelected()){\n\t\t\t//System.out.println(\"quadrado seleteed\");\n\t\t\tdutyFieldCH0.setDisable(false);\n\t\t\tdutyLabelCH0.setText(\"Duty\");\n\t\t\tdutyUnitLabelCH0.setText(\"%\");\n\t\t\tchartDrawer.drawQua();\n\t\t}\n\t\telse{\n\t\t\t//clear the chart\n\t\t\tdutyFieldCH0.setDisable(true);\n\t\t\tchartDrawer.clear();\n\t\t}\n\t}", "public GraphicalView execute(Context context) {\r\n double[] minValues = new double[] { 4300, 3500, 5300, 4900, 3800, 2900, };\r\n double[] maxValues = new double[] { 8000,7000, 9700, 8600, 7000, 6500};\r\n\r\n XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();\r\n RangeCategorySeries series = new RangeCategorySeries(\"波动情况\");\r\n int length = minValues.length;\r\n for (int k = 0; k < length; k++) {\r\n series.add(minValues[k], maxValues[k]);\r\n }\r\n dataset.addSeries(series.toXYSeries());\r\n int[] colors = new int[] { Color.CYAN };\r\n XYMultipleSeriesRenderer renderer = buildBarRenderer(colors);\r\n setChartSettings(renderer, \"好友们最近一周的能量波动范围\", \"用户\", \"能量值\", 0.5, 6.5,\r\n 2000, 12000, Color.GRAY, Color.LTGRAY);\r\n renderer.setBarSpacing(1);\r\n renderer.setXLabels(0);\r\n renderer.setYLabels(10);\r\n renderer.addXTextLabel(1, \"任东卫\");\r\n renderer.addXTextLabel(2, \"罗智宜\");\r\n renderer.addXTextLabel(3, \"郭子涵\");\r\n renderer.addXTextLabel(4, \"谢以荷\");\r\n renderer.addXTextLabel(5, \"赵一援\");\r\n renderer.addXTextLabel(6, \"萧之雁\");\r\n renderer.addYTextLabel(3000, \"心情差\");\r\n renderer.addYTextLabel(4500, \"心情有点差\");\r\n renderer.addYTextLabel(6000, \"心情一般\");\r\n renderer.addYTextLabel(8500, \"心情棒\");\r\n renderer.setMargins(new int[] {30, 70, 30, 70});\r\n renderer.setYLabelsAlign(Align.RIGHT);\r\n SimpleSeriesRenderer r = renderer.getSeriesRendererAt(0);\r\n r.setDisplayChartValues(true);\r\n r.setChartValuesTextSize(12);\r\n r.setChartValuesSpacing(3);\r\n r.setGradientEnabled(true);\r\n r.setGradientStart(4000, Color.parseColor(\"#B0C4DE\"));\r\n r.setGradientStop(8000, Color.parseColor(\"#00AAAA\"));\r\n return ChartFactory.getRangeBarChartView(context, dataset, renderer, Type.DEFAULT);\r\n }", "public CetakPenjualan() {\n initComponents();\ntampilDataPen();\nthis.setResizable(false);\n }", "public void set_as_bspline() {\n surface_type = 2;\n }", "public ChartFrame(Chart chart) {\r\n\t\tthis.chart = chart;\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c = 0; c < seatGrid[r].length; c++) {\r\n\t\t\t\tJLabel label = new JLabel();\r\n\t\t\t\tlabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n\t\t\t\tseatGrid[r][c] = label;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tremoveBtn = new JButton(\"Remove\");\r\n\t\tremoveBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonRemoveClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taddBtn = new JButton(\"Add\");\r\n\t\taddBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonAddClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tswapBtn = new JButton(\"Swap\");\r\n\t\tswapBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonSwapClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tloadBtn = new JButton(\"Load\");\r\n\t\tloadBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonLoadClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmoveBtn = new JButton(\"Move\");\r\n\t\tmoveBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonMoveClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));\r\n\t\tpanel.setLayout(new GridLayout(7, 5));\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c = 0; c < seatGrid[r].length; c++) {\r\n\t\t\t\tpanel.add(seatGrid[r][c]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < seatGrid[0].length; i++) {\r\n\t\t\tpanel.add(Box.createHorizontalGlue());\r\n\t\t}\r\n\r\n\t\tpanel.add(removeBtn);\r\n\t\tpanel.add(addBtn);\r\n\t\tpanel.add(loadBtn);\r\n\t\tpanel.add(swapBtn);\r\n\t\tpanel.add(moveBtn);\r\n\r\n\t\tadd(panel);\r\n\t\tsetSize(500, 400);\r\n\t\tsetVisible(true);\r\n\t\tsetTitle(\"Seating Chart\");\r\n\t\tupdate();\r\n\r\n\t}", "public void drawAxis(boolean x) {\n\n\t\tint stepPixels;\n\t\tfloat scale;\n\t\tif(x)\n\t\t{\n\t\t\tscale=this.drawnPlot.getScale().x;\n\t\t\tg.setColor(Color.green);\n\t\t\tGraphics2D g2 = (Graphics2D) g;\n\t\t\tg2.setStroke(new BasicStroke(2));\n\t\t\tg.drawLine((int)drawnPlot.getOffset().x-maxStepPixels*10, (int)drawnPlot.getOffset().y,(int)drawnPlot.getOffset().x+maxStepPixels*10,(int) drawnPlot.getOffset().y);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tg.setColor(Color.green);\n\t\t\tGraphics2D g2 = (Graphics2D) g;\n\t\t\tg2.setStroke(new BasicStroke(2));\n\t\t\tg.drawLine((int)drawnPlot.getOffset().x, (int)drawnPlot.getOffset().y-maxStepPixels*10,(int)drawnPlot.getOffset().x,(int) drawnPlot.getOffset().y+maxStepPixels*10);\n\n\t\t\tscale=this.drawnPlot.getScale().y;\n\t\t}\n\t\t\n\t\tfloat actualStepSize = maxStepPixels /scale;//calc how much is the maximum step size in pixels in actual units\n\t\tint scaleOrder=(int)Math.floor(Math.log10(actualStepSize));//see the order of magnitude the actual step size is in; no loss from casting to int with floor\n\t\tfloat divisor=(float) Math.pow(10, scaleOrder);//convert the order of magnitude to the lowest number of that order (2-->100, 1-->10...)\n\t\tdouble correctedStepSize=actualStepSize-(actualStepSize%divisor);//round the actual step size down based on its order of magnitude (0.253-->0.2, 101-->100, 1523-->1000)\n\t\tstepPixels=(int)(correctedStepSize*scale);\n\t\t//System.out.println(\"stepPixels: \"+stepPixels);\n\t\t\n\t\t\n\t\tfor(int i=-10;i<10;i++)\n\t\t{\n\t\t\tint xCommon=(int) (stepPixels *i + drawnPlot\n\t\t\t\t\t.getOffset().x);\n\t\t\tint x1 = xCommon;\n\t\t\tint y1 = (int) (drawnPlot\n\t\t\t\t\t.getOffset().y);\n\t\t\tint x2 = xCommon;\n\t\t\t\n\t\t\tint y2 = (int) ( drawnPlot\n\t\t\t\t\t.getOffset().y+tickSize);\n\t\t\tGraphics2D g2 = (Graphics2D) g;\n\t\t\tg2.setStroke(new BasicStroke(1));\n\t\t\t\n\t\t\tString markTxt=Double.toString(correctedStepSize*i);\n\t\t\tmarkTxt=markTxt.substring(0, Math.min(markTxt.length(), 5));\n\t\t\tmarkTxt=markTxt.replaceAll(\"(.*?\\\\..*?)0+$\", \"$1\");\n\t\t\tchar[] markTxtCa=markTxt.toCharArray();\n\t\t\t//System.out.println(\"test: \"+\"30.0200\".replaceAll(\"(.*?\\\\..*?)0+$\", \"$1\"));\n\t\t\t\n\t\t\tif(x)\n\t\t\t{\n\t\t\t\t\tg.drawLine(x1, y1, x2, y2);\n\t\t\t\t\tg.drawChars(markTxtCa, 0, markTxtCa.length, xCommon, (int) (drawnPlot\n\t\t\t\t\t.getOffset().y+tickSize*2));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tg.drawLine((int)drawnPlot\n\t\t\t\t\t\t.getOffset().x, stepPixels*-i+(int)(int)drawnPlot\n\t\t\t\t\t\t.getOffset().y, (int)drawnPlot\n\t\t\t\t\t\t.getOffset().x+tickSize, (int)drawnPlot\n\t\t\t\t\t\t.getOffset().y+stepPixels*-i);\n\t\t\t\tg.drawChars(markTxtCa, 0, markTxtCa.length, \n\t\t\t\t\t\t(int)drawnPlot\n\t\t\t\t\t\t.getOffset().x+tickSize*2, stepPixels*-i+(int)(int)drawnPlot\n\t\t\t\t\t\t.getOffset().y\n\t\t\t\t\t\t\n\t\t\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(markTxt);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public Proj2DClickPanel(String title, Plot2DViewer plotViewer, int numPoints) {\r\n\t\t totalNum = numPoints;\r\n\t\t //cluster2DCenters = new double[numPoints][2];\r\n\t\t \r\n\t\t this.plotViewer = plotViewer;\r\n\t \r\n\t\t plotViewer.plotPanel.plotCanvas.addMouseListener(this);\r\n\t\t plotViewer.plotPanel.plotCanvas.ActionMode = plotViewer.plotPanel.plotCanvas.SELCENTER;\r\n\t\t setBorder(BorderFactory.createTitledBorder(title));\r\n\t\t add(plotViewer);\r\n\t }", "@Override\n public void mouseReleased(MouseEvent e) {\n\n // 2D mode\n if (getChart().getView().is2D()) {\n View view = getChart().getView();\n applyMouse2DSelection(view);\n }\n }", "public static JFreeChart createTimeSeriesChart (String xAxisTitle,\n String yAxisTitle,\n XYDataset tsc)\n {\n JFreeChart chart = ChartFactory.createTimeSeriesChart (null,\n xAxisTitle,\n yAxisTitle,\n tsc,\n true,\n true,\n true);\n\n XYPlot xyplot = (XYPlot) chart.getPlot ();\n xyplot.setBackgroundPaint (UIUtils.getComponentColor ());\n xyplot.setDomainGridlinePaint (UIUtils.getBorderColor ());\n xyplot.setRangeGridlinePaint (UIUtils.getBorderColor ());\n /*\n xyplot.setAxisOffset (new RectangleInsets (5D,\n 5D,\n 5D,\n 5D));\n */\n xyplot.setDomainCrosshairVisible (true);\n xyplot.setRangeCrosshairVisible (true);\n xyplot.setDomainGridlinePaint (UIUtils.getColor (\"#cfcfcf\"));\n xyplot.setRangeGridlinePaint (UIUtils.getColor (\"#cfcfcf\"));\n\n final SimpleDateFormat dateFormat = new SimpleDateFormat (\"dd MMM yyyy\");\n\n ((NumberAxis) xyplot.getRangeAxis ()).setNumberFormatOverride (Environment.getNumberFormatter ());\n\n XYLineAndShapeRenderer xyitemrenderer = new XYLineAndShapeRenderer (true,\n true);\n xyitemrenderer.setUseFillPaint (true);\n\n XYToolTipGenerator ttgen = new StandardXYToolTipGenerator ()\n {\n\n public String generateToolTip (XYDataset dataset,\n int series,\n int item)\n {\n\n TimeSeriesCollection tsc = (TimeSeriesCollection) dataset;\n\n TimeSeries ts = tsc.getSeries (series);\n\n Number n = ts.getValue (item);\n Number p = Integer.valueOf (0);\n\n if (item > 0)\n {\n\n p = ts.getValue (item - 1);\n\n }\n\n String suff = \"\";\n int v = n.intValue () - p.intValue ();\n\n if (v != 0)\n {\n\n String sufftype = added;\n int val = v;\n\n if (v < 0)\n {\n\n sufftype = removed;\n val *= -1;\n\n }\n\n suff = String.format (getUIString (charts,timeseries,suffixes,sufftype),\n Environment.formatNumber (val));\n\n }\n\n return String.format (getUIString (charts,timeseries,tooltip),\n dateFormat.format (ts.getTimePeriod (item).getEnd ()),\n Environment.formatNumber (n.intValue ()),\n suff);\n\n }\n\n };\n\n xyplot.setRenderer (xyitemrenderer);\n\n List colors = new ArrayList ();\n colors.add (UIUtils.getColor (\"#f5b800\"));\n colors.add (UIUtils.getColor (\"#7547ff\"));\n colors.add (UIUtils.getColor (\"#9c4f4f\"));\n colors.add (UIUtils.getColor (\"#99cc99\"));\n colors.add (UIUtils.getColor (\"#cc6600\"));\n\n for (int i = 0; i < tsc.getSeriesCount (); i++)\n {\n\n if (i < (colors.size () - 1))\n {\n\n xyitemrenderer.setSeriesPaint (i,\n (Color) colors.get (i));\n\n }\n\n xyitemrenderer.setSeriesStroke (i,\n new java.awt.BasicStroke (2f));\n xyitemrenderer.setSeriesShapesFilled (i,\n true);\n xyitemrenderer.setSeriesToolTipGenerator (i,\n ttgen);\n xyitemrenderer.setSeriesShape (i,\n new java.awt.geom.Ellipse2D.Float (-3,\n -3,\n 6,\n 6));\n /*\n if (i > 0)\n {\n\n xyitemrenderer.setSeriesShape (i,\n xyitemrenderer.lookupSeriesShape (0));\n\n }\n */\n }\n\n PeriodAxis periodaxis = new PeriodAxis (xAxisTitle);\n\n periodaxis.setAutoRangeTimePeriodClass (Day.class);\n\n PeriodAxisLabelInfo[] aperiodaxislabelinfo = new PeriodAxisLabelInfo[3];\n aperiodaxislabelinfo[0] = new PeriodAxisLabelInfo (Day.class,\n new SimpleDateFormat (\"d\"));\n aperiodaxislabelinfo[1] = new PeriodAxisLabelInfo (Month.class,\n new SimpleDateFormat (\"MMM\"));\n aperiodaxislabelinfo[2] = new PeriodAxisLabelInfo (Year.class,\n new SimpleDateFormat (\"yyyy\"));\n periodaxis.setLabelInfo (aperiodaxislabelinfo);\n xyplot.setDomainAxis (periodaxis);\n\n return chart;\n\n }", "private void setGraphDataAndStyle() {\n graphView.addSeries(new LineGraphSeries(getSeriesData()));\n graphView.setTitle(\"配速\");\n graphView.getGridLabelRenderer().setLabelFormatter(new DateAxisLabelFormatter(getActivity()));\n graphView.getGridLabelRenderer().setNumVerticalLabels(locations.size());\n graphView.getViewport().setMinX(locations.get(0).getTime());\n graphView.getViewport().setMaxX(locations.get(locations.size()-1).getTime());\n graphView.getViewport().setXAxisBoundsManual(true);\n\n }", "public JFreeChart createChart(IntervalXYDataset paramIntervalXYDataset) {\n\n\n JFreeChart jfreechart = ChartFactory.createXYBarChart(\n \"Spread Example\", //title\n \"Resource\", //xAxisLabel\n false, //dateAxis\n \"Timing\", //yAxisLabel\n paramIntervalXYDataset, //dataset\n PlotOrientation.VERTICAL, //orientation\n true, //legend\n true, //tooltips\n false); //urls\n\n\n\n XYPlot xyplot = (XYPlot) jfreechart.getPlot();\n\n xyplot.setBackgroundPaint(Color.white);\n xyplot.setRangeGridlinePaint(Color.darkGray);//vertical\n xyplot.setDomainGridlinePaint(Color.LIGHT_GRAY);//horizontal\n\n// xyplot.setDomainAxis(createTimeAxis());\n xyplot.setDomainAxis(createSymbolAxis());\n\n xyplot.setFixedLegendItems(createLegend());\n\n MyXYBarRenderer xyBarRenderer = new MyXYBarRenderer();\n xyBarRenderer.setUseYInterval(true);\n\n xyBarRenderer.setShadowVisible(false);\n\n xyBarRenderer.setDrawBarOutline(true);\n xyBarRenderer.setBaseOutlinePaint(Color.DARK_GRAY);\n\n xyBarRenderer.setBaseItemLabelFont(new Font(\"Arial\", Font.PLAIN, 10));\n\n xyBarRenderer.setMargin(0.2);\n xyplot.setRenderer(0, xyBarRenderer, true);\n\n//xyBarRenderer.\n\n\n MyXYBarPainter barPainter = new MyXYBarPainter((XYTaskDataset) paramIntervalXYDataset);\n barPainter.setPainterType(MyXYBarPainter.PainterType.GRADIENT);\n xyBarRenderer.setBarPainter(barPainter);\n\n\n\n //Item-Label:\n xyBarRenderer.setBaseItemLabelsVisible(true);\n xyBarRenderer.setBaseItemLabelGenerator(createItemLabelGenerator());\n xyBarRenderer.setBasePositiveItemLabelPosition(createItemLabelPosition());\n\n\n\n xyBarRenderer.setBaseToolTipGenerator(createTooltipGenerator());\n\n\n\n//PeriodAxis xaxis= new PeriodAxis(\"kk\");\n\n xyplot.setRangeAxis(createTimeAxis());\n// xyplot.setRangeAxis(createSymbolAxis());\n\n\n\n// DateAxis xaxis = new DateAxis();\n// xaxis.setVerticalTickLabels(true);\n// xyplot.setRangeAxis(xaxis);\n xyplot.setRangeAxisLocation(AxisLocation.TOP_OR_LEFT);\n\n// ChartUtilities.applyCurrentTheme(jfreechart);\n\n return jfreechart;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawType = 0;\n\t\t\t}", "public String GetXYSplineChartImage() {\n\t\treturn m_XYSplineChartImage;\n\t}", "public void draw() {\n\t\tp.pushStyle();\n\t\t{\n\t\t\tp.rectMode(PConstants.CORNER);\n\t\t\tp.fill(360, 0, 70, 180);\n\t\t\tp.rect(60f, 50f, p.width - 110f, p.height * 2f * 0.33f - 50f);\n\t\t\tp.rect(60f, p.height * 2f * 0.33f + 50f, p.width - 110f, p.height * 0.33f - 130f);\n\t\t}\n\t\tp.popStyle();\n\n\t\tlineChart.draw(40f, 40f, p.width - 80f, p.height * 2f * 0.33f - 30f);\n\t\tlineChart2.draw(40f, p.height * 2f * 0.33f + 45f, p.width - 80f, p.height * 0.33f - 110f);\n\t\t//p.line(x1, y1, x2, y2);\n\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\tdouble[] pointLocation = new double[3];\n\t\tdouble x = e.getX();\n\t\tdouble y = e.getY();\n\t\t\n\t\tplotContent.Click(x, y, pointLocation);\n\t\tif(pointLocation[0]==0.0&&pointLocation[1]==0.0&&pointLocation[2]==0.0) {\n\t\t\t\n\t\t}else {\n\t\t\ttradedetail.setText(\"\\n\"+\"Yield = \"+pointLocation[0]+\"\\n\"+\"Days_To_Maturity = \"+pointLocation[1]+\"\\n\"+\"Amount_CHF = \"+pointLocation[2]);\n\t\t}\n\t}", "@FXML\n void zInPressed(ActionEvent event) {\n\t\tcanvas.setScaleX(canvas.getScaleX()*1.1);\n\t\tcanvas.setScaleY(canvas.getScaleY()*1.1);\n }", "private void makeChart() {\n\n Log.d(\"Chart\",\"Start Chart\");\n\n ArrayList<Entry> speedList = new ArrayList<>();\n ArrayList<Entry> avgSpeedList = new ArrayList<>();\n ArrayList<Entry> avgAltList = new ArrayList<>();\n\n int numberOfValues = trackingList.size();\n\n //Fills the data in the Arrays Entry (xValue,yValue)\n for(int i = 0; i < numberOfValues;i++){\n float avgSpeed = (float)averageSpeed;\n float avgAlt = (float)averageAlt;\n float curSpeed = (float)trackingList.get(i).getSpeed();\n\n Log.d(\"Chart\",\"CurSpeed: \" +curSpeed);\n\n avgSpeedList.add(new Entry(i*3,avgSpeed));\n speedList.add(new Entry(i*3,curSpeed));\n avgAltList.add(new Entry(i*3,avgAlt));\n }\n\n ArrayList<String> xAXES = new ArrayList<>();\n\n\n String[] xaxes = new String[xAXES.size()];\n for(int i=0; i<xAXES.size();i++){\n xaxes[i] = xAXES.get(i);\n }\n\n // More than one Array (Line in the Graph)\n ArrayList<ILineDataSet> lineDataSets = new ArrayList<>();\n\n //Speed Graph setup\n LineDataSet lineDataSet1 = new LineDataSet(speedList,\"Speed\");\n lineDataSet1.setDrawCircles(false);\n lineDataSet1.setColor(Color.BLUE);\n lineDataSet1.setLineWidth(2);\n\n //AvgSpeed setup\n LineDataSet lineDataSet2 = new LineDataSet(avgSpeedList,\"AvgSpeedLine\");\n lineDataSet2.setDrawCircles(false);\n lineDataSet2.setColor(Color.RED);\n lineDataSet2.setLineWidth(3);\n\n //AvgAlt setup\n LineDataSet lineDataSet3 = new LineDataSet(avgAltList,\"AvgAltLine\");\n lineDataSet3.setDrawCircles(false);\n lineDataSet3.setColor(Color.MAGENTA);\n lineDataSet3.setLineWidth(3);\n\n //Add them to the List\n lineDataSets.add(lineDataSet1);\n lineDataSets.add(lineDataSet2);\n lineDataSets.add(lineDataSet3);\n\n //setup for the xAxis\n XAxis xAxis = lineChart.getXAxis();\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n\n //Puts the data in the Graph\n lineChart.setData(new LineData(lineDataSets));\n lineChart.setVisibleXRangeMaximum(65f);\n\n //Chart description\n lineChart.getDescription().setText(\"All Speed\");\n\n //Shows timer information when clicked\n lineChart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getApplicationContext(), \"Its measured every 3 seconds\",Toast.LENGTH_LONG).show();\n }\n });\n }" ]
[ "0.6582129", "0.6574784", "0.6002657", "0.5931204", "0.59199816", "0.5894296", "0.5894118", "0.5856015", "0.58473474", "0.58391845", "0.5823604", "0.58184874", "0.58026445", "0.572664", "0.5713408", "0.57086587", "0.5694666", "0.5668284", "0.565854", "0.56390285", "0.56134725", "0.5590797", "0.5585812", "0.5535435", "0.5529294", "0.5520797", "0.55175686", "0.550083", "0.5499476", "0.54969007", "0.549475", "0.54873306", "0.54870945", "0.5480676", "0.5474265", "0.5463872", "0.5463066", "0.5425186", "0.5403927", "0.5387418", "0.53850436", "0.53763515", "0.53508806", "0.53347784", "0.5326996", "0.5321977", "0.5321723", "0.53103286", "0.52966416", "0.52948475", "0.5291777", "0.5274935", "0.52735674", "0.5262803", "0.52544177", "0.5243497", "0.52400404", "0.5237591", "0.5233924", "0.5230635", "0.52231294", "0.5223129", "0.52138793", "0.52126575", "0.52042633", "0.520209", "0.5201553", "0.5199652", "0.51915365", "0.51879364", "0.5184964", "0.5183227", "0.51781034", "0.5171341", "0.5166349", "0.5165376", "0.51643574", "0.51637375", "0.5161589", "0.5160725", "0.5160584", "0.51562804", "0.51458657", "0.51448786", "0.51442176", "0.5142063", "0.5139649", "0.5137949", "0.5131929", "0.51244795", "0.5123974", "0.511881", "0.5112913", "0.5106582", "0.51001865", "0.5098403", "0.5092905", "0.5090654", "0.5086909", "0.5086427" ]
0.8596832
0
/ access modifiers changed from: private
public static void updateWebAudioDecodePolicy(String value) { boolean disableDefaultDecoder = true; try { JSONObject jsonObject = H5Utils.parseObject(value); if (jsonObject != null) { disableDefaultDecoder = !"NO".equalsIgnoreCase(jsonObject.getString("webAudioDisableDefaultDecoder")); } } catch (Throwable e) { H5Log.e(TAG, "updateWebAudioDecodePolicy parseObject error", e); } UCSettings.setGlobalBoolValue(UCSettings.KEY_WEBAUDIO_DISABLE_DEFAULT_DECODER, disableDefaultDecoder); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n protected void prot() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private TMCourse() {\n\t}", "private void m50366E() {\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void method_4270() {}", "public abstract Object mo26777y();", "@Override\n protected void init() {\n }", "@Override\n\tprotected void interr() {\n\t}", "private MApi() {}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "private Infer() {\n\n }", "protected abstract Set method_1559();", "@Override\n void init() {\n }", "@Override\n public void init() {\n\n }", "private void kk12() {\n\n\t}", "public abstract void mo70713b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "private Singletion3() {}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "private ChainingMethods() {\n // private constructor\n\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private abstract void privateabstract();", "protected boolean func_70814_o() { return true; }", "private Get() {}", "private Get() {}", "public void m23075a() {\n }", "private Util() { }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo21779D() {\n }", "private test5() {\r\n\t\r\n\t}", "public void mo21825b() {\n }", "@Override\n public void memoria() {\n \n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "protected Doodler() {\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "private FlyWithWings(){\n\t\t\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {}", "@Override\n public boolean isPrivate() {\n return true;\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public abstract void mo56925d();", "public abstract void mo27386d();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "public void mo21877s() {\n }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }", "@Override\n public void get() {}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private void ss(){\n }", "public void mo21782G() {\n }", "public abstract void mo27385c();", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "protected void h() {}", "private void init() {\n\n\t}", "private final void i() {\n }" ]
[ "0.70451087", "0.66481936", "0.66338545", "0.6534467", "0.6533057", "0.63756114", "0.6368523", "0.63063055", "0.6244554", "0.62261415", "0.62046665", "0.61776316", "0.6142759", "0.6131381", "0.6131381", "0.61274433", "0.610919", "0.610797", "0.60792845", "0.6062989", "0.6059318", "0.60447836", "0.6037732", "0.6033637", "0.6028711", "0.60249", "0.6015989", "0.6015989", "0.6010123", "0.5991239", "0.5977965", "0.59756213", "0.59711885", "0.59652776", "0.59562653", "0.59491456", "0.5947999", "0.5942879", "0.5941421", "0.59406793", "0.5936351", "0.5936351", "0.5934477", "0.5934473", "0.59311885", "0.59261817", "0.592184", "0.59162307", "0.59162307", "0.5915696", "0.5908215", "0.5903059", "0.5903059", "0.5894341", "0.5887855", "0.58869827", "0.5884463", "0.5881538", "0.588023", "0.5879579", "0.58791363", "0.58698714", "0.58686715", "0.5857818", "0.5855094", "0.5851806", "0.58393794", "0.58365846", "0.58286095", "0.5816463", "0.58148336", "0.58144826", "0.5814171", "0.5814171", "0.5814171", "0.5814171", "0.5814171", "0.5814171", "0.5809802", "0.5802026", "0.57927555", "0.5792171", "0.5790551", "0.5786574", "0.5786574", "0.5786574", "0.5786574", "0.5786161", "0.578553", "0.5785096", "0.57780075", "0.5774098", "0.57732016", "0.57683206", "0.57683206", "0.57683206", "0.57683206", "0.57683206", "0.5763271", "0.57621974", "0.57540506" ]
0.0
-1
Reverts altered states, runs from beginning
public void clearState() { int size = states.size(); states.clear(); states.add(inception); for (int i = states.size(); i < size; i++) { nextState(); } alteredStates.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "synchronized void revertState()\n {\n state = state.revert();\n notifyAll();\n }", "public void restoreState() {\n\t\tsuper.restoreState();\n\t}", "protected void resetState()\n {\n // Nothing to do by default.\n }", "private void revertState() {\r\n\t\tBlock block = this.state.getBlock();\r\n\t\t//If the block has been changed by the time we revert (e.g. block place). Also, we ignore fire since it isn't worth the time\r\n\t\tif (block.getType() != this.newData.getMaterial() && block.getType() != Material.FIRE && block.getType() != Material.SOUL_FIRE) {\r\n\t\t\t//Get the drops of the original block and drop them in the world\r\n\t\t\tGeneralMethods.dropItems(block, GeneralMethods.getDrops(block, this.state.getType(), this.state.getBlockData()));\r\n\t\t} else {\r\n\t\t\t//Previous Material was SNOW\r\n\t\t\tif (this.state.getType() == Material.SNOW){\r\n\t\t\t\tupdateSnowableBlock(block.getRelative(BlockFace.DOWN), true);\r\n\t\t\t}\r\n\r\n\t\t\t//Revert the original blockstate\r\n\t\t\tthis.state.update(true, applyPhysics(state.getType())\r\n\t\t\t\t\t&& !(state.getBlockData() instanceof Bisected));\r\n\t\t}\r\n\t}", "public void transitionStates () {\n myCurrentState = myNextState;\n myNextState = null;\n }", "public void resetState();", "public void restoreState() \n\t{\n\t\tsuper.restoreState();\n\t}", "public abstract Op resetStates();", "public void resetState() {\n \ts = State.STRAIGHT;\n }", "@Override\n public void restore() {\n // Rather than copying the stored stuff back, just swap the pointers...\n int[] iTmp1 = m_iCurrentMatrices;\n m_iCurrentMatrices = m_iStoredMatrices;\n m_iStoredMatrices = iTmp1;\n\n int[] iTmp2 = m_iCurrentPartials;\n m_iCurrentPartials = m_iStoredPartials;\n m_iStoredPartials = iTmp2;\n\n// int[] iTmp3 = m_iCurrentStates;\n// m_iCurrentStates= m_iStoredStates;\n// m_iStoredStates = iTmp3;\n }", "@Override\n public void reset()\n {\n state = \"initial state\";\n nbChanges = 0;\n nbResets++;\n }", "@Override\n\tpublic void restoreState() {\n // Rather than copying the stored stuff back, just swap the pointers...\n int[] tmp1 = currentMatricesIndices;\n currentMatricesIndices = storedMatricesIndices;\n storedMatricesIndices = tmp1;\n\n int[] tmp2 = currentPartialsIndices;\n currentPartialsIndices = storedPartialsIndices;\n storedPartialsIndices = tmp2;\n\n\n }", "@Override\n public void restoreState(Map<String, Object> state) {\n\n }", "public void undo () {\n // The restores must be run in the reverse order they are added.\n for (int i = restores.size() - 1; i >= 0; --i) {\n restores.get(i).run();\n }\n restores.clear();\n }", "public void restart() {\n ReadOnlyAssignmentList currentState = assignmentListStateList.get(currentStatePointer);\n assignmentListStateList.clear();\n assignmentListStateList.add(currentState);\n currentStatePointer = 0;\n }", "public void revert()\n\t{\n\t\tswingingWay1 = !swingingWay1;\n\t}", "public void changeState() {\n if (!isDead) {\n Bitmap temp = getBitmap();\n setBitmap(stateBitmap);\n stateBitmap = temp;\n }\n }", "abstract protected void revert();", "public void reset(){\n currentStage = 0;\n currentSide = sideA;\n }", "public void undo() {\n target.setCombatState( oldState );\n }", "public String revert(State state) throws Exception;", "public void restoreState(FacesContext context, Object state) {\n }", "public void onRestorePendingState() {\n }", "protected void restoreState(State s) {\n /*\n * We must set the transformation matrix first since it affects things\n * like clipping regions and patterns.\n */\n setAffineMatrix(s.affineMatrix);\n currentState.relativeClip = s.relativeClip;\n sharedClipping = true;\n\n // If the GC is currently advanced, but it was not when pushed, revert\n if (gc.getAdvanced() && (s.graphicHints & ADVANCED_GRAPHICS_MASK) == 0) {\n // Set applied clip to null to force a re-setting of the clipping.\n appliedState.relativeClip = null;\n gc.setAdvanced(false);\n appliedState.graphicHints &= ~ADVANCED_HINTS_MASK;\n appliedState.graphicHints |= ADVANCED_HINTS_DEFAULTS;\n }\n\n setBackgroundColor(s.bgColor);\n setBackgroundPattern(s.bgPattern);\n\n setForegroundColor(s.fgColor);\n setForegroundPattern(s.fgPattern);\n\n setAlpha(s.alpha);\n setLineAttributes(s.lineAttributes);\n setFont(s.font);\n\n // This method must come last because above methods will incorrectly set\n // advanced state\n setGraphicHints(s.graphicHints);\n\n translateX = currentState.dx = s.dx;\n translateY = currentState.dy = s.dy;\n }", "public void revise()\n {\n \n super.revise();\n }", "@Override\n\tpublic void reset(){\n\t\tstate.reset();\n\t\toldState.reset();\n\t\treturnAction = new boolean[Environment.numberOfButtons]; \n\t\trewardSoFar = 0;\n\t\tcurrentReward = 0;\n\t}", "void restoreBefore() {\r\n\t\t\tsurface.basemap.clear();\r\n\t\t\tsurface.basemap.putAll(basemapBefore);\r\n\t\t\tsurface.buildingmap.clear();\r\n\t\t\tsurface.buildingmap.putAll(buildingmapBefore);\r\n\t\t\tsurface.features.clear();\r\n\t\t\tsurface.features.addAll(surfaceBefore);\r\n\t\t\tsurface.buildings.clear();\r\n\t\t\tsurface.buildings.addAll(buildingsBefore);\r\n\t\t}", "public final void reset(){\n\t\tthis.undoStack = new GameStateStack();\n\t\tthis.redoStack = new GameStateStack();\n\t\t\n\t\tthis.currentBoard = currentRules.createBoard(currentSize);\n\t\tthis.currentRules.initBoard(currentBoard, currentInitCells, currentRandom);\n\t}", "protected abstract void restoreGraphicsState();", "public abstract void restore();", "public void restoreState() {\n\tMachine.processor().setPageTable(pageTable);\n }", "private void restoreState() {\n if (savedState != null) {\n// For Example\n//tv1.setText(savedState.getString(\"text\"));\n onRestoreState(savedState);\n }\n }", "void restoreFormState();", "public void reset() {\n this.state = null;\n }", "@Override\n\tpublic void adjust() {\n\t\tstate = !state;\n\t}", "protected void reInitialize() {\n resetCurrent();\n incrementIterCount();\n setFirst(true);\n recoverRunningVersion();\n }", "public void undo() {\n setExecuted(false);\n }", "public void reset() {\r\n\t\tsuper.reset();\r\n\t\tfor (TransitionMode mode : transitionModes) {\r\n\r\n\t\t\tmode.reset();\r\n\t\t}\r\n\r\n\t}", "@Override\n public void restore() {\n }", "private void trueRevertBlock() {\r\n\t\tthis.reverted = true;\r\n\t\tif (instances_.containsKey(this.block)) {\r\n\t\t\tPaperLib.getChunkAtAsync(this.block.getLocation()).thenAccept(result -> {\r\n\t\t\t\tTempBlock last = instances_.get(this.block).getLast();\r\n\t\t\t\tthis.block.setBlockData(last.newData); //Set the block to the next in line TempBlock\r\n\t\t\t});\r\n\t\t} else { //Set to the original blockstate\r\n\t\t\tPaperLib.getChunkAtAsync(this.block.getLocation()).thenAccept(result -> revertState());\r\n\t\t}\r\n\r\n\t\tREVERT_QUEUE.remove(this);\r\n\t\tif (this.revertTask != null) {\r\n\t\t\tthis.revertTask.run();\r\n\t\t}\r\n\r\n\t\tfor (TempBlock attached : attachedTempBlocks) {\r\n\t\t\tattached.revertBlock();\r\n\t\t}\r\n\t}", "public void enterNormalState() {\n\n\t}", "public void undo() {\n\t\t\r\n\t}", "public void restoreState(IMemento memento) {\n\t\t\r\n\t}", "@Override\n public void undo()\n {\n story.setEstimate(oldEstimate);\n\n if (ready) {\n story.setReadinessToReady();\n }\n }", "public synchronized void back ()\n\t// one move up\n\t{\n\t\tState = 1;\n\t\tgetinformation();\n\t\tgoback();\n\t\tshowinformation();\n\t\tcopy();\n\t}", "public void reset() {\n setPrimaryDirection(-1);\n setSecondaryDirection(-1);\n flags.reset();\n setResetMovementQueue(false);\n setNeedsPlacement(false);\n }", "public void reset(){\n active = false;\n done = false;\n state = State.invisible;\n curX = 0;\n }", "public void reset() {\r\n this.x = resetX;\r\n this.y = resetY;\r\n state = 0;\r\n }", "public void reset()\n {\n m_source_.setToStart();\n updateInternalState();\n }", "protected void reset() {\n\t\tpush();\n\n\t\t// Clearen, en niet opnieuw aanmaken, om referenties elders\n\t\t// in het programma niet corrupt te maken !\n\t\tcurves.clear();\n\t\tselectedCurves.clear();\n\t\thooveredCurves.clear();\n\t\tselectedPoints.clear();\n\t\thooveredPoints.clear();\n\t\tselectionTool.clear();\n\t}", "void clearObjectFlowStates();", "@Override\n protected void incrementStates() {\n\n }", "protected static void resetStateOfExecution(){\n collumsCalculated.set(0);\n updateExecutionStateProperty();\n }", "public void doRevertToSaved()\n {\n super.doRevertToSaved();\n revalidateSyntax();\n }", "StateClass() {\r\n restored = restore();\r\n }", "public void reset() {\n\t\t// Reset the SwipeTile's state data.\n\t\tstartTime = System.nanoTime();\n\t\t// Reset the Tile's State.\n\t\ttileState = defaultTileState;\n\t\t// Reset the opacity\n\t\topacity = 1;\n\t\t// Refresh the arrow's Texture.\n\t\trefreshArrow();\n\t}", "public void undo() {\n\t\tstate = null;\n\t\tfor (Row r : containingRows)\n\t\t\tr.undo(this);\n\t}", "public void applyNewState() {\n this.setAlive(this.newState);\n }", "protected void reInitialize() {\r\n currentPos.reInitialize();\r\n motorState.reInitialize();\r\n armState = KSGripperStates.ARM_UP;\r\n gripperState = KSGripperStates.GRIP_OPEN;\r\n objPresent = false;\r\n objHeld = false;\r\n resistivity = 0;\r\n }", "private void restorePreviousState() {\n\n\t\tif (StoreAnalysisStateApplication.question1Answered) {\n\t\t\tfirstImageVievQuestion\n\t\t\t\t\t.setImageResource(R.drawable.swipegestureenabled);\n\t\t}\n\n\t\tif (StoreAnalysisStateApplication.question2Answered) {\n\t\t\tsecondImageVievQuestion\n\t\t\t\t\t.setImageResource(R.drawable.swipegestureenabled);\n\t\t}\n\n\t\tif (StoreAnalysisStateApplication.question3Answered) {\n\t\t\tthirdImageVievQuestion\n\t\t\t\t\t.setImageResource(R.drawable.swipegestureenabled);\n\t\t}\n\n\t\tif (StoreAnalysisStateApplication.stageCleared) {\n\t\t\tfirstImageVievDescription\n\t\t\t\t\t.setImageResource(R.drawable.swipegestureenabled);\n\t\t}\n\n\t\tif (StoreDesignStateApplication.stageCleared) {\n\t\t\tsecondImageVievDescription\n\t\t\t\t\t.setImageResource(R.drawable.voicereadingenabled);\n\t\t}\n\n\t\tif (StoreImplementationStateApplication.stageCleared) {\n\t\t\tthirdImageVievDescription\n\t\t\t\t\t.setImageResource(R.drawable.microphonenabled);\n\t\t}\n\n\t}", "public void undo() {\n\t\tlight.on();\n\t}", "private void softReset() {\n // variables\n lapMap.clear();\n // ui\n sessionTView.setText(\"\");\n positionTView.setText(\"-\");\n currentLapTView.setText(\"--:--:---\");\n lastLapTView.setText(\"--:--:---\");\n bestLapTView.setText(\"--:--:---\");\n currentLapNumberTView.setText(\"-\");\n gapTView.setText(\" -.---\");\n fastestDriver = Float.MAX_VALUE;\n fastestDriverName = null;\n fastestDriverTView.setText(\"--:--:---\");\n fastestDriverNameTView.setText(\"Fastest lap\");\n Log.d(TAG, \"SOFT Reset: between game states\");\n }", "public void resetOvers(){\n over0 = false;\r\n over1 = false;\r\n over2 = false;\r\n over3 = false;\r\n over4 = false;\r\n over5 = false;\r\n over6 = false;\r\n over7 = false;\r\n over8 = false;\r\n }", "public void clearState() {\n // if the user press the wrong cells, aka path, etc.\n // set state back to grass\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Chosen) {\n cells.set(i, CellState.Tower);\n } else if (cells.get(i) == CellState.ToPlaceTower) {\n cells.set(i, CellState.Grass);\n }\n\n }\n }", "void restoreAfter() {\r\n\t\t\tsurface.basemap.clear();\r\n\t\t\tsurface.basemap.putAll(basemapAfter);\r\n\t\t\tsurface.buildingmap.clear();\r\n\t\t\tsurface.buildingmap.putAll(buildingmapAfter);\r\n\t\t\tsurface.features.clear();\r\n\t\t\tsurface.features.addAll(surfaceAfter);\r\n\t\t\tsurface.buildings.clear();\r\n\t\t\tsurface.buildings.addAll(buildingsAfter);\r\n\t\t}", "public void doUndo()\n {\n // Get the last thing we did and reverse it, then remove it from the undoable stuff\n // This process is similar to 'Both Tool' being clicked on a hex with old values\n LinkedList\t\t\tlastChange = (LinkedList) undoableChanges.getLast();\n \n if (lastChange != null)\n {\n ListIterator\t\tit = lastChange.listIterator(0);\n ChangedMUXHex\t\tchangedHex;\n \n while (it.hasNext())\n {\n changedHex = (ChangedMUXHex) it.next();\n // We'll assume the hex is valid since it's in this list\n map.setHex(changedHex.getLocation(), changedHex.getPrevTerrain(), changedHex.getPrevElevation());\n mapComponent.repaint(mapComponent.rectForHex(changedHex.getLocation()));\n }\n \n // Repaint the hexes\n //mapComponent.repaint();\n \n // Remove what we just undid from our undoable list\n undoableChanges.removeLast();\n }\n }", "void FlipBook()\r\n\t\t{\r\n\t\t\t Collections.reverse(this);\r\n\t\t}", "@Override\n\tpublic void undo() {\n\t\tlight.off();\n\t}", "public void undo() {\n\t\tif(committed){\n\t\t\treturn;\n\t\t}\n\t\tboolean [][] tempGrid = grid;\n\t\tgrid = backupGrid;\n\t\tbackupGrid = tempGrid;\n\n\t\tint [] tempWidths = widths;\n\t\twidths = backupWidths;\n\t\tbackupWidths = tempWidths;\n\n\t\tint [] tempHeights = heights;\n\t\theights = backupHeights;\n\t\tbackupHeights = tempHeights;\n\n\t\tint tempMaxColumnHeight = maxColumnHeight;\n\t\tmaxColumnHeight = backupMaxColumnHeight;\n\t\tbackupMaxColumnHeight = tempMaxColumnHeight;\n\n\t\tcommit();\n\t}", "protected final void undo() {\n requireAllNonNull(model, previousResidentBook, previousEventBook);\n model.resetData(previousResidentBook, previousEventBook);\n model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);\n model.updateFilteredEventList(PREDICATE_SHOW_ALL_EVENTS);\n\n }", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "private final void restoreOriginalGraph() {\n // Safeguard against multiple restores\n if (startIndex == -1) return;\n \n markEdgesFrom(startIndex, false);\n markEdgesFrom(endIndex, false);\n markHasEdgeToGoal(false);\n nOutgoingEdgess[endIndex] = endOriginalSize;\n nOutgoingEdgess[startIndex] = startOriginalSize;\n nEdges = originalNEdges;\n\n nNodes = originalSize;\n startIndex = -1;\n endIndex = -1;\n }", "public void reset() {\n\t\tmCycleFlip = false;\n\t\tmRepeated = 0;\n\t\tmMore = true;\n //mOneMoreTime = true;\n \n\t\t// 추가\n\t\tmStarted = mEnded = false;\n\t\tmCanceled = false;\n }", "void unsetState();", "@Override\n public void onRestate() {\n }", "protected void reset() {\n\t\t}", "public void restore() {\n currentIm= originalIm.copy();\n }", "public final void rewind() {\n branch = 0;\n }", "final void resetChanged() {\n this.changed = false;\n }", "private void swapTransforms() {\n Transform tmp = workTransform;\n workTransform = userTransform;\n userTransform = tmp;\n }", "void beforeState();", "protected void reset(){\n inited = false;\n }", "@Override\n\tpublic void reset() {\n\t\tthis.prepare();\n\t\tsuper.reset();\n\t}", "public void reset() {\n\t\tplayerModelDiff1.clear();\n\t\tplayerModelDiff4.clear();\n\t\tplayerModelDiff7.clear();\n\t\tif(normalDiffMethods)\n\t\t{\t\n\t\tupdatePlayerModel();\n\t\tdisplayReceivedRewards();\n\t\t}\n\t\tint temp_diffsegment1;\n\t\tint temp_diffsegment2;\n\t\tif (currentLevelSegment == 0) {\n\t\t\t//System.out.println(\"-you died in the first segment, resetting to how you just started\");\n\t\t\ttemp_diffsegment1 = (int) plannedDifficultyLevels.get(0);\n\t\t\ttemp_diffsegment2 = (int) plannedDifficultyLevels.get(1);\n\t\t}\n\t\telse {\n\t\t\t//System.out.println(\"-nextSegmentAlreadyGenerated:\" + nextSegmentAlreadyGenerated);\n\t\t\tif (nextSegmentAlreadyGenerated) {\n\t\t\t\t//because the next segment is already generated (and so the previous does not exist anymore),\n\t\t\t\ttemp_diffsegment1 = (int) plannedDifficultyLevels.get(currentLevelSegment);\n\t\t\t\ttemp_diffsegment2 = (int) plannedDifficultyLevels.get(currentLevelSegment+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//because the next segment is not yet generated\n\t\t\t\ttemp_diffsegment1 = (int) plannedDifficultyLevels.get(currentLevelSegment-1);\n\t\t\t\ttemp_diffsegment2 = (int) plannedDifficultyLevels.get(currentLevelSegment);\n\t\t\t}\n\t\t}\n\t\tplannedDifficultyLevels.clear();\n\n\t\t//System.out.println(\"-resetting to: \" + temp_diffsegment1 + \", \" + temp_diffsegment2);\n\t\tplannedDifficultyLevels.add(temp_diffsegment1);\n\t\tplannedDifficultyLevels.add(temp_diffsegment2);\n\t\tcurrentLevelSegment = 0;\n\n\t\tpaused = false;\n\t\tSprite.spriteContext = this;\n\t\tsprites.clear();\n\n\t\ttry {\n\t\t\tlevel2 = level2_reset.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tlevel3 = level3_reset.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n fixborders();\n\t\tconjoin();\n\n\t\tlayer = new LevelRenderer(level, graphicsConfiguration, 320, 240);\n\t\tfor (int i = 0; i < 2; i++)\n\t\t{\n\t\t\tint scrollSpeed = 4 >> i;\n\t\tint w = ((level.getWidth() * 16) - 320) / scrollSpeed + 320;\n\t\tint h = ((level.getHeight() * 16) - 240) / scrollSpeed + 240;\n\t\tLevel bgLevel = BgLevelGenerator.createLevel(w / 32 + 1, h / 32 + 1, i == 0, levelType);\n\t\tbgLayer[i] = new BgRenderer(bgLevel, graphicsConfiguration, 320, 240, scrollSpeed);\n\t\t}\n\n\t\tdouble oldX = 0;\n\t\tif(mario!=null)\n\t\t\toldX = mario.x;\n\n\t\tmario = new Mario(this);\n\t\tsprites.add(mario);\n\t\tstartTime = 1;\n\n\t\ttimeLeft = 200*15;\n\n\t\ttick = 0;\n\n\t\t/*\n\t\t * SETS UP ALL OF THE CHECKPOINTS TO CHECK FOR SWITCHING\n\t\t */\n\t\t switchPoints = new ArrayList<Double>();\n\n\t\t//first pick a random starting waypoint from among ten positions\n\t\tint squareSize = 16; //size of one square in pixels\n\t\tint sections = 10;\n\n\t\tdouble startX = 32; //mario start position\n\t\tdouble endX = level.getxExit()*squareSize; //position of the end on the level\n\t\t//if(!isCustom && recorder==null)\n level2.playValues = this.valueList[0];\n\t\t\trecorder = new DataRecorder(this,level3,keys);\n\t\t\t////System.out.println(\"\\n enemies LEFT : \" + recorder.level.COINS); //Sander disable\n\t\t\t////System.out.println(\"\\n enemies LEFT : \" + recorder.level.BLOCKS_COINS);\n\t\t\t////System.out.println(\"\\n enemies LEFT : \" + recorder.level.BLOCKS_POWER);\n\t\t\tgameStarted = false;\n\t}", "public void revertChanges()\n {\n // TODO: Find a good way to revert changes\n // reload patient\n HibernateUtil.currentSession().evict(_dietTreatment.getModel());\n PatientDAO dao = DAOFactory.getInstance().getPatientDAO();\n _patient.setModel(dao.findById(_patient.getPatientId(), false));\n }", "private void reset() {\n }", "public ExecuteState() {\r\n PrevPC = 0;\r\n ChangedLoc = -1;\r\n OldInst = new CodeBlueInstruction();\r\n }", "@Override\r\n\tpublic void nextState() {\n\t\t\r\n\t}", "protected void reInitialize() {\n leftSpeed = 0;\n rightSpeed = 0;\n leftPosition = 0;\n rightPosition = 0;\n }", "public void resetgamestate() {\n \tthis.gold = STARTING_GOLD;\n \tthis.crew = STARTING_FOOD;\n \tthis.points = 0;\n \tthis.masterVolume = 0.1f;\n this.soundVolume = 0.5f;\n this.musicVolume = 0.5f;\n \n this.ComputerScience = new Department(COMP_SCI_WEPS.getWeaponList(), COMP_SCI_UPGRADES.getRoomUpgradeList(), this);\n this.LawAndManagement = new Department(LMB_WEPS.getWeaponList(), LMB_UPGRADES.getRoomUpgradeList(), this);\n this.Physics = new Department(PHYS_WEPS.getWeaponList(), PHYS_UPGRADES.getRoomUpgradeList(), this);\n \n this.playerShip = STARTER_SHIP.getShip();\n this.playerShip.setBaseHullHP(700);\n this.playerShip.repairHull(700);\n this.combatPlayer = new CombatPlayer(playerShip);\n }", "public void reset() {\n firstUpdate = true;\n }", "public void ResetState() {\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n pictures[i][j] = temp_pictures[i][j];\n pictures2[i][j] = pictures[i][j];\n\n\n }\n }\n }", "private void restoreMappingPreviousState(ApplicationInfo readPerst)\n\t\t\tthrows RowsExceededException, WriteException, BiffException,\n\t\t\tIOException {\n\t\tint size = NcaMappingDispGui.createMappingInstance().availableVariablesListmodel\n\t\t\t\t.size();\n\t\tfor (int i = NcaMappingDispGui.createMappingInstance().availableVariablesListmodel\n\t\t\t\t.size() - 1; i >= 0; i--) {\n\t\t\tNcaMappingDispGui.createMappingInstance().availableVariablesListmodel\n\t\t\t\t\t.remove(i);\n\t\t}\n\n\t\t// setting the available columns\n\t\tfor (int i = 0; i < readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t.getAvailableColumnsVector().size(); i++) {\n\t\t\tNcaMappingDispGui.createMappingInstance().availableVariablesListmodel\n\t\t\t\t\t.add(i, readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t\t\t\t.getAvailableColumnsVector().get(i));\n\n\t\t}\n\n\t\t// since sort variables are not populated while creating a new\n\t\t// ncaMainScreen\n\t\t// we need not remove anything, so\n\t\t// setting the sort variables\n\t\tfor (int i = 0; i < readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t.getSortVariablesListVector().size(); i++) {\n\t\t\tNcaMappingDispGui.createMappingInstance().sortVariableListModel\n\t\t\t\t\t.add(i, readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t\t\t\t.getSortVariablesListVector().get(i));\n\n\t\t}\n\n\t\t// setting the time column\n\n\t\tNcaMappingDispGui.createMappingInstance().xVariableTextField\n\t\t\t\t.setText(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t\t\t.getxColumnName());\n\n\t\t// setting the concentration column\n\n\t\tNcaMappingDispGui.createMappingInstance().yVariableTextField\n\t\t\t\t.setText(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t\t\t.getYcolumnName());\n\n\t\t// setting the end time column\n\t\t// restore this value only if the previous analysis is of model type\n\t\t// urine\n\t\tif (readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t.getProcessingInputs().getModelInputsObj().getModelType() == 1) {\n\t\t\tNcaMappingDispGui.createMappingInstance().endTimeVariableTextField\n\t\t\t\t\t.setText(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t\t\t\t.getEndTimeColumnName());\n\n\t\t\tNcaMappingDispGui.createMappingInstance().volumeVariableTextField\n\t\t\t\t\t.setText(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t\t\t\t.getVolumeColumnName());\n\t\t}\n\n\t\t// setting the subject column name\n\t\t// restore this value only when if it was a sparse analysis\n\t\tif (readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t.getProcessingInputs().getModelInputsObj()\n\t\t\t\t.getisSparseSelected() == true) {\n\n\t\t\tNcaMappingDispGui.createMappingInstance().subjectTextField\n\t\t\t\t\t.setText(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t\t\t\t.getSubjectColumnName());\n\t\t}\n}", "public void reset() {\n context.reset();\n state = State.NAME;\n }", "public void reset(){\r\n barn.setVisited(Boolean.FALSE);\r\n turkeyTalk.setVisited(Boolean.FALSE);\r\n pigginOut.setVisited(Boolean.FALSE);\r\n seeTheLight.setVisited(Boolean.FALSE);\r\n theGobbling.setVisited(Boolean.FALSE);\r\n youDied1.setVisited(Boolean.FALSE);\r\n threeLittlePigs.setVisited(Boolean.FALSE);\r\n forTheGreaterGood.setVisited(Boolean.FALSE);\r\n farmHouseTurkey.setVisited(Boolean.FALSE);\r\n youWin.setVisited(Boolean.FALSE);\r\n }", "public void reset()\n {\n mine = false;\n revealed = false;\n flagged = false;\n repaint();\n }", "public void reset(){\n\t\tfrogReposition();\n\t\tlives = 5;\n\t\tend = 0;\n\t}", "public void reset() {\r\n\r\n for ( Card card : cards ) {\r\n if ( card.isFaceUp() ) {\r\n card.toggleFace( true );\r\n }\r\n }\r\n Collections.shuffle( cards );\r\n\r\n this.undoStack = new ArrayList<>();\r\n\r\n this.moveCount = 0;\r\n\r\n announce( null );\r\n }", "@Override\n public void executeImplicitBehaviour() {\n controller.game.getCurrentRound().getDraftPool().reRoll();\n controller.setControllerState(controller.stateManager.getNextState(this));\n }", "protected void reset() {\n leftSkier.reset();\n rightSkier.reset();\n }" ]
[ "0.7506247", "0.7320216", "0.73112154", "0.7308455", "0.7278403", "0.7264603", "0.72171503", "0.711127", "0.7101222", "0.6996767", "0.6919744", "0.6880686", "0.6872711", "0.68615866", "0.6778395", "0.6769764", "0.67501837", "0.6715986", "0.6669553", "0.6637415", "0.663575", "0.6612398", "0.66111404", "0.66059214", "0.65995663", "0.65957797", "0.65849197", "0.657061", "0.65370953", "0.6519825", "0.65152425", "0.6511343", "0.6503416", "0.6484568", "0.6469164", "0.6439218", "0.64311725", "0.6430009", "0.6415708", "0.64140594", "0.6401886", "0.63969404", "0.6384678", "0.63526416", "0.6347413", "0.63458896", "0.6324995", "0.6295165", "0.62753445", "0.6244501", "0.62428564", "0.62416637", "0.62416345", "0.6241259", "0.6234941", "0.6229965", "0.62139404", "0.6213119", "0.62073433", "0.6195828", "0.61950535", "0.61867034", "0.6176973", "0.61732364", "0.617302", "0.61693877", "0.6165422", "0.61565566", "0.614347", "0.61429876", "0.613699", "0.61356366", "0.6133443", "0.61297435", "0.6126795", "0.6122796", "0.6116734", "0.61106855", "0.6109357", "0.60838753", "0.6069633", "0.60657233", "0.6065187", "0.60633636", "0.606249", "0.60553217", "0.60469705", "0.60454065", "0.60450363", "0.60420626", "0.6040381", "0.6038888", "0.603038", "0.60276276", "0.6027494", "0.6023477", "0.60125065", "0.6011383", "0.60111", "0.600578" ]
0.6567605
28