|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
tecgraf.javautils.gui.calendar.CalendarPanel
public class CalendarPanel
Componente visual para calendário.
Pode ser usado como um painel ou como um JDialog
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
CalendarPanel()
Construtor |
|
CalendarPanel(Locale locale)
Construtor |
|
| Method Summary | |
|---|---|
void |
addCalendarListener(CalendarListener listener)
Adiciona um listener |
Color |
getActualMonthForeground()
Obtém a cor de texto dos dias do mês corrente |
Color |
getCalendarBackground()
Obtém a cor de fundo do calendário |
Color |
getOtherMonthForeground()
Obtém a cor de texto dos dias do mês não corrente |
long |
getSelectedDate()
Obtém a data selecionada |
Color |
getTitleBackground()
Obtém a cor de fundo do texto para mês, ano e botões de retroceder e avançar |
Color |
getTitleForeground()
Obtém a cor do texto para mês, ano e botões de retroceder e avançar |
boolean |
isButtonsVisible()
Indica se os botões estão visíveis. |
boolean |
isCurrentMonthOnly()
Verifica se apenas os dias do mês corrente estão sendo exibidos |
void |
nextMonth()
Ação para avançar um mês. |
void |
nextYear()
Ação para avançar um ano. |
void |
previewMonth()
Ação para retroceder um mês. |
void |
previewYear()
Ação para retroceder um ano. |
void |
removeCalendarListener(CalendarListener listener)
Remove um listener |
void |
setActualMonthForeground(Color actualMonthForeground)
Seta a cor de texto dos dias do mês corrente |
void |
setButtonsVisible(boolean visible)
Seta a visibilidade dos botões. |
void |
setCalendarBackground(Color calendarBackground)
Seta a cor de fundo do calendário |
void |
setCurrentMonthOnly(boolean currentMonthOnly)
Seta se apenas os dias do mês corrente devem ser exibidos. |
void |
setOtherMonthForeground(Color otherMonthForeground)
Seta a cor de texto dos dias do mês não corrente |
void |
setSelectedDate(long date)
Seta uma data como selecionada |
void |
setTitleBackground(Color titleBackground)
Seta a cor de fundo do texto para mês, ano e botões de retroceder e avançar |
void |
setTitleForeground(Color titleForeground)
Seta a cor do texto para mês, ano e botões de retroceder e avançar |
Long |
showAsDialog(JFrame owner,
String title,
Component comp)
Exibe um JDialog com o calendário. |
Long |
showAsDialog(JFrame owner,
String title,
String confirmButtonTitle,
String cancelButtonTitle,
Component comp)
Exibe um JDialog com o calendário. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CalendarPanel()
public CalendarPanel(Locale locale)
locale - Locale para o idioma| Method Detail |
|---|
public void previewYear()
public void nextYear()
public void nextMonth()
public void previewMonth()
public void setButtonsVisible(boolean visible)
visible - booleanpublic boolean isButtonsVisible()
public boolean isCurrentMonthOnly()
public long getSelectedDate()
public void setCurrentMonthOnly(boolean currentMonthOnly)
currentMonthOnly - booleanpublic Color getTitleBackground()
Colorpublic void setTitleBackground(Color titleBackground)
titleBackground - Colorpublic Color getTitleForeground()
Colorpublic void setTitleForeground(Color titleForeground)
titleForeground - Colorpublic Color getActualMonthForeground()
Colorpublic void setActualMonthForeground(Color actualMonthForeground)
actualMonthForeground - Colorpublic Color getOtherMonthForeground()
Colorpublic void setOtherMonthForeground(Color otherMonthForeground)
otherMonthForeground - Colorpublic Color getCalendarBackground()
Colorpublic void setCalendarBackground(Color calendarBackground)
calendarBackground - Colorpublic void setSelectedDate(long date)
date - Data em milisegundos
public Long showAsDialog(JFrame owner,
String title,
String confirmButtonTitle,
String cancelButtonTitle,
Component comp)
JDialog com o calendário.
owner - JFrametitle - Título para o dialogconfirmButtonTitle - Título para o botão de confirmarcancelButtonTitle - Título para o botão de cancelar ou
NULL para não ter botão de cancelar.comp - Component usado para localizar o JDialog na tela ou
NULL para ser centralizado na tela.
Long com a data em milisegundos ou NULL caso
o JDialog seja fechado sem escolher nenhum valor.
public Long showAsDialog(JFrame owner,
String title,
Component comp)
JDialog com o calendário. O clique num dia fechará o JDialog
retornando a data escolhida.
owner - JFrametitle - Título para o dialogcomp - Component usado para localizar o JDialog na tela ou
NULL para ser centralizado na tela.
Long com a data em milisegundos ou NULL caso
o JDialog seja fechado sem escolher nenhum valor.public void addCalendarListener(CalendarListener listener)
listener - CalendarListenerpublic void removeCalendarListener(CalendarListener listener)
listener - CalendarListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||