Adjusts cell paarmeters to match the template

	Parameters
	----------
	target_tab: Integer
	\tTable to be adjusted
	template_tab: Integer, defaults to 0
	\tTemplate table
174326
def cell_attributes_from_template(target_tab, template_tab=0):
	

	new_cell_attributes = []
	for attr in S.cell_attributes:
		if attr[1] == template_tab:
			new_attr = (attr[0], target_tab, attr[2])
			new_cell_attributes.append(new_attr)
	S.cell_attributes.extend(new_cell_attributes)

	return "Table {tab} adjusted.".format(tab=target_tab)
216526
def update_target(self, name, current, total):
        """"""
        self.refresh(self._bar(name, current, total))
290664
def adjustSizeConstraint(self):
        
        widget = self.currentWidget()
        if not widget:
            return
            
        offw = 4
        offh = 4
        
        #if self.tabBar().isVisible():
        #    offh += 20 # tab bar height
        
        minw = min(widget.minimumWidth() + offw,   MAX_INT)
        minh = min(widget.minimumHeight() + offh,  MAX_INT)
        maxw = min(widget.maximumWidth() + offw,   MAX_INT)
        maxh = min(widget.maximumHeight() + offh,  MAX_INT)
        
        self.setMinimumSize(minw, minh)
        self.setMaximumSize(maxw, maxh)
        self.setSizePolicy(widget.sizePolicy())
230840
def _refreshNodeFromTarget(self):
        
        tableModel = self.tableInspector.model

        # Disable row height and column with settings for large headers (too slow otherwise)
        if tableModel.rowCount() >= RESET_HEADERS_AT_SIZE:
            self.autoRowHeightCti.data = False
            self.model.emitDataChanged(self.autoRowHeightCti)
            self.autoRowHeightCti.enable = False
        else:
            self.autoRowHeightCti.enable = True

        if tableModel.columnCount() >= RESET_HEADERS_AT_SIZE:
            self.autoColWidthCti.data  = False
            self.model.emitDataChanged(self.autoColWidthCti)
            self.autoColWidthCti.enable = False
        else:
            self.autoColWidthCti.enable = True
1079094
def tabFileNameChanged(self, tab):
		'''
		
		'''
		if tab == self.currentTab:
			if tab.fileName:
				self.setWindowTitle("")
				if globalSettings.windowTitleFullPath:
					self.setWindowTitle(tab.fileName + '[*]')
				self.setWindowFilePath(tab.fileName)
				self.tabWidget.setTabText(self.ind, tab.getBaseName())
				self.tabWidget.setTabToolTip(self.ind, tab.fileName)
				QDir.setCurrent(QFileInfo(tab.fileName).dir().path())
			else:
				self.setWindowFilePath('')
				self.setWindowTitle(self.tr('New document') + '[*]')

			canReload = bool(tab.fileName) and not self.autoSaveActive(tab)
			self.actionSetEncoding.setEnabled(canReload)
			self.actionReload.setEnabled(canReload)
711640
public void onNewTab(final AjaxRequestTarget target, final T tab)
	{
		getTabs().add(tab);
		setSelectedTab(getTabs().size() - 1);
		target.add(this);
	}
1191978
void selectTab(final Dockable t) {
        // Remove all previously displayed children
        this.stackPane.getChildren().clear();
        //
        this.stackPane.getChildren().add(model().getModel(t.modelKey()).node());
    }
920131
def _updateTargetFromNode(self):
        
        font = self.data
        if self.familyCti.configValue:
            font.setFamily(self.familyCti.configValue)
        else:
            font.setFamily(QtGui.QFont().family()) # default family
        font.setPointSize(self.pointSizeCti.configValue)
        font.setWeight(self.weightCti.configValue)
        font.setItalic(self.italicCti.configValue)
        self._targetWidget.setFont(font)
741584
function (target) {
		var tab = this.resolveTab(target,'removeTab');
		var tabData = {
			index:   tab.tabIndex,
			caption: tab.content,
			tooltipMsg: tab.tooltipMsg,
			userId:  tab.userId,
			data:    tab.userData
		} ;
		var that = this ;
		if (tab) {
			tabData.next = function (err) {
				if (err) { throw new Error(err);   }
				else     { that.removeTab(target); }
			} ;
			this.doTabRemoveRequested( tabData ) ;
		}
	}
