当前位置: 首页>>代码示例>>Java>>正文


Java Resources类代码示例

本文整理汇总了Java中org.insightech.er.Resources的典型用法代码示例。如果您正苦于以下问题:Java Resources类的具体用法?Java Resources怎么用?Java Resources使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Resources类属于org.insightech.er包,在下文中一共展示了Resources类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createCombo

import org.insightech.er.Resources; //导入依赖的package包/类
public static Combo createCombo(final AbstractDialog dialog, final Composite composite, final String title, final int span) {
    if (title != null) {
        final Label label = new Label(composite, SWT.LEFT);
        label.setText(ResourceString.getResourceString(title));
    }

    final GridData gridData = new GridData();
    gridData.horizontalSpan = span;
    gridData.horizontalAlignment = GridData.FILL;
    gridData.horizontalIndent = Resources.INDENT;
    gridData.grabExcessHorizontalSpace = true;

    final Combo combo = new Combo(composite, SWT.NONE);
    combo.setLayoutData(gridData);

    ListenerAppender.addComboListener(combo, dialog, false);

    return combo;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:20,代码来源:CompositeFactory.java

示例2: createExampleLabel

import org.insightech.er.Resources; //导入依赖的package包/类
public static Label createExampleLabel(final Composite composite, final String title, final int span) {
    final Label label = new Label(composite, SWT.NONE);
    label.setText(ResourceString.getResourceString(title));

    if (span > 0) {
        final GridData gridData = new GridData();
        gridData.horizontalSpan = span;
        label.setLayoutData(gridData);
    }

    final FontData fontData = Display.getCurrent().getSystemFont().getFontData()[0];
    final Font font = Resources.getFont(fontData.getName(), 8);
    label.setFont(font);

    return label;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:17,代码来源:CompositeFactory.java

示例3: createCheckbox

import org.insightech.er.Resources; //导入依赖的package包/类
public static Button createCheckbox(final AbstractDialog dialog, final Composite composite, final String title, final boolean indent, final int span) {
    final Button checkbox = new Button(composite, SWT.CHECK);
    checkbox.setText(ResourceString.getResourceString(title));

    final GridData gridData = new GridData();

    if (span != -1) {
        gridData.horizontalSpan = span;
    }
    if (indent) {
        gridData.horizontalIndent = Resources.INDENT;
    }

    checkbox.setLayoutData(gridData);

    ListenerAppender.addCheckBoxListener(checkbox, dialog);

    return checkbox;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:20,代码来源:CompositeFactory.java

示例4: createRadio

import org.insightech.er.Resources; //导入依赖的package包/类
public static Button createRadio(final AbstractDialog dialog, final Composite composite, final String title, final int span, final boolean indent) {
    final Button radio = new Button(composite, SWT.RADIO);
    radio.setText(ResourceString.getResourceString(title));

    final GridData gridData = new GridData();

    if (span != -1) {
        gridData.horizontalSpan = span;
    }

    if (indent) {
        gridData.horizontalIndent = Resources.INDENT;
    }

    radio.setLayoutData(gridData);

    ListenerAppender.addCheckBoxListener(radio, dialog);

    return radio;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:21,代码来源:CompositeFactory.java

示例5: createContents

import org.insightech.er.Resources; //导入依赖的package包/类
@Override
protected Control createContents(final Composite parent) {
    final Composite composite = new Composite(parent, SWT.NONE);
    final GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    composite.setLayout(layout);

    final Composite buttonComposite = CompositeFactory.createChildComposite(composite, 2, 2);
    createButtonComposite(buttonComposite);

    CompositeFactory.fillLine(composite, Resources.PREFERENCE_PAGE_MARGIN_TOP);

    fileListEditor = new TemplateFileListEditor(PreferenceInitializer.TEMPLATE_FILE_LIST, ResourceString.getResourceString("label.custom.tempplate"), composite);
    fileListEditor.load();

    CompositeFactory.fillLine(composite);

    CompositeFactory.createLabel(composite, "dialog.message.template.file.store", 2);

    return composite;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:22,代码来源:TemplatePreferencePage.java

示例6: createContents

import org.insightech.er.Resources; //导入依赖的package包/类
@Override
protected Control createContents(final Composite parent) {
    final Composite composite = new Composite(parent, SWT.NONE);
    final GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    composite.setLayout(layout);

    CompositeFactory.fillLine(composite, Resources.PREFERENCE_PAGE_MARGIN_TOP);

    fileListEditor = new TranslationFileListEditor(PreferenceInitializer.TRANSLATION_FILE_LIST, ResourceString.getResourceString("label.custom.dictionary.for.translation"), composite);
    fileListEditor.load();

    CompositeFactory.fillLine(composite);

    CompositeFactory.createLabel(composite, "dialog.message.translation.file.store", 2);

    CompositeFactory.createLabel(composite, "dialog.message.translation.file.encode", 2);

    return composite;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:21,代码来源:TranslationPreferencePage.java

示例7: paint

import org.insightech.er.Resources; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void paint(final IFigure figure, final Graphics graphics, final Insets insets) {
    if (getColor() != null) {
        graphics.setForegroundColor(getColor());
    }

    tempRect.setBounds(getPaintRectangle(figure, insets));
    if (getWidth() % 2 == 1) {
        tempRect.width--;
        tempRect.height--;
    }
    tempRect.shrink(getWidth() / 2, getWidth() / 2);
    graphics.setLineWidth(1);

    int g = 9 * DELTA;
    int b = 9 * DELTA;

    for (int i = 0; i <= 5; i++) {
        final Color color = Resources.getColor(new int[] {b, g, 255});
        paint1(i, color, tempRect, graphics);

        g -= DELTA;
        b -= DELTA;
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:29,代码来源:ERDiagramLineBorder.java

示例8: createFooter

import org.insightech.er.Resources; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void createFooter() {
    final IFigure footer = new Figure();
    final BorderLayout footerLayout = new BorderLayout();
    footer.setLayoutManager(footerLayout);
    footer.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));

    final IFigure footer1 = new Figure();
    footer1.setSize(-1, 10);
    footer1.setBackgroundColor(Resources.VERY_LIGHT_GRAY);
    footer1.setOpaque(true);

    footer.add(footer1, BorderLayout.TOP);

    final IFigure footer2 = new Figure();
    footer2.setSize(-1, 7);

    footer.add(footer2, BorderLayout.BOTTOM);

    getTableFigure().add(footer, BorderLayout.BOTTOM);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:25,代码来源:FunnyStyleSupport.java

示例9: setColumnFigureColor

import org.insightech.er.Resources; //导入依赖的package包/类
protected void setColumnFigureColor(final IFigure figure, final boolean isSelectedReferenced, final boolean isSelectedForeignKey, final boolean isAdded, final boolean isUpdated, final boolean isRemoved) {
    if (isAdded) {
        figure.setBackgroundColor(Resources.ADDED_COLOR);
    } else if (isUpdated) {
        figure.setBackgroundColor(Resources.UPDATED_COLOR);
    } else if (isRemoved) {
        figure.setBackgroundColor(Resources.REMOVED_COLOR);
    }

    if (isSelectedReferenced && isSelectedForeignKey) {
        figure.setBackgroundColor(Resources.SELECTED_REFERENCED_AND_FOREIGNKEY_COLUMN);

    } else if (isSelectedReferenced) {
        figure.setBackgroundColor(Resources.SELECTED_REFERENCED_COLUMN);

    } else if (isSelectedForeignKey) {
        figure.setBackgroundColor(Resources.SELECTED_FOREIGNKEY_COLUMN);

    }

    figure.setOpaque(true);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:23,代码来源:AbstractStyleSupport.java

示例10: refreshVisuals

import org.insightech.er.Resources; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void refreshVisuals() {
    final ERDiagram element = (ERDiagram) getModel();

    final int[] color = element.getColor();

    if (color != null) {
        final Color bgColor = Resources.getColor(color);
        getViewer().getControl().setBackground(bgColor);
    }

    for (final Object child : getChildren()) {
        if (child instanceof NodeElementEditPart) {
            final NodeElementEditPart part = (NodeElementEditPart) child;
            part.refreshVisuals();
        }
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:22,代码来源:ERDiagramEditPart.java

示例11: changeFont

import org.insightech.er.Resources; //导入依赖的package包/类
protected Font changeFont(final IFigure figure) {
    final RemovedNodeElement removedNodeElement = (RemovedNodeElement) getModel();

    String fontName = removedNodeElement.getFontName();
    int fontSize = removedNodeElement.getFontSize();

    if (fontName == null) {
        final FontData fontData = Display.getCurrent().getSystemFont().getFontData()[0];
        fontName = fontData.getName();
    }
    if (fontSize <= 0) {
        fontSize = ViewableModel.DEFAULT_FONT_SIZE;
    }

    font = Resources.getFont(fontName, fontSize);

    figure.setFont(font);

    return font;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:21,代码来源:RemovedNodeElementEditPart.java

示例12: changeFont

import org.insightech.er.Resources; //导入依赖的package包/类
protected Font changeFont(final IFigure figure) {
    final NodeElement nodeElement = (NodeElement) getModel();

    String fontName = nodeElement.getFontName();
    int fontSize = nodeElement.getFontSize();

    if (Check.isEmpty(fontName)) {
        final FontData fontData = Display.getCurrent().getSystemFont().getFontData()[0];
        fontName = fontData.getName();
        nodeElement.setFontName(fontName);
    }
    if (fontSize <= 0) {
        fontSize = ViewableModel.DEFAULT_FONT_SIZE;
        nodeElement.setFontSize(fontSize);
    }

    font = Resources.getFont(fontName, fontSize);

    figure.setFont(font);

    return font;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:23,代码来源:NodeElementEditPart.java

示例13: createCombo

import org.insightech.er.Resources; //导入依赖的package包/类
public static Combo createCombo(AbstractDialog dialog, Composite composite,
		String title, int span) {
	if (title != null) {
		Label label = new Label(composite, SWT.LEFT);
		label.setText(ResourceString.getResourceString(title));
	}

	GridData gridData = new GridData();
	gridData.horizontalSpan = span;
	gridData.horizontalAlignment = GridData.FILL;
	gridData.horizontalIndent = Resources.INDENT;
	gridData.grabExcessHorizontalSpace = true;

	Combo combo = new Combo(composite, SWT.NONE);
	combo.setLayoutData(gridData);

	ListenerAppender.addComboListener(combo, dialog, false);

	return combo;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:21,代码来源:CompositeFactory.java

示例14: createExampleLabel

import org.insightech.er.Resources; //导入依赖的package包/类
public static Label createExampleLabel(Composite composite, String title,
		int span) {
	Label label = new Label(composite, SWT.NONE);
	label.setText(ResourceString.getResourceString(title));

	if (span > 0) {
		GridData gridData = new GridData();
		gridData.horizontalSpan = span;
		label.setLayoutData(gridData);
	}

	FontData fontData = Display.getCurrent().getSystemFont().getFontData()[0];
	Font font = Resources.getFont(fontData.getName(), 8);
	label.setFont(font);

	return label;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:18,代码来源:CompositeFactory.java

示例15: createCheckbox

import org.insightech.er.Resources; //导入依赖的package包/类
public static Button createCheckbox(AbstractDialog dialog,
		Composite composite, String title, boolean indent, int span) {
	Button checkbox = new Button(composite, SWT.CHECK);
	checkbox.setText(ResourceString.getResourceString(title));

	GridData gridData = new GridData();

	if (span != -1) {
		gridData.horizontalSpan = span;
	}
	if (indent) {
		gridData.horizontalIndent = Resources.INDENT;
	}

	checkbox.setLayoutData(gridData);

	ListenerAppender.addCheckBoxListener(checkbox, dialog);

	return checkbox;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:21,代码来源:CompositeFactory.java


注:本文中的org.insightech.er.Resources类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。