first commit
This commit is contained in:
commit
14401cdf28
48 files changed
+2367
No files matched your search
@@ -0,0 +1,217 @@
|
||||
import java.awt.Color;
|
||||
import javax.swing.JOptionPane;
|
||||
public class clsProcesso
|
||||
{
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//ATRIBUTOS//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
private int pid;
|
||||
private Color cor;
|
||||
private String estado;
|
||||
private String tipo;
|
||||
private int tempo;
|
||||
private int frames;
|
||||
private int tempoUcp;
|
||||
private int tempoCriacao;
|
||||
private boolean selecionado;
|
||||
private boolean eliminado;
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//CONSTRUTOR//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
public clsProcesso()
|
||||
{
|
||||
restaurar();
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//FUNÇÕES PÚBLICAS//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//FUNÇÕES PÚBLICAS -> GETTERS AND SETTERS//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//FUNÇÕES PÚBLICAS -> GETTERS AND SETTERS -> PID//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
public void setPid(int pPid)
|
||||
{
|
||||
pid = pPid;
|
||||
}
|
||||
public String getPid()
|
||||
{
|
||||
if (pid == -1)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return Integer.toString(pid);
|
||||
}
|
||||
public int getIntPid()
|
||||
{
|
||||
return pid;
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//FUNÇÕES PÚBLICAS -> GETTERS AND SETTERS -> ELIMINADO//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
public void setEliminado(boolean pEliminado)
|
||||
{
|
||||
eliminado = pEliminado;
|
||||
}
|
||||
public boolean getEliminado()
|
||||
{
|
||||
return eliminado;
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//FUNÇÕES PÚBLICAS -> GETTERS AND SETTERS -> COR//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
public void setCor(Color pCor)
|
||||
{
|
||||
cor = pCor;
|
||||
}
|
||||
public Color getCor()
|
||||
{
|
||||
return cor;
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//FUNÇÕES PÚBLICAS -> GETTERS AND SETTERS -> ESTADO//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
public void setEstado(String pEstado)
|
||||
{
|
||||
estado = pEstado;
|
||||
}
|
||||
public String getEstado()
|
||||
{
|
||||
return estado;
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//FUNÇÕES PÚBLICAS -> GETTERS AND SETTERS -> TIPO//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
public void setTipo(String pTipo)
|
||||
{
|
||||
tipo = pTipo;
|
||||
}
|
||||
public String getTipo()
|
||||
{
|
||||
return tipo;
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//FUNÇÕES PÚBLICAS -> GETTERS AND SETTERS -> TEMPO//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
public void setTempo(int pTempo)
|
||||
{
|
||||
tempo = pTempo;
|
||||
}
|
||||
public String getTempo()
|
||||
{
|
||||
if (tempo == -1)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return Integer.toString(tempo);
|
||||
}
|
||||
public int getIntTempo()
|
||||
{
|
||||
return tempo;
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//FUNÇÕES PÚBLICAS -> GETTERS AND SETTERS -> FRAMES//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
public void setFrames(int pFrames)
|
||||
{
|
||||
frames = pFrames;
|
||||
}
|
||||
public String getFrames()
|
||||
{
|
||||
if (frames == -1)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return Integer.toString(frames);
|
||||
}
|
||||
public int getIntFrames()
|
||||
{
|
||||
return frames;
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//FUNÇÕES PÚBLICAS -> GETTERS AND SETTERS -> TEMPO UCP//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
public void setTempoUcp(int pTempoUcp)
|
||||
{
|
||||
tempoUcp = pTempoUcp;
|
||||
}
|
||||
public String getTempoUcp()
|
||||
{
|
||||
if (tempoUcp == -1)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return Integer.toString(tempoUcp);
|
||||
}
|
||||
public int getIntTempoUcp()
|
||||
{
|
||||
return tempoUcp;
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//FUNÇÕES PÚBLICAS -> GETTERS AND SETTERS -> TEMPO CRIAÇÃO//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
public void setTempoCriacao(int pTempoCriacao)
|
||||
{
|
||||
tempoCriacao = pTempoCriacao;
|
||||
}
|
||||
public String getTempoCriacao()
|
||||
{
|
||||
if (tempoCriacao == -1)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return Integer.toString(tempoCriacao);
|
||||
}
|
||||
public int getIntTempoCriacao()
|
||||
{
|
||||
return tempoCriacao;
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//FUNÇÕES PÚBLICAS -> GETTERS AND SETTERS -> SELECIONADO//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
public void setSelecionado(boolean pSelecionado)
|
||||
{
|
||||
selecionado = pSelecionado;
|
||||
}
|
||||
public boolean getSelecionado()
|
||||
{
|
||||
return selecionado;
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//FUNÇÕES PÚBLICAS -> WORK//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//FUNÇÕES PÚBLICAS -> WORK -> RESTAURAR//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
public void restaurar()
|
||||
{
|
||||
pid = -1;
|
||||
cor = Color.WHITE;
|
||||
estado = "";
|
||||
frames = -1;
|
||||
tempoUcp = -1;
|
||||
tempoCriacao = -1;
|
||||
selecionado = false;
|
||||
tipo = "";
|
||||
tempo = -1;
|
||||
eliminado = false;
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//FUNÇÕES PÚBLICAS -> WORK -> INCREMENTAR TEMPO DE CRIACAO//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
public void incrementarTempoDeCriacao()
|
||||
{
|
||||
if (pid != -1)
|
||||
{
|
||||
tempoCriacao++;
|
||||
}
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
//FUNÇÕES PÚBLICAS -> WORK -> INCREMENTAR TEMPO DE CPU//
|
||||
//--------------------------------------------------------------------------------------------------------------------------//
|
||||
public void incrementarTempoDeCpu()
|
||||
{
|
||||
tempoUcp++;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user