private void backNormal(int i, MyscreenPanel scp) { try { ((TTAirButton) buttons.get(i)).setType('N'); TTAirButton button = ((TTAirButton) buttons.get(i)); scp.removeShape(button.getIdentification()); NewShape ns = new NewShape( button.getImage('N'), scp, (int) button.getPoint(0).getX(), (int) button.getPoint(1).getX(), (int) button.getPoint(0).getY(), (int) button.getPoint(1).getY(), button.getIdentification()); scp.addLayerShape(ns); } catch (Exception e) { System.out.println("Error: BackNormal"); } }
private void Clicked(int i, MyscreenPanel scp) { try { ((TTAirButton) buttons.get(i)).setType('C'); TTAirButton button = ((TTAirButton) buttons.get(i)); scp.removeShape(button.getIdentification()); NewShape ns = new NewShape( button.getImage('C'), scp, (int) button.getPoint(0).getX(), (int) button.getPoint(1).getX(), (int) button.getPoint(0).getY(), (int) button.getPoint(1).getY(), button.getIdentification()); scp.addLayerShape(ns); if (((Vector) table.get(button.getIdentification())).get(0) != null) { Vector actionC = (Vector) table.get(button.getIdentification()); this.run(actionC, "Clicked"); } } catch (Exception e) { System.out.println("Error: Clicked"); } }