persistance.wGlobalParam
Class Gp

Object
  extended by persistance.wGlobalParam.Gp
All Implemented Interfaces:
KeyEventPostProcessor

public class Gp
extends Object
implements KeyEventPostProcessor

Entretien les variables globales dynamiques de l'appli
Cet objet est le connecteur a la base de données
Il propose aussi des routines static usuelles transverses

On y accède par le biais de Sql
__________________________________________________________________________________
A_doc
Licence.


Field Summary
static String ABCSOFT
           
static String AIMAGES
           
 AbstractDefaultParam appliParam
           
static AbstractDefaultParam APPLIPARAM
           
 String base
           
static String BEFOREMAINCHOICEMENU
           
static Color BLEU_FG
           
 CodeBarre codeBarres
           
static String ConsoleErr
           
static String ConsoleOut
           
 boolean dblisteTrace
           
static String DEFAULTUSER
           
static String DEVFILE
           
static String DEVNUMM
           
 JFrame f_mf
           
 int f_mfHeight
           
 int f_mfWidth
           
 JPanelImage f_mjpc
           
 JStatusBar f_mjStatusBar
           
static Color FILIGRANE_LGRAY
           
static Font FONTBOLD
           
static Font FONTMENU
           
static Font FONTNORMAL
           
static Font FONTTEXT
           
static Font FONTTEXT10
           
static Font FONTTEXT11
           
static Font FONTTEXT12
           
static Font FONTTEXT13
           
static Font FONTTEXT14
           
static Font FONTTEXT15
           
static Font FONTTEXT16
           
static Font FONTTEXT18
           
static Font FONTTEXT9
           
static int FONTTEXTTYPE
           
static int G_DETAIL
           
static int G_DETAILENTETE
           
static int G_DETAILPIED
           
static int G_FICHE
           
static int G_FICHEENTETE
           
static int G_FICHEPIED
           
static int G_LISTE
           
static int G_LISTEENTETE
           
static int G_LISTEPIED
           
static int G_TITRE
           
static GridBagConstraints gbc
           
 Gp gp
           
 Gp gpAbc
           
static int HEIGHTCHAR
           
static int HEIGHTTEXT
           
static String HOME
           
 ImpDot impdots
           
static int INSETCHAR
           
static Color INVALIDE_FG_RED
           
 boolean ISCTRL_MASK
           
 boolean ISDEVFILE
           
 boolean ISSHIFT_MASK
           
static int JPGCENTER
           
static int JPGFILL
           
static int JPGGRADIENT
           
static int JPGNULL
           
static int JPGTEXTURE
           
static Color LABEL_BORDER
           
static Color LABEL_FG_BLACK
           
 DbVue lastDbVue
           
static String LICENCE
           
static String LINEFEED
           
 char m_a
           
 String m_c_opt2
           
 String m_c_opt3
           
 int m_flagMenuMain
           
 JMenu m_jmemu
           
 JMenuBar m_jmenubar
           
 String m_menu
           
 String m_menuMain
           
 String m_option
           
 String m_optionText
           
 String m_user
           
static String MAINCHOICEMENU
           
static int MARGEMINI
           
static int MAXFIELDS
           
static Color MOVE_BG_LRED
           
static Color MOVE_BG_LVERT
           
static int MYSQL
           
static String NAME
           
(package private) static Object o
           
static Color ORANGE_FG
           
static Color PANELVUE_BG
           
static int PROTECTDECALAGE
           
static int PROTECTDECALAGEKEY
           
static String PROTECTDEMO
           
static String PROTECTFIELD
           
static String PROTECTKEY
           
static int PROTECTMAXLINE
           
 boolean sllisteTrace
           
 Sql sql
           
 Sql sqlAbc
           
static int SQLITE
           
(package private)  java.util.ArrayList<Sql> sqls
           
 boolean sqlTrace
           
 String sqlTraceFiche
           
 int sqltype
           
(package private) static Sql Ssql
           
static boolean TITLE
           
static int TITLESIZE
           
static boolean TOOLTIP
           
static double TOOLTIPDELAY
           
static double TOOLTIPINITIALDELAY
           
static int TOTAUXSIZE
           
 boolean uiTrace
           
static Color UPDATE_BG_JAUNE
           
 String url
           
