.class public YesNoDialog

.super java/awt/Dialog

.field private protected yesButton Ljava/awt/Button;
.field private protected noButton Ljava/awt/Button;
.field private protected cancelButton Ljava/awt/Button;
.field private protected label LMultiLineLabel;
.field private protected c Ljoos/lib/JoosConstants;
.field private protected p Ljava/awt/Panel;

.method public <init>(Ljava/awt/Frame;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
  .limit locals 7
  .limit stack 6
  aload_0
  aload_1
  aload_2
  iconst_1
  invokenonvirtual java/awt/Dialog/<init>(Ljava/awt/Frame;Ljava/lang/String;Z)V
  new joos/lib/JoosConstants
  dup
  invokenonvirtual joos/lib/JoosConstants/<init>()V
  aload_0
  swap
  putfield YesNoDialog/c Ljoos/lib/JoosConstants;
  aload_0
  new java/awt/BorderLayout
  dup
  ldc 15
  ldc 15
  invokenonvirtual java/awt/BorderLayout/<init>(II)V
  invokevirtual java/awt/Container/setLayout(Ljava/awt/LayoutManager;)V
  new MultiLineLabel
  dup
  aload_3
  ldc 20
  ldc 20
  invokenonvirtual MultiLineLabel/<init>(Ljava/lang/String;II)V
  aload_0
  swap
  putfield YesNoDialog/label LMultiLineLabel;
  new joos/lib/JoosContainer
  dup
  aload_0
  invokenonvirtual joos/lib/JoosContainer/<init>(Ljava/awt/Container;)V
  ldc "Center"
  aload_0
  getfield YesNoDialog/label LMultiLineLabel;
  invokevirtual joos/lib/JoosContainer/addString(Ljava/lang/String;Ljava/awt/Component;)Ljava/awt/Component;
  pop
  new java/awt/Panel
  dup
  invokenonvirtual java/awt/Panel/<init>()V
  aload_0
  swap
  putfield YesNoDialog/p Ljava/awt/Panel;
  aload_0
  getfield YesNoDialog/p Ljava/awt/Panel;
  new java/awt/FlowLayout
  dup
  aload_0
  getfield YesNoDialog/c Ljoos/lib/JoosConstants;
  invokevirtual joos/lib/JoosConstants/FLOWLAYOUT_CENTER()I
  ldc 15
  ldc 15
  invokenonvirtual java/awt/FlowLayout/<init>(III)V
  invokevirtual java/awt/Container/setLayout(Ljava/awt/LayoutManager;)V
  aload 4
  aconst_null
  if_acmpeq stop_0
  aload_0
  getfield YesNoDialog/p Ljava/awt/Panel;
  new java/awt/Button
  dup
  aload 4
  invokenonvirtual java/awt/Button/<init>(Ljava/lang/String;)V
  dup
  aload_0
  swap
  putfield YesNoDialog/yesButton Ljava/awt/Button;
  invokevirtual java/awt/Container/add(Ljava/awt/Component;)Ljava/awt/Component;
  pop
  stop_0:
  aload 5
  aconst_null
  if_acmpeq stop_3
  aload_0
  getfield YesNoDialog/p Ljava/awt/Panel;
  new java/awt/Button
  dup
  aload 5
  invokenonvirtual java/awt/Button/<init>(Ljava/lang/String;)V
  dup
  aload_0
  swap
  putfield YesNoDialog/noButton Ljava/awt/Button;
  invokevirtual java/awt/Container/add(Ljava/awt/Component;)Ljava/awt/Component;
  pop
  stop_3:
  aload 6
  aconst_null
  if_acmpeq stop_6
  aload_0
  getfield YesNoDialog/p Ljava/awt/Panel;
  new java/awt/Button
  dup
  aload 6
  invokenonvirtual java/awt/Button/<init>(Ljava/lang/String;)V
  dup
  aload_0
  swap
  putfield YesNoDialog/cancelButton Ljava/awt/Button;
  invokevirtual java/awt/Container/add(Ljava/awt/Component;)Ljava/awt/Component;
  pop
  stop_6:
  new joos/lib/JoosContainer
  dup
  aload_0
  invokenonvirtual joos/lib/JoosContainer/<init>(Ljava/awt/Container;)V
  ldc "South"
  aload_0
  getfield YesNoDialog/p Ljava/awt/Panel;
  invokevirtual joos/lib/JoosContainer/addString(Ljava/lang/String;Ljava/awt/Component;)Ljava/awt/Component;
  pop
  aload_0
  invokevirtual java/awt/Window/pack()V
  return
.end method

.method public NO()I
  .limit locals 1
  .limit stack 1
  iconst_0
  ireturn
.end method

.method public YES()I
  .limit locals 1
  .limit stack 1
  iconst_1
  ireturn
.end method

.method public CANCEL()I
  .limit locals 1
  .limit stack 1
  iconst_1
  ineg
  ireturn
.end method

.method public action(Ljava/awt/Event;Ljava/lang/Object;)Z
  .limit locals 5
  .limit stack 3
  new joos/lib/JoosEvent
  dup
  aload_1
  invokenonvirtual joos/lib/JoosEvent/<init>(Ljava/awt/Event;)V
  astore_3
  aload_3
  invokevirtual joos/lib/JoosEvent/target()Ljava/lang/Object;
  astore 4
  aload 4
  instanceof java/awt/Button
  ifeq else_0
  aload_0
  invokevirtual java/awt/Component/hide()V
  aload_0
  invokevirtual java/awt/Window/dispose()V
  aload 4
  aload_0
  getfield YesNoDialog/yesButton Ljava/awt/Button;
  if_acmpne else_2
  aload_0
  aload_0
  invokevirtual YesNoDialog/YES()I
  invokevirtual YesNoDialog/answer(I)V
  goto stop_3
  else_2:
  aload 4
  aload_0
  getfield YesNoDialog/noButton Ljava/awt/Button;
  if_acmpne else_6
  aload_0
  aload_0
  invokevirtual YesNoDialog/NO()I
  invokevirtual YesNoDialog/answer(I)V
  goto stop_7
  else_6:
  aload_0
  aload_0
  invokevirtual YesNoDialog/CANCEL()I
  invokevirtual YesNoDialog/answer(I)V
  stop_7:
  stop_3:
  iconst_1
  ireturn
  else_0:
  iconst_0
  ireturn
.end method

.method public answer(I)V
  .limit locals 2
  .limit stack 2
  iload_1
  aload_0
  invokevirtual YesNoDialog/YES()I
  if_icmpne else_0
  aload_0
  invokevirtual YesNoDialog/yes()V
  return
  else_0:
  iload_1
  aload_0
  invokevirtual YesNoDialog/NO()I
  if_icmpne else_4
  aload_0
  invokevirtual YesNoDialog/no()V
  return
  else_4:
  iload_1
  aload_0
  invokevirtual YesNoDialog/CANCEL()I
  if_icmpne stop_8
  aload_0
  invokevirtual YesNoDialog/cancel()V
  stop_8:
  return
.end method

.method public yes()V
  .limit locals 1
  .limit stack 0
  return
.end method

.method public no()V
  .limit locals 1
  .limit stack 0
  return
.end method

.method public cancel()V
  .limit locals 1
  .limit stack 0
  return
.end method

