def __init__(self, color='blue', hasBn=True):
     self.color = color
     Element.__init__(self, Element=DOM.createDiv(), StyleName=self.color)
     drawStatementBlock(self, color, hasBn)
     self.ge = GroupElement()
     self.append(self.ge)
     self.holderArguments = []
Example #2
0
 def __init__(self, text, listener, classIcon=""):
     Element.__init__(self, Element=DOM.createElement('li'), StyleName='btn')
     ClickHandler.__init__(self)
     MouseHandler.__init__(self)
     self.text = text
     self.classIcon = classIcon
     self.draw()
     if listener is not None: self.addClickListener(listener)
Example #3
0
 def __init__(self, name, color):
     Element.__init__(self, Element=DOM.createDiv())
     self.addStyleName('block')
     self.holderArguments = []
     self.ge = GroupElement()
     self.varName = name
     self.color = color
     self.dropDownVarName = None
Example #4
0
    def __init__(self, feedBack, value, **kw):
        Element.__init__(self, Element=DOM.createElement('li'), **kw)
        ClickHandler.__init__(self)
        self.value = value

        DOM.setInnerHTML(self.getElement(), _(value).replace(' ', ' '))

        self.addClickListener(self)
        self.feedBack = feedBack
 def __init__(self, arg, block, up=False):
     Element.__init__(self, Element=DOM.createDiv(), StyleName='holder')
     self.block = block
     self.up = up  #nao faz sentido aqui, passar para o argumento
     self.subBlock = None
     self.argument = arg
     self.append(self.argument)
     self.argument.addDropListener(self)
     self.argument.block = block
Example #6
0
 def __init__(self):
     Element.__init__(self,
                      Element=DOM.createDiv(),
                      StyleName='drophere2',
                      Width="100%",
                      Height="100%")
     DropWidget.__init__(self)
     DragContainer.__init__(self)
     self.setID('hardwares_pad')
Example #7
0
 def __init__(self, accepts, **kw):
     Element.__init__(self, Element=DOM.createDiv(), **kw)
     DropHandler.__init__(self)
     DragContainer.__init__(self)
     self.addDropListener(self)
     self.accepts = accepts
     self.addStyleName('argument')
     self.enable = True
     self.block = None
 def __init__(self, text, group, groupLabel, block):
     Element.__init__(self, Element=DOM.createElement('code'), StyleName='group_operation')
     ClickHandler.__init__(self)
     self.addClickListener(self)
     self.text = text
     self.group = group
     self.groupLabel = groupLabel
     self.block = block
     self.draw()
 def __init__(self, popupEditorBlock=False):
     Element.__init__(self,
                      Element=DOM.createDiv(),
                      StyleName='drophere2',
                      Width="100%",
                      Height="100%")
     DropWidget.__init__(self)
     DragContainer.__init__(self)
     self.setID('blocks_pad')
     self.popupEditorBlock = popupEditorBlock  # dado um determinado pad, saber qual � seu popup
Example #10
0
 def __init__(self, name, text, mode, listBlockName=[], original=True):
     Element.__init__(self, Element=DOM.createDiv())
     DragWidget.__init__(self)
     self.original = original
     self.name = name
     self.text = text
     self.mode = mode
     self.listBlockName = listBlockName
     self.number = None
     drawComponentBlock(self)
     self.argumentList = []
Example #11
0
    def __init__(self, feedBack, value, classIcon, **kw):
        Element.__init__(self, Element=DOM.createElement('li'), **kw)
        ClickHandler.__init__(self)
        self.classIcon = classIcon
        self.value = value

        self.icon = Element(Element=DOM.createElement("i"),
                            StyleName=classIcon)
        self.add(self.icon)
        self.title = Element(Element=DOM.createSpan(), StyleName='title')

        DOM.setInnerHTML(self.title.getElement(), self.value)
        self.add(self.title)

        self.addClickListener(self)
        self.feedBack = feedBack
Example #12
0
 def __init__(self,
              text,
              menuClick,
              itemClick,
              classIcon="",
              rootPanel=None,
              **kw):
     Element.__init__(self, Element=DOM.createElement('li'), **kw)
     ClickHandler.__init__(self)
     MouseHandler.__init__(self)
     self.text = text
     self.itemClick = itemClick
     self.menuClick = menuClick
     self.addClickListener(self)
     self.classIcon = classIcon
     self.rootPanel = rootPanel
     self.draw()
Example #13
0
 def __init__(self, name, blockType, original=True, **kw):
     Element.__init__(self, Element=DOM.createDiv(), **kw)
     DragWidget.__init__(self)
     ClickHandler.__init__(self)
     MouseHandler.__init__(self)
     self.blockType = blockType
     self.addStyleName('block')
     self.ge = GroupElement()
     self.addDoubleClickListener(self)
     self.addMouseListener(self)
     self.holderArguments = []
     self.holderSiblingUp = None
     self.holderSiblingDown = None
     self.holderChildren = []
     self.isStartingDrag = False
     self.original = original  # identifica se o bloco sera copiado ou movido quando arrastado
     self.name = name  # nome do metodo que criou o bloco
     self.varName = ''  #nome da variavel OU #nome do bloco
     self.componetHardware = None  # nome do harware correspondente, p tratamento de erro
     self.dropDownVarName = None  # combobox para escolher a var ou o comp
     self.color = None
     self.blockPad = None
     self.custom = False  # indica se o bloco eh um bloco personalizado
     self.buttonRightDown = None
Example #14
0
 def __init__(self, arg, block):
     Element.__init__(self, Element=DOM.createDiv())
     self.argument = arg
     self.append(arg)
Example #15
0
 def __init__(self, component, mode, label='', **kw):
     Element.__init__(self, Element=DOM.createElement('li'), **kw)
     self.text = 'selecionar pino'
     self.label = label
     drawDropdownPin(self)
Example #16
0
 def __init__(self, name, text, mode):
     Element.__init__(self, Element=DOM.createDiv())
     self.name = name
     self.text = text
     self.mode = mode
     drawComponentBlock(self)
Example #17
0
 def __init__(self):
     Element.__init__(self, Element=DOM.createDiv())
     drawBooleanArgument(self)
Example #18
0
 def __init__(self):
     Element.__init__(self, Element=DOM.createDiv())
     drawNumberArgument(self, '')
Example #19
0
 def __init__(self, **kw):
     Element.__init__(self, Element=DOM.createDiv(), **kw)
     DragWidget.__init__(self)
Example #20
0
 def __init__(self):
     Element.__init__(self,
                      Element=DOM.createTable(),
                      StyleName='line_table')
     self.draw()
     self.subElements = []
 def __init__(self, feedBack, **kw):
     Element.__init__(self, Element=DOM.createDiv(), **kw)
     MouseHandler.__init__(self)
     self.addMouseListener(self)
     self.feedBack = feedBack