static boolean USEBUTTONICONE
           
static boolean USEFRAMETEXTURE
           
static boolean USEPANELGRADIENT
           
static boolean USEPANELVUE
           
static String USERDIR
           
static boolean USEROUNDEDBORDER
           
static Color VERTFONCE_FG
           
static int WIDTHCHAR
           
 
Constructor Summary
Gp(int sqltype, String url, String base)
           
 
Method Summary
static void ad(char a)
           
static void ad(Object o)
           
static GridBagLayout adaptePanelButtonVertical()
           
static GridBagLayout adaptePanelC()
           
static GridBagLayout adaptePanelE()
           
static GridBagLayout adaptePanelL()
           
static GridBagLayout adaptePanelP()
           
 void addDbVue()
           
static void addSeparator(JPanel jpDbE, String titre)
          Ajout d'un séparateur horizonthal dans le panel principal de saisie
static void addSeparator2(JPanel jpDbT)
           
 void addSql(Sql sql)
           
static void af()
           
static void af(int nbTrace, Object strDebug)
           
static void af(Object o)
           
 void applyPreferences(String user)
           
static int[] arrayStringToInt(String str)
           
 void catchKeyboard()
           
 void clearContainer(Container container, boolean racine)
           
 void clearMainFrame(boolean clearAide)
           
 void closeCodeBarre()
          Ferme les codes barres sur port com
 void closeImpdot()
          Ferme les imprimantes thermiques sur port com
static void debugSpyFocus()
           
static void dispatchEvent(Component c, java.awt.event.KeyEvent e)
           
static double doubleRound(double value, int n)
           
static AbstractDefaultParam getAppliParam(String namePackage)
           
static javax.swing.border.Border getBorder(javax.swing.border.Border bd, Color color)
           
static javax.swing.border.Border getBorder(Color color)
           
 Ms1204 getCodeBarreMs1204(int num)
           
 String getdecah(String decamehex)
           
static JTextDb getEmptyLabel(String str)
           
static long getFileLastModified(String path)
           
static GridBagConstraints getGbcDetail()
           
static GridBagConstraints getGbcDetailEntete()
           
static GridBagConstraints getGbcDetailPied(int indice)
           
static GridBagConstraints getGbcFiche()
           
static GridBagConstraints getGbcFicheEntete()
           
static GridBagConstraints getGbcFichePied()
           
static GridBagConstraints getGbcListe()
           
static GridBagConstraints getGbcListeEntete()
           
static GridBagConstraints getGbcListePied()
           
static GridBagConstraints getGbcTitre()
           
 String geth()
           
 Image getImage(String name, boolean transp)
           
 String getImpDotDriver(int num)
           
 Serial getImpDotSerial(int num)
           
static Color getPanelBackground()
           
 JPanel getPanelTitleMenuOptionText()
           
static Insets getScreenInsets()
           
static Dimension getScreenSize()
           
static StackTraceElement[] getTrace()
           
static GridBagConstraints getx()
           
static GridBagConstraints gety()
           
 java.awt.image.BufferedImage grayedImage(java.awt.image.BufferedImage colorImage)
           
 Icon ImageIcon(Image img, int coef)
           
 void initCbParamUser(String ms1204_port, int num, boolean beepInit)
          Initialise le Codes Barre
a) paramétre le port com
b) reprogramme le CB
c) éteint le faisceau
e) Reste en disponibilité
 void initImpDotParamUser(String impdot_port, int num, String impdot_driver)
          Init Imprimantes thermiques sur port com
 boolean isCodeBarre(int num)
          Code barre sur port com présent
 boolean isCtrlMask()
           
static boolean isFileExists(String path)
           
 boolean isImpDot(int num)
          Imprimantes thermiques sur port com présentes
static boolean isInf(String s1, String s2)
           
static boolean isInfOrEqual(String s1, String s2)
           
 boolean isShiftMask()
           
static boolean isSup(String s1, String s2)
           
static boolean isSupOrEqual(String s1, String s2)
           
 boolean isTcetorp()
           
static void keyb(int[] keyb)
           
static void keybAlt(int[] keyb)
           
static void listKeyUiManager(String strkey)
           
 void loadMenu()
           
static Gp mainDebut(String namePackage)
           
 Image makeColorTransparent(Image im, Color color)
           
 void mapUser()
           
