package polarDust.calculator;
/*
* Copyright (c) 1996 Sorin Lazareanu, All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software
* and its documentation for NON-COMMERCIAL purposes and without
* fee is hereby granted provided that this copyright notice
* appears in all copies.
*
*/
import java.awt.*;
/**
* LogoPanel02 is a container for a CutoutText object.
*
*
* The source code.
*
* @version 0.9, 1996.06.04
* @author Sorin Lazareanu
*/
public class LogoPanel02 extends Panel {
CutoutText logoLabel;
public LogoPanel02() {
super();
logoLabel = new CutoutText("Polar Dust Software ");
}
/**
* Prepares the layout of the panel
*/
public void configure(){
GridBagLayout gridBag = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
GridBagLayoutHelper aHelper;
setLayout(gridBag);
c.fill = GridBagConstraints.BOTH;
c.anchor = GridBagConstraints.CENTER;
c.insets = new Insets(2, 2, 2, 2);
aHelper = new GridBagLayoutHelper(this, gridBag, c, 1, 1);
aHelper.addComponent(0, 0, 1, 1, logoLabel);
logoLabel.start();
}
/**
* Suspends or resumes the logo threads.
* @see Event
*/
public boolean mouseUp(Event e, int iX, int iY) {
if (logoLabel.isAlive()) {
if(logoLabel.isSuspended()) logoLabel.resume();
else logoLabel.suspend();
};
return true;
}
/**
* Stops the logo thread.
*/
public void stop() {
if (logoLabel.isAlive() && !logoLabel.isSuspended())
logoLabel.stop();
}
}