Ejemplo n.º 1
0
 public virtual void actionPerformed(ActionEvent e)
 {
   if (String.instancehelper_equals(e.getActionCommand(), (object) "monthSelectionChanged"))
   {
     JComboBox jcomboBox = (JComboBox) ((EventObject) e).getSource();
     int num = this.chosenDate.get(5);
     this.chosenDate.set(5, 1);
     this.chosenDate.set(2, jcomboBox.getSelectedIndex());
     int actualMaximum = this.chosenDate.getActualMaximum(5);
     this.chosenDate.set(5, Math.min(num, actualMaximum));
     this.refreshButtons();
   }
   else if (String.instancehelper_equals(e.getActionCommand(), (object) "yearSelectionChanged"))
   {
     if (this.refreshing)
       return;
     Integer integer = (Integer) ((JComboBox) ((EventObject) e).getSource()).getSelectedItem();
     int num = this.chosenDate.get(5);
     this.chosenDate.set(5, 1);
     this.chosenDate.set(1, integer.intValue());
     int actualMaximum = this.chosenDate.getActualMaximum(5);
     this.chosenDate.set(5, Math.min(num, actualMaximum));
     this.refreshYearSelector();
     this.refreshButtons();
   }
   else if (String.instancehelper_equals(e.getActionCommand(), (object) "todayButtonClicked"))
   {
     this.setDate(new Date());
   }
   else
   {
     if (!String.instancehelper_equals(e.getActionCommand(), (object) "dateButtonClicked"))
       return;
     int num = Integer.parseInt(((Component) ((EventObject) e).getSource()).getName());
     Calendar firstVisibleDate = this.getFirstVisibleDate();
     firstVisibleDate.add(5, num);
     this.setDate(firstVisibleDate.getTime());
   }
 }
 public virtual void actionPerformed(ActionEvent e)
 {
   string actionCommand = e.getActionCommand();
   if (String.instancehelper_equals(actionCommand, (object) "CLOSE"))
   {
     ((Window) this).dispose();
   }
   else
   {
     if (!String.instancehelper_equals(actionCommand, (object) "COPY"))
       return;
     this.panel.copySystemPropertiesToClipboard();
   }
 }
Ejemplo n.º 3
0
		/* Events */

		/**
		 * Actions for button presses.
		 * @param e the ActionEvent
		 */
		public void actionPerformed(ActionEvent e)
		{
			String command = e.getActionCommand();
			if (debug) Console.WriteLine(command);
			if (command == "voronoi") isVoronoi = true;
			else if (command == "delaunay") isVoronoi = false;
			else if (command == "clear")
				dt = new DelaunayTriangulation(initialTriangle);
			repaint();
		}
 public virtual void actionPerformed(ActionEvent e)
 {
   if (String.instancehelper_equals(e.getActionCommand(), (object) "monthSelectionChanged"))
   {
     this.date = SerialDate.createInstance(this.date.getDayOfMonth(), ((JComboBox) ((EventObject) e).getSource()).getSelectedIndex() + 1, this.date.getYYYY());
     this.refreshButtons();
   }
   else if (String.instancehelper_equals(e.getActionCommand(), (object) "yearSelectionChanged"))
   {
     if (this.refreshing)
       return;
     this.date = SerialDate.createInstance(this.date.getDayOfMonth(), this.date.getMonth(), ((Integer) ((JComboBox) ((EventObject) e).getSource()).getSelectedItem()).intValue());
     this.refreshYearSelector();
     this.refreshButtons();
   }
   else if (String.instancehelper_equals(e.getActionCommand(), (object) "todayButtonClicked"))
   {
     this.setDate(SerialDate.createInstance(new Date()));
   }
   else
   {
     if (!String.instancehelper_equals(e.getActionCommand(), (object) "dateButtonClicked"))
       return;
     this.setDate(SerialDate.addDays(Integer.parseInt(((Component) ((EventObject) e).getSource()).getName()), this.getFirstVisibleDate()));
   }
 }
Ejemplo n.º 5
0
 public override void actionPerformed(ActionEvent @event)
 {
   string actionCommand = @event.getActionCommand();
   if (String.instancehelper_equals(actionCommand, (object) "Polar Zoom In"))
     ((PolarPlot) this.getChart().getPlot()).zoom(0.5);
   else if (String.instancehelper_equals(actionCommand, (object) "Polar Zoom Out"))
     ((PolarPlot) this.getChart().getPlot()).zoom(2.0);
   else if (String.instancehelper_equals(actionCommand, (object) "Polar Auto Range"))
     ((PolarPlot) this.getChart().getPlot()).getAxis().setAutoRange(true);
   else
     base.actionPerformed(@event);
 }
Ejemplo n.º 6
0
 public virtual void actionPerformed(ActionEvent @event)
 {
   string actionCommand = @event.getActionCommand();
   if (String.instancehelper_equals(actionCommand, (object) "helpButton"))
     return;
   if (String.instancehelper_equals(actionCommand, (object) "okButton"))
   {
     this.cancelled = false;
     ((Dialog) this).setVisible(false);
   }
   else
   {
     if (!String.instancehelper_equals(actionCommand, (object) "cancelButton"))
       return;
     this.cancelled = true;
     ((Dialog) this).setVisible(false);
   }
 }