static void MB(Object o)
           
static void MB(Sql sql, Object o)
           
 int notify(String titre, String mess, Object[] option, String nameImage, int defOption)
           
static void paintTriangle(Graphics g, int x, int y, int size, int direction, int type)
           
static double parseDouble(String value)
           
static int parseInt(String value)
           
 boolean postProcessKeyEvent(java.awt.event.KeyEvent e)
           
static void quit()
           
static String[] readParamFromFile(String file, int nbParam)
           
 void removeDbVue(boolean enable)
           
 String restoreLastUserFromSystem()
           
 void saveLastUserToSystem(String user)
           
static void setBackgroundGradient(Graphics g, Component component, int value, boolean sens)
           
 void setColorFonce()
           
static void setConsoleDebug(boolean enable)
           
static void setConsoleErr(boolean enable)
           
 void setCursorWait(boolean enabled)
           
static void setFill(int fill)
           
 void setFrameTexture()
           
static void setHeight(int height)
           
 void setIcon(Window jw)
           
static void setLabelTitre(JLabel jl)
           
 void setMainTitle()
           
static void setRelativeLocation(Container cont, Point p, Dimension dim)
           
static void setSeparatorVisible(JPanel jpDbT, String titre, boolean enable)
           
 void setSizePanel(JPanel jp, int width, int height)
           
 void setTcetorp()
           
static void setWidth(int width)
           
static void setx(int gridx)
           
static void setxy(int gridx, int gridy)
           
static void sety(int gridy)
           
 java.awt.image.BufferedImage toBufferedImage(Image imag)
           
 void zoomIn(Container cont, int step)
           
 void zoomOut(Container cont, int step)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APPLIPARAM

public static AbstractDefaultParam APPLIPARAM

NAME

public static String NAME

HOME

public static String HOME

USERDIR

public static String USERDIR

AIMAGES

public static String AIMAGES

ABCSOFT

public static String ABCSOFT

LICENCE

public static String LICENCE

LABEL_BORDER

public static final Color LABEL_BORDER

LABEL_FG_BLACK

public static final Color LABEL_FG_BLACK

FILIGRANE_LGRAY

public static final Color FILIGRANE_LGRAY

UPDATE_BG_JAUNE

public static final Color UPDATE_BG_JAUNE

INVALIDE_FG_RED

public static final Color INVALIDE_FG_RED

HEIGHTCHAR

public static final int HEIGHTCHAR
See Also:
Constant Field Values

WIDTHCHAR

public static final int WIDTHCHAR
See Also:
Constant Field Values

MARGEMINI

public static final int MARGEMINI
See Also:
Constant Field Values

INSETCHAR

public static final int INSETCHAR
See Also:
Constant Field Values

HEIGHTTEXT

public static final int HEIGHTTEXT
See Also:
Constant Field Values

LINEFEED

public static final String LINEFEED
See Also:
Constant Field Values

ISDEVFILE

public boolean ISDEVFILE

appliParam

public AbstractDefaultParam appliParam

sqlTrace

public boolean sqlTrace

sqlTraceFiche

public String sqlTraceFiche

uiTrace

public boolean uiTrace

dblisteTrace

public boolean dblisteTrace

sllisteTrace

public boolean sllisteTrace

ISCTRL_MASK

public boolean ISCTRL_MASK

ISSHIFT_MASK

public boolean ISSHIFT_MASK

f_mf

public JFrame f_mf

f_mfWidth

public int f_mfWidth

f_mfHeight

public int f_mfHeight

f_mjpc

public JPanelImage f_mjpc

JPGCENTER

public static final int JPGCENTER
See Also:
Constant Field Values

JPGTEXTURE

public static final int JPGTEXTURE
See Also:
Constant Field Values

JPGFILL

public static final int JPGFILL
See Also:
Constant Field Values

JPGGRADIENT

public static final int JPGGRADIENT
See Also:
Constant Field Values

JPGNULL

public static final int JPGNULL
See Also:
Constant Field Values

f_mjStatusBar

public JStatusBar f_mjStatusBar

m_jmenubar

public JMenuBar m_jmenubar

m_menuMain

public String m_menuMain

m_user

public String m_user

m_flagMenuMain

public int m_flagMenuMain