376658
function adjustTarget(oMessage) {
					if (oMessage.target) {
						var aSegments = oMessage.target.split("/");

						if (aSegments.shift() === sBindingParameter) {
							oMessage.target = aSegments.join("/");
							return;
						}
					}
					delete oMessage.target;
				}
990801
def bring_tab_to_the_top(self, tab_label):
        
        found = False
        for notebook in self.left_bar_notebooks:
            for i in range(notebook.get_n_pages()):
                if gui_helper_label.get_notebook_tab_title(notebook, i) == gui_helper_label.get_widget_title(tab_label):
                    found = True
                    break
            if found:
                notebook.set_current_page(i)
                break
393115
def adjustSize( self ):
        
        cell      = self.scene().cellWidth() * 2
        minheight = cell
        minwidth  = 2 * cell
        
        # fit to the grid size
        metrics = QFontMetrics(QApplication.font())
        width   = metrics.width(self.displayName()) + 20
        width   = ((width/cell) * cell) + (cell % width)
        
        height  = self.rect().height()
        
        # adjust for the icon
        icon = self.icon()
        if icon and not icon.isNull():
            width += self.iconSize().width() + 2
            height = max(height, self.iconSize().height() + 2)
        
        w = max(width, minwidth)
        h = max(height, minheight)
        
        max_w = self.maximumWidth()
        max_h = self.maximumHeight()
        
        if max_w is not None:
            w = min(w, max_w)
        if max_h is not None:
            h = min(h, max_h)
        
        self.setMinimumWidth(w)
        self.setMinimumHeight(h)
        
        self.rebuild()
774641
public void setEditorTarget (PropertyEditorTarget target)
    {
        if (target instanceof DBMetaColumnNode)
        {
            super.setEditorTarget(target);
            this.tfColumnName.setText((String)target.getAttribute(DBMetaColumnNode.ATT_COLUMN_NAME));
        }
        else
        {
            throw new UnsupportedOperationException("This editor can only edit DBMetaColumnNode objects");
        }
    }
1319526
function _findFocusCell($newTable, rowIndex, colIndex) {
  const tableData = dataHandler.createTableData($newTable);

  if (tableData[0].length - 1 < colIndex) {
    colIndex -= 1;
  }

  const cellElementIndex = dataHandler.findElementIndex(tableData, rowIndex, colIndex);

  return $newTable.find('tr').eq(cellElementIndex.rowIndex).find('td, th')[cellElementIndex.colIndex];
}
573080
function (templateCtxt, tplSource) {

            ariaUtilsJson.setValue(this._data, "locked", true);

            if (tplSource) {
                tplSource = this._data.selectedTemplate.tplSrcEdit;
            }

            // do some cleaning
            this.clearHightlight();

            // do not close if target IS the contextual menu
            if (this._mainContextual && templateCtxt.tplClasspath != this._mainContextual.CONTEXTUAL_TEMPLATE_CLASSPATH) {
                this._mainContextual.close();
            }

            // replace in this scope Aria and aria
            var oSelf = this;
            var doIt = function () {
                // var Aria = oSelf.bridge.getAria(), aria = oSelf.bridge.getAriaPackage();

                // ... and call for reload
                templateCtxt.$reload(tplSource, {
                    fn : oSelf._unlock,
                    scope : oSelf
                });
            };
            doIt();

        }
1013886
public void setActiveTab(UITab tab)
	{
		if (attachedContainer == null)
		{
			activeTab = tab;
			return;
		}

		if (activeTab == tab)
			return;

		if (activeTab != null)
			activeTab.setActive(false);

		activeTab = tab;
		if (tab == null)
			return;

		tab.setActive(true);
	}
1258771
private void adaptTabLayoutVisibility() {
        if (tabLayout != null) {
            tabLayout.setVisibility(tabLayoutShown ? View.VISIBLE : View.GONE);
        }
    }