home *** CD-ROM | disk | FTP | other *** search
- import java.awt.Color;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Event;
- import java.awt.Frame;
- import java.awt.LayoutManager;
- import java.awt.Window;
-
- public class coohint extends Window {
- // $FF: renamed from: w int
- int field_0;
- // $FF: renamed from: h int
- int field_1;
- coobar m_applet;
- coolab labtips;
-
- void coohint_MouseEnter(Event event) {
- this.moveHint();
- this.labtips.disable();
- }
-
- void labtips_MouseEnter(Event event) {
- this.moveHint();
- this.labtips.disable();
- }
-
- public coohint(coobar applet, Frame parent, String content) {
- super(parent);
- this.m_applet = applet;
- ((Container)this).setLayout((LayoutManager)null);
- ((Window)this).addNotify();
- ((Component)this).resize(((Container)this).insets().left + ((Container)this).insets().right + 195, ((Container)this).insets().top + ((Container)this).insets().bottom + 135);
- ((Component)this).setBackground(new Color(14606694));
- this.labtips = new coolab("");
- this.labtips.reshape(((Container)this).insets().left, ((Container)this).insets().top, 192, 132);
- ((Container)this).add(this.labtips);
- this.labtips.setText("12345678901234567890");
- this.labtips.setText(content);
- }
-
- public boolean handleEvent(Event event) {
- if (event.target == this.labtips && event.id == 504) {
- this.labtips_MouseEnter(event);
- return true;
- } else if (event.target == this && event.id == 504) {
- this.coohint_MouseEnter(event);
- return true;
- } else {
- return super.handleEvent(event);
- }
- }
-
- void moveHint() {
- System.out.println("Enter moveHint");
- this.m_applet.doCloseMenu = false;
- double r = Math.random();
- r = 0.6000000000000001;
- if (r < (double)0.5F) {
- if (this.m_applet.hintX - this.field_0 > 0) {
- coobar var10000 = this.m_applet;
- var10000.hintX -= this.field_0;
- } else if (640 - this.m_applet.hintX > this.field_0) {
- coobar var4 = this.m_applet;
- var4.hintX += this.field_0;
- }
- } else if (this.m_applet.hintY - this.field_1 > 0) {
- coobar var5 = this.m_applet;
- var5.hintY -= this.field_1;
- } else if (480 - this.m_applet.hintY > this.field_1) {
- coobar var6 = this.m_applet;
- var6.hintY += this.field_1;
- }
-
- ((Component)this).reshape(this.m_applet.hintX, this.m_applet.hintY, this.field_0, this.field_1);
- ((Component)this).requestFocus();
- }
- }
-