BEFOREMAINCHOICEMENU

public static final String BEFOREMAINCHOICEMENU
See Also:
Constant Field Values

MAINCHOICEMENU

public static final String MAINCHOICEMENU
See Also:
Constant Field Values

m_jmemu

public JMenu m_jmemu

m_menu

public String m_menu

m_option

public String m_option

m_c_opt2

public String m_c_opt2

m_c_opt3

public String m_c_opt3

m_optionText

public String m_optionText

m_a

public char m_a

gpAbc

public Gp gpAbc

gp

public Gp gp

sqlAbc

public Sql sqlAbc

sql

public Sql sql

sqls

java.util.ArrayList<Sql> sqls

G_TITRE

public static final int G_TITRE
See Also:
Constant Field Values

G_LISTEENTETE

public static final int G_LISTEENTETE
See Also:
Constant Field Values

G_LISTE

public static final int G_LISTE
See Also:
Constant Field Values

G_LISTEPIED

public static final int G_LISTEPIED
See Also:
Constant Field Values

G_FICHEENTETE

public static final int G_FICHEENTETE
See Also:
Constant Field Values

G_FICHE

public static final int G_FICHE
See Also:
Constant Field Values

G_FICHEPIED

public static final int G_FICHEPIED
See Also:
Constant Field Values

G_DETAILENTETE

public static final int G_DETAILENTETE
See Also:
Constant Field Values

G_DETAIL

public static final int G_DETAIL
See Also:
Constant Field Values

G_DETAILPIED

public static final int G_DETAILPIED
See Also:
Constant Field Values

PROTECTFIELD

public static final String PROTECTFIELD
See Also:
Constant Field Values

PROTECTMAXLINE

public static final int PROTECTMAXLINE
See Also:
Constant Field Values

PROTECTDEMO

public static final String PROTECTDEMO
See Also:
Constant Field Values

PROTECTDECALAGE

public static final int PROTECTDECALAGE
See Also:
Constant Field Values

PROTECTDECALAGEKEY

public static final int PROTECTDECALAGEKEY
See Also:
Constant Field Values

PROTECTKEY

public static final String PROTECTKEY
See Also:
Constant Field Values

DEVFILE

public static final String DEVFILE
See Also:
Constant Field Values

DEVNUMM

public static final String DEVNUMM
See Also:
Constant Field Values

DEFAULTUSER

public static final String DEFAULTUSER
See Also:
Constant Field Values

codeBarres

public CodeBarre codeBarres

impdots

public ImpDot impdots

ConsoleErr

public static String ConsoleErr

ConsoleOut

public static String ConsoleOut

gbc

public static GridBagConstraints gbc

TOOLTIP

public static boolean TOOLTIP

TOOLTIPINITIALDELAY

public static double TOOLTIPINITIALDELAY

TOOLTIPDELAY

public static double TOOLTIPDELAY

TITLESIZE

public static int TITLESIZE

TITLE

public static boolean TITLE

TOTAUXSIZE

public static int TOTAUXSIZE

FONTNORMAL

public static final Font FONTNORMAL

FONTBOLD

public static final Font FONTBOLD

FONTTEXTTYPE

public static int FONTTEXTTYPE

FONTTEXT

public static Font FONTTEXT

FONTTEXT9

public static Font FONTTEXT9

FONTTEXT10

public static Font FONTTEXT10

FONTTEXT11

public static Font FONTTEXT11

FONTTEXT12

public static Font FONTTEXT12

FONTTEXT13

public static Font FONTTEXT13

FONTTEXT14

public static Font FONTTEXT14

FONTTEXT15

public static Font FONTTEXT15

FONTTEXT16

public static Font FONTTEXT16

FONTTEXT18

public static Font FONTTEXT18

FONTMENU

public static Font FONTMENU

USEFRAMETEXTURE

public static boolean USEFRAMETEXTURE

USEBUTTONICONE

public static boolean USEBUTTONICONE

BLEU_FG

public static Color BLEU_FG

ORANGE_FG

public static Color ORANGE_FG

VERTFONCE_FG

public static Color VERTFONCE_FG

MOVE_BG_LVERT

public static Color MOVE_BG_LVERT

MOVE_BG_LRED

public static Color MOVE_BG_LRED

PANELVUE_BG

