Package gkarsql.utilities

Examples of gkarsql.utilities.GKarGraphElement


              elem.setRectagle(color,locX,locY,width,height);
              elements.add(elem);
          }
          private void drawLine(Graphics2D g2, int locX,int locY,int width,int height){
              g2.drawLine(locX,locY,width,height);
              GKarGraphElement elem = new GKarGraphElement();
              elem.setLine(locX,locY,width,height);
              elements.add(elem);
          }
View Full Code Here


              elements.add(elem);
          }
          private void drawString(Graphics2D g2, Font font, Color color,String str, int left,int bottom){
              g2.setColor(color);
              g2.drawString(str, left, bottom);
              GKarGraphElement elem = new GKarGraphElement();
              elem.setString(font,color,str,left,bottom);
              elements.add(elem);
          }
View Full Code Here

              int width = 9*str.length();
              int height = size+6;
              drawRect(g2,Color.BLACK,locX-1,locY-1,width+2,height+2);
              drawRect(g2,Color.YELLOW,locX,locY,width,height);
              drawString(g2,font,Color.BLACK,str, left, bottom);
              GKarGraphElement elem = new GKarGraphElement();
              elem.setElement("table", str, locX, locY, locX+width, locY+height);
              elements.add(elem);
          }
View Full Code Here

            ResultSet rsTab = oraConn.executeStatement("select * from user_constraints where constraint_name='"+constraintName+"'");
            rsTab.next();
            String tName = rsTab.getString("TABLE_NAME");
            display(g2,tName,size,left,top);
            drawString(g2,new Font("DialogInput", Font.PLAIN, 8),Color.BLUE,constraintName,3+left-hDistance,top-3);
              GKarGraphElement elem = new GKarGraphElement();
              elem.setElement("constraint",constraintName, 3+left-hDistance, top-10, 3+left, top);
              elements.add(elem);
            drawLine(g2,left+2-hDistance,lineTop,left+2-hDistance,top);
            drawLine(g2,left+2-hDistance,top,left-3,top);
            ResultSet rs = oraConn.executeStatement("select a.* from user_constraints a, user_constraints b where a.constraint_type='R' and a.r_constraint_name=b.constraint_name and b.table_name='"+tName+"'");
            int sTop = top+4;
View Full Code Here

    public void theMousePressed(MouseEvent e){
        dbg("Clicked:"+e.getPoint().getX()+"-"+e.getPoint().getY());
        Iterator it = elements.iterator();
        while(it.hasNext()){
            GKarGraphElement elem = (GKarGraphElement)it.next();
            if(elem.belongsTo(e.getPoint().getX(), e.getPoint().getY())){
                dbg("Clicked: "+elem.getElementName()+" at "+e.getPoint().getX()+"-"+e.getPoint().getY());
                if(elem.getElementType().equalsIgnoreCase("constraint")){
                    gkarDisplayConstraint win = new gkarDisplayConstraint();
                    win.setOracleConnection(oraConn);
                    win.setConstraint(elem.getElementName());
                    win.setTitle(elem.getElementName());
//System.out.println(this.toString());
                    win.openWindow(this, win, true);
                    return;
                }
            }
View Full Code Here

                setBackground(Color.white);
                Graphics2D g2 = (Graphics2D)g;
                g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                Iterator iter = elements.iterator();
                while(iter.hasNext()){
                    GKarGraphElement elem = (GKarGraphElement)iter.next();
                    elem.redraw(g2);
                }
                return;
            }
            try{
                setBackground(Color.white);
View Full Code Here

            }
          }
          private void drawRect(Graphics2D g2, Color color,int locX,int locY,int width,int height){
              g2.setColor(color);
              g2.fillRect(locX,locY,width,height);
              GKarGraphElement elem = new GKarGraphElement();
              elem.setRectagle(color,locX,locY,width,height);
              elements.add(elem);
          }
View Full Code Here

TOP

Related Classes of gkarsql.utilities.GKarGraphElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.