public static Color PANELVUE_BG

USEROUNDEDBORDER

public static boolean USEROUNDEDBORDER

USEPANELVUE

public static boolean USEPANELVUE

USEPANELGRADIENT

public static boolean USEPANELGRADIENT

lastDbVue

public DbVue lastDbVue

SQLITE

public static final int SQLITE
See Also:
Constant Field Values

MYSQL

public static final int MYSQL
See Also:
Constant Field Values

MAXFIELDS

public static final int MAXFIELDS
See Also:
Constant Field Values

sqltype

public int sqltype

base

public String base

url

public String url

o

static Object o

Ssql

static Sql Ssql
Constructor Detail

Gp

public Gp(int sqltype,
          String url,
          String base)
Method Detail

setIcon

public void setIcon(Window jw)

getImage

public Image getImage(String name,
                      boolean transp)

makeColorTransparent

public Image makeColorTransparent(Image im,
                                  Color color)

ImageIcon

public Icon ImageIcon(Image img,
                      int coef)

toBufferedImage

public java.awt.image.BufferedImage toBufferedImage(Image imag)

grayedImage

public java.awt.image.BufferedImage grayedImage(java.awt.image.BufferedImage colorImage)

setBackgroundGradient

public static void setBackgroundGradient(Graphics g,
                                         Component component,
                                         int value,
                                         boolean sens)

paintTriangle

public static void paintTriangle(Graphics g,
                                 int x,
                                 int y,
                                 int size,
                                 int direction,
                                 int type)

setColorFonce

public void setColorFonce()

applyPreferences

public void applyPreferences(String user)

mainDebut

public static Gp mainDebut(String namePackage)

getAppliParam

public static AbstractDefaultParam getAppliParam(String namePackage)

mapUser

public void mapUser()

loadMenu

public void loadMenu()

setMainTitle

public void setMainTitle()

restoreLastUserFromSystem

public String restoreLastUserFromSystem()

saveLastUserToSystem

public void saveLastUserToSystem(String user)

setFrameTexture

public void setFrameTexture()

listKeyUiManager

public static void listKeyUiManager(String strkey)

getScreenSize

public static Dimension getScreenSize()

getScreenInsets

public static Insets getScreenInsets()

setRelativeLocation

public static void setRelativeLocation(Container cont,
                                       Point p,
                                       Dimension dim)

getPanelBackground

public static Color getPanelBackground()

setSizePanel

public void setSizePanel(JPanel jp,
                         int width,
                         int height)

getPanelTitleMenuOptionText

public JPanel getPanelTitleMenuOptionText()

clearMainFrame

public void clearMainFrame(boolean clearAide)

addSql

public void addSql(Sql sql)

clearContainer

public void clearContainer(Container container,
                           boolean racine)

adaptePanelC

public static GridBagLayout adaptePanelC()

adaptePanelButtonVertical

public static GridBagLayout adaptePanelButtonVertical()

adaptePanelL

public static GridBagLayout adaptePanelL()

adaptePanelP

public static GridBagLayout adaptePanelP()

adaptePanelE

public static GridBagLayout adaptePanelE()

setLabelTitre

public static void setLabelTitre(JLabel jl)

getBorder

public static javax.swing.border.Border getBorder(Color color)

getBorder

public static javax.swing.border.Border getBorder(javax.swing.border.Border bd,
                                                  Color color)

getEmptyLabel

public static JTextDb getEmptyLabel(String str)

getGbcTitre

public static GridBagConstraints getGbcTitre()

getGbcListe

public static GridBagConstraints getGbcListe()

getGbcListeEntete

public static GridBagConstraints getGbcListeEntete()

getGbcListePied

public static GridBagConstraints getGbcListePied()

getGbcFiche

public static GridBagConstraints getGbcFiche()

getGbcFicheEntete

public static GridBagConstraints getGbcFicheEntete()

getGbcFichePied

public static GridBagConstraints getGbcFichePied()

getGbcDetail

public static GridBagConstraints getGbcDetail()

getGbcDetailEntete

public static GridBagConstraints getGbcDetailEntete()

getGbcDetailPied

public static GridBagConstraints getGbcDetailPied(int indice)

setxy

public static void setxy(int gridx,
                         int gridy)

sety

public static void sety(int gridy)

gety

public static GridBagConstraints gety()

setx

public static void setx(int gridx)

setWidth

public static void setWidth(int width)

setHeight

public static void setHeight(int height)

getx

public static GridBagConstraints getx()

setFill

public static void setFill(int fill)

addSeparator

public static void addSeparator(JPanel jpDbE,
                                String titre)
Ajout d'un séparateur horizonthal dans le panel principal de saisie

Parameters:
jpDbE - panel principal de saisie
titre - [Titre] aligné à gauche

setSeparatorVisible

public static void setSeparatorVisible(JPanel jpDbT,
                                       String titre,
                                       boolean enable)

addSeparator2

public static void addSeparator2(JPanel jpDbT)

setTcetorp

public void setTcetorp()

isTcetorp

public boolean isTcetorp()

geth

public String geth()

getdecah

public String getdecah(String decamehex)

zoomIn

public void zoomIn(Container cont,
                   int step)

zoomOut

public void zoomOut(Container cont,
                    int step)

notify

public int notify(String titre,
                  String mess,
                  Object[] option,
                  String nameImage,
                  int defOption)

removeDbVue

public void removeDbVue(boolean enable)

addDbVue

public void addDbVue()

isSup

public static boolean isSup(String s1,
                            String s2)

isSupOrEqual

public static boolean isSupOrEqual(String s1,
                                   String s2)

isInf

public static boolean isInf(String s1,
                            String s2)

isInfOrEqual

public static boolean isInfOrEqual(String s1,
                                   String s2)

parseDouble

public static double parseDouble(String value)

parseInt

public static int parseInt(String value)

doubleRound

public static double doubleRound(double value,
                                 int n)

setConsoleErr

public static void setConsoleErr(boolean enable)

setConsoleDebug

public static void setConsoleDebug(boolean enable)

getTrace

public static StackTraceElement[] getTrace()

af

public static void af()

af

public static void af(int nbTrace,
                      Object strDebug)

af

public static void af(Object o)

ad

public static void ad(Object o)

ad

public static void ad(char a)

MB

public static void MB(Object o)

MB

public static void MB(Sql sql,
                      Object o)

initCbParamUser

public void initCbParamUser(String ms1204_port,
                            int num,
                            boolean beepInit)
Initialise le Codes Barre
a) paramétre le port com
b) reprogramme le CB
c) éteint le faisceau
e) Reste en disponibilité

Parameters:
ms1204_port - Nom du Port com
num - numéro interne
beepInit -

getCodeBarreMs1204

public Ms1204 getCodeBarreMs1204(int num)

isCodeBarre

public boolean isCodeBarre(int num)
Code barre sur port com présent


closeCodeBarre

public void closeCodeBarre()
Ferme les codes barres sur port com


initImpDotParamUser

public void initImpDotParamUser(String impdot_port,
                                int num,
                                String impdot_driver)
Init Imprimantes thermiques sur port com

Parameters:
impdot_port - Nom du port com
num - numéro interne
impdot_driver - nom du driver 8 ou 12 Dots

isImpDot

public boolean isImpDot(int num)
Imprimantes thermiques sur port com présentes


getImpDotDriver

public String getImpDotDriver(int num)

getImpDotSerial

public Serial getImpDotSerial(int num)

closeImpdot

public void closeImpdot()
Ferme les imprimantes thermiques sur port com


isFileExists

public static boolean isFileExists(String path)

getFileLastModified

public static long getFileLastModified(String path)

readParamFromFile

public static String[] readParamFromFile(String file,
                                         int nbParam)

setCursorWait

public void setCursorWait(boolean enabled)

quit

public static void quit()

arrayStringToInt

public static int[] arrayStringToInt(String str)

keyb

public static void keyb(int[] keyb)

keybAlt

public static void keybAlt(int[] keyb)

debugSpyFocus

public static void debugSpyFocus()

dispatchEvent

public static void dispatchEvent(Component c,
                                 java.awt.event.KeyEvent e)

catchKeyboard

public void catchKeyboard()

postProcessKeyEvent

public boolean postProcessKeyEvent(java.awt.event.KeyEvent e)
Specified by:
postProcessKeyEvent in interface KeyEventPostProcessor

isCtrlMask

public boolean isCtrlMask()

isShiftMask

public boolean isShiftMask()