Java Code Examples for org.jdesktop.swingx.painter.MattePainter

The following examples show how to use org.jdesktop.swingx.painter.MattePainter. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: dsworkbench   Source File: DSWorkbenchConquersFrame.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void actionPerformed(ActionEvent e) {
    if (e.getActionCommand().equals("Find")) {
        BufferedImage back = ImageUtils.createCompatibleBufferedImage(3, 3, BufferedImage.TRANSLUCENT);
        Graphics g = back.getGraphics();
        g.setColor(new Color(120, 120, 120, 120));
        g.fillRect(0, 0, back.getWidth(), back.getHeight());
        g.setColor(new Color(120, 120, 120));
        g.drawLine(0, 0, 3, 3);
        g.dispose();
        TexturePaint paint = new TexturePaint(back, new Rectangle2D.Double(0, 0, back.getWidth(), back.getHeight()));
        jxFilterPane.setBackgroundPainter(new MattePainter(paint));
        DefaultListModel model = new DefaultListModel();

        for (int i = 0; i < jConquersTable.getColumnCount(); i++) {
            TableColumnExt col = jConquersTable.getColumnExt(i);
            if (col.isVisible() && !col.getTitle().equals("Entfernung") && !col.getTitle().equals("Dorfpunkte")) {
                model.addElement(col.getTitle());
            }
        }
        jXColumnList.setModel(model);
        jXColumnList.setSelectedIndex(0);
        jxFilterPane.setVisible(true);
    }
}
 
Example 2
Source Project: dsworkbench   Source File: WelcomePanel.java    License: Apache License 2.0 6 votes vote down vote up
/** Creates new form WelcomePanel */
public WelcomePanel() {
    initComponents();
    setOpaque(true);
    welcomeTooltipMap.put(jxHelpLabel, "<html> <h2 style='color:#953333; font-weight: bold;'>Integrierte Hilfe</h2> DS Workbench bietet eine umfangreiche Hilfe, die du im Programm jederzeit &uuml;ber <strong>F1</strong> aufrufen kannst. Dabei wird versucht, das passende Hilfethema f&uuml;r die Ansicht, in der du dich gerade befindest, auszuw&auml;hlen. Es schadet aber auch nicht, einfach mal so in der Hilfe zu st&ouml;bern um neue Funktionen zu entdecken. Einsteiger sollten in jedem Fall die ersten drei Kapitel der Wichtigen Grundlagen gelesen haben.</html>");
    welcomeTooltipMap.put(jxCommunityLabel, "<html> <h2 style='color:#953333; font-weight: bold;'>Die DS Workbench Community</h2> Nat&uuml;rlich gibt es neben dir noch eine Vielzahl anderer Spieler, die DS Workbench regelm&auml;&szlig;ig und intensiv benutzen. Einen perfekten Anlaufpunkt f&uuml;r alle Benutzer bietet das DS Workbench Forum, wo man immer jemanden trifft mit dem man Erfahrungen austauschen und wo man Fragen stellen kann.</html>");
    welcomeTooltipMap.put(jxIdeaLabel, "<html> <h2 style='color:#953333; font-weight: bold;'>Verbesserungen und Ideen </h2> Gibt es irgendwas wo du meinst, dass es in DS Workbench fehlt und was anderen Benutzern auch helfen k&ouml;nnte? Hast du eine Idee, wie man DS Workbench verbessern oder die Handhabung vereinfachen k&ouml;nnte? Dann bietet dieser Bereich im DS Workbench Forum die perfekte Anlaufstelle f&uuml;r dich. Trau dich und hilf mit, DS Workbench  zu verbessern. </html>");
    welcomeTooltipMap.put(jxFacebookLabel, "<html> <h2 style='color:#953333; font-weight: bold;'>DS Workbench @ Facebook</h2> Nat&uuml;rlich geh&ouml;rt es heutzutage fast zum guten Ton, bei Facebook in irgendeiner Art und Weise vertreten zu sein. Auch DS Workbench hat eine eigene Facebook Seite, mit deren Hilfe ihr euch jederzeit &uuml;ber aktuelle News oder Geschehnisse im Zusammenhang mit DS Workbench informieren k&ouml;nnt.</html>");
    welcomeTooltipMap.put(jContentLabel, "<html> <h2 style='color:#953333'>Willkommen bei DS Workbench</h2> Wenn du diese Seite siehst, dann hast du DS Workbench erfolgreich installiert und die ersten Schritte ebenso erfolgreich gemeistert. Eigentlich steht nun einer unbeschwerten Angriffsplanung und -durchf&uuml;hrung nichts mehr im Wege. Erlaube mir trotzdem kurz auf einige Dinge hinzuweisen, die dir m&ouml;glicherweise beim <b>Umgang mit DS Workbench helfen</b> oder aber dir die M&ouml;glichkeit geben, einen wichtigen Teil zur <b>Weiterentwicklung und stetigen Verbesserung</b> dieses Programms beizutragen. Fahre einfach mit der Maus &uuml;ber eins der vier Symbole in den Ecken, um hilfreiche und interessante Informationen rund um DS Workbench zu erfahren. Klicke auf ein Symbol, um direkt zum entsprechenden Ziel zu gelangen. Die Eintr&auml;ge findest du sp&auml;ter auch im Hauptmen&uuml; unter 'Sonstiges'. <br> <h3 style='color:#953333'> Nun aber viel Spa&szlig; mit DS Workbench.</h3> </html>");
    try {
        back = ImageIO.read(WelcomePanel.class.getResource("/images/c.gif"));
    } catch (Exception ignored) {
    }
    if (back != null) {
        setBackgroundPainter(new MattePainter(new TexturePaint(back, new Rectangle2D.Float(0, 0, 200, 20))));
    }
}
 
Example 3
private void initGUI() {
	renderer = new ReflectionRenderer();
	setBackgroundPainter(new MattePainter(PaintUtils.NIGHT_GRAY, true));

	GestionnaireEvenements interactionManager = new GestionnaireEvenements(this);
	this.addMouseListener(interactionManager);
	this.addMouseMotionListener(interactionManager);
	this.addMouseWheelListener(interactionManager);

	timer = new Timer(30, e -> {
		repaint();

		xScale += xDelta;

		if (xScale > 1 || xScale < -1) {
			xDelta *= -1;

		}

		if (loop > 0 && ((int) xScale == 1 || (int) xScale == -1)) {
			timer.stop();
			launched = false;

		}
		loop++;
	});
}
 
Example 4
Source Project: dsworkbench   Source File: DSWorkbenchDistanceFrame.java    License: Apache License 2.0 5 votes vote down vote up
public void showError(String pMessage) {
    infoPanel.setCollapsed(false);
    jXLabel1.setBackgroundPainter(new MattePainter(Color.RED));
    jXLabel1.setForeground(Color.WHITE);
    jXLabel1.setText(pMessage);

}
 
Example 5
Source Project: dsworkbench   Source File: DSWorkbenchReportFrame.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void actionPerformed(ActionEvent e) {
    ReportTableTab activeTab = getActiveTab();
    if (e.getActionCommand() != null && activeTab != null) {
        if (e.getActionCommand().equals("Copy")) {
            activeTab.transferSelection(ReportTableTab.TRANSFER_TYPE.COPY_TO_INTERNAL_CLIPBOARD);
        } else if (e.getActionCommand().equals("BBCopy")) {
            activeTab.transferSelection(ReportTableTab.TRANSFER_TYPE.CLIPBOARD_BB);
        } else if (e.getActionCommand().equals("Cut")) {
            activeTab.transferSelection(ReportTableTab.TRANSFER_TYPE.CUT_TO_INTERNAL_CLIPBOARD);
        } else if (e.getActionCommand().equals("Paste")) {
            activeTab.transferSelection(ReportTableTab.TRANSFER_TYPE.FROM_INTERNAL_CLIPBOARD);
        } else if (e.getActionCommand().equals("Delete")) {
            activeTab.deleteSelection(true);
        } else if (e.getActionCommand().equals("Find")) {
            BufferedImage back = ImageUtils.createCompatibleBufferedImage(3, 3, BufferedImage.TRANSLUCENT);
            Graphics g = back.getGraphics();
            g.setColor(new Color(120, 120, 120, 120));
            g.fillRect(0, 0, back.getWidth(), back.getHeight());
            g.setColor(new Color(120, 120, 120));
            g.drawLine(0, 0, 3, 3);
            g.dispose();
            TexturePaint paint = new TexturePaint(back, new Rectangle2D.Double(0, 0, back.getWidth(), back.getHeight()));
            jxSearchPane.setBackgroundPainter(new MattePainter(paint));
            DefaultListModel model = new DefaultListModel();

            for (int i = 0; i < activeTab.getReportTable().getColumnCount(); i++) {
                TableColumnExt col = activeTab.getReportTable().getColumnExt(i);
                if (col.isVisible()) {
                    if (!col.getTitle().equals("Status") && !col.getTitle().equals("Typ") && !col.getTitle().equals("Sonstiges")) {
                        model.addElement(col.getTitle());
                    }
                }
            }
            jXColumnList.setModel(model);
            jXColumnList.setSelectedIndex(0);
            jxSearchPane.setVisible(true);
        }
    }
}
 
Example 6
Source Project: dsworkbench   Source File: DSWorkbenchConquersFrame.java    License: Apache License 2.0 5 votes vote down vote up
/**
 *
 * @param pMessage
 */
public void showError(String pMessage) {
    infoPanel.setCollapsed(false);
    jXLabel1.setBackgroundPainter(new MattePainter(Color.RED));
    jXLabel1.setForeground(Color.WHITE);
    jXLabel1.setText(pMessage);
}
 
Example 7
Source Project: dsworkbench   Source File: DSWorkbenchTroopsFrame.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void actionPerformed(ActionEvent e) {
  TroopTableTab activeTab = getActiveTab();
  if (e.getActionCommand().equals("Delete")) {
    if (activeTab != null) {
      activeTab.deleteSelection();
    }
  } else if (e.getActionCommand().equals("BBCopy")) {
    if (activeTab != null) {
      activeTab.transferSelection(TroopTableTab.TRANSFER_TYPE.CLIPBOARD_BB);
    }
  } else if (e.getActionCommand().equals("Find")) {
    BufferedImage back = ImageUtils.createCompatibleBufferedImage(3, 3, BufferedImage.TRANSLUCENT);
    Graphics g = back.getGraphics();
    g.setColor(new Color(120, 120, 120, 120));
    g.fillRect(0, 0, back.getWidth(), back.getHeight());
    g.setColor(new Color(120, 120, 120));
    g.drawLine(0, 0, 3, 3);
    g.dispose();
    TexturePaint paint = new TexturePaint(back, new Rectangle2D.Double(0, 0, back.getWidth(), back.getHeight()));
    jxSearchPane.setBackgroundPainter(new MattePainter(paint));
    updateTagList();
    jxSearchPane.setVisible(true);
  } else if (e.getActionCommand() != null && activeTab != null) {
    if (e.getActionCommand().equals("SelectionDone")) {
      activeTab.updateSelectionInfo();
    }
  }
}
 
Example 8
Source Project: dsworkbench   Source File: DSWorkbenchRankFrame.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void actionPerformed(ActionEvent e) {
    RankTableTab activeTab = getActiveTab();
    if (e.getActionCommand() != null && activeTab != null) {
        if (e.getActionCommand().equals("Find")) {
            BufferedImage back = ImageUtils.createCompatibleBufferedImage(3, 3, BufferedImage.TRANSLUCENT);
            Graphics g = back.getGraphics();
            g.setColor(new Color(120, 120, 120, 120));
            g.fillRect(0, 0, back.getWidth(), back.getHeight());
            g.setColor(new Color(120, 120, 120));
            g.drawLine(0, 0, 3, 3);
            g.dispose();
            TexturePaint paint = new TexturePaint(back, new Rectangle2D.Double(0, 0, back.getWidth(), back.getHeight()));
            jxSearchPane.setBackgroundPainter(new MattePainter(paint));
            DefaultListModel model = new DefaultListModel();
            
            for (int i = 0; i < activeTab.getRankTable().getColumnCount(); i++) {
                TableColumnExt col = activeTab.getRankTable().getColumnExt(i);
                if (col.isVisible()) {
                    if (col.getTitle().equals("Name") || col.getTitle().equals("Tag") || col.getTitle().equals("Stamm")) {
                        model.addElement(col.getTitle());
                    }
                    
                }
            }
            jXColumnList.setModel(model);
            jXColumnList.setSelectedIndex(0);
            jxSearchPane.setVisible(true);
        }
    }
    
}
 
Example 9
Source Project: dsworkbench   Source File: DSWorkbenchNotepad.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void actionPerformed(ActionEvent e) {
    
    NoteTableTab activeTab = getActiveTab();
    if (e.getActionCommand() != null && activeTab != null) {
        if (e.getActionCommand().equals("Copy")) {
            activeTab.transferSelection(NoteTableTab.TRANSFER_TYPE.COPY_TO_INTERNAL_CLIPBOARD);
        } else if (e.getActionCommand().equals("BBCopy")) {
            activeTab.transferSelection(NoteTableTab.TRANSFER_TYPE.CLIPBOARD_BB);
        } else if (e.getActionCommand().equals("BBCopy_Village")) {
            activeTab.copyVillagesAsBBCodes();
        } else if (e.getActionCommand().equals("Cut")) {
            activeTab.transferSelection(NoteTableTab.TRANSFER_TYPE.CUT_TO_INTERNAL_CLIPBOARD);
        } else if (e.getActionCommand().equals("Paste")) {
            activeTab.transferSelection(NoteTableTab.TRANSFER_TYPE.FROM_INTERNAL_CLIPBOARD);
        } else if (e.getActionCommand().equals("Delete")) {
            activeTab.deleteSelection(true);
        } else if (e.getActionCommand().equals("Delete_Village")) {
            activeTab.deleteVillagesFromNotes();
        } else if (e.getActionCommand().equals("Find")) {
            BufferedImage back = ImageUtils.createCompatibleBufferedImage(3, 3, BufferedImage.TRANSLUCENT);
            Graphics g = back.getGraphics();
            g.setColor(new Color(120, 120, 120, 120));
            g.fillRect(0, 0, back.getWidth(), back.getHeight());
            g.setColor(new Color(120, 120, 120));
            g.drawLine(0, 0, 3, 3);
            g.dispose();
            TexturePaint paint = new TexturePaint(back, new Rectangle2D.Double(0, 0, back.getWidth(), back.getHeight()));
            jxSearchPane.setBackgroundPainter(new MattePainter(paint));
            jxSearchPane.setVisible(true);
        }
    }
}
 
Example 10
Source Project: dsworkbench   Source File: DSWorkbenchTagFrame.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 
 * @param pMessage
 */
public void showError(String pMessage) {
    infoPanel.setCollapsed(false);
    jXLabel1.setBackgroundPainter(new MattePainter(Color.RED));
    jXLabel1.setForeground(Color.WHITE);
    jXLabel1.setText(pMessage);
}
 
Example 11
Source Project: dsworkbench   Source File: DSWorkbenchMainFrame.java    License: Apache License 2.0 5 votes vote down vote up
public void showInfo(String pMessage) {
  mNotificationHideThread.interrupt();
  infoPanel.setCollapsed(false);
  jXLabel1.setBackgroundPainter(new MattePainter(Color.YELLOW));
  jXLabel1.setIcon(new ImageIcon("./graphics/icons/warning.png"));
  jXLabel1.setForeground(Color.BLACK);
  jXLabel1.setText(pMessage);
}
 
Example 12
Source Project: dsworkbench   Source File: DSWorkbenchMainFrame.java    License: Apache License 2.0 5 votes vote down vote up
public void showSuccess(String pMessage) {
  mNotificationHideThread.interrupt();
  infoPanel.setCollapsed(false);
  jXLabel1.setBackgroundPainter(new MattePainter(Color.GREEN));
  jXLabel1.setIcon(new ImageIcon(DSWorkbenchMainFrame.class.getResource("/res/checkbox.png")));
  jXLabel1.setForeground(Color.BLACK);
  jXLabel1.setText(pMessage);
}
 
Example 13
Source Project: BART   Source File: VioGenQueriesWPanel.java    License: MIT License 5 votes vote down vote up
public HighlighterControl() { 
    matte = new MattePainter(PaintUtils.setAlpha(base, 125)); 
    tableValueBasedHighlighter = new RelativePainterHighlighter(matte); 
    table.addHighlighter(tableValueBasedHighlighter); 
      
    setSpreadColumns(false);     

}
 
Example 14
Source Project: chipster   Source File: ToolsInternalFrame.java    License: MIT License 5 votes vote down vote up
/**
 * Initializes the internal frame for the first step. Creates necessery 
 * components and sets them to frame.
 *
 */
public void initializeFirstStep(){		
	firstStepOptionPanel = new JXTaskPaneContainer();
	firstStepOptionPanel.add(this.createDelimSelectorPanel());
	firstStepOptionPanel.add(this.createDecimalSeparatorPanel());
	firstStepOptionPanel.setBackgroundPainter(new MattePainter(Color.white));
	JScrollPane scroll = new JScrollPane(firstStepOptionPanel);
	scroll.setBorder(BorderFactory.createEmptyBorder());
	this.setContent(scroll);
}
 
Example 15
Source Project: chipster   Source File: ToolsInternalFrame.java    License: MIT License 5 votes vote down vote up
/**
	 * Initializes the internal frame for the second step. Creates necesserly 
	 * components and sets them to frame.
	 *
	 */
	public void initializeSecondStep(){
		secondStepOptionPanel = new JXTaskPaneContainer();

//		secondStepOptionPanel.add(this.getDataTypePanel());
		secondStepOptionPanel.add(this.getChipCountPanel());		
		secondStepOptionPanel.add(this.createGuessTheRestPanel());		
		secondStepOptionPanel.add(this.createDataTrimmingPanel());
		secondStepOptionPanel.setBackgroundPainter(new MattePainter(Color.white));
		JScrollPane scroll = new JScrollPane(secondStepOptionPanel);
		scroll.setBorder(BorderFactory.createEmptyBorder());
		this.setContent(scroll);
	}
 
Example 16
Source Project: dsworkbench   Source File: DSWorkbenchWatchtowerFrame.java    License: Apache License 2.0 4 votes vote down vote up
public void showInfo(String pMessage) {
    infoPanel.setCollapsed(false);
    jXLabel1.setBackgroundPainter(new MattePainter(getBackground()));
    jXLabel1.setForeground(Color.BLACK);
    jXLabel1.setText(pMessage);
}
 
Example 17
Source Project: dsworkbench   Source File: DSWorkbenchWatchtowerFrame.java    License: Apache License 2.0 4 votes vote down vote up
public void showError(String pMessage) {
    infoPanel.setCollapsed(false);
    jXLabel1.setBackgroundPainter(new MattePainter(Color.RED));
    jXLabel1.setForeground(Color.WHITE);
    jXLabel1.setText(pMessage);
}
 
Example 18
Source Project: dsworkbench   Source File: DSWorkbenchWatchtowerFrame.java    License: Apache License 2.0 4 votes vote down vote up
public void showSuccess(String pMessage) {
    infoPanel.setCollapsed(false);
    jXLabel1.setBackgroundPainter(new MattePainter(Color.GREEN));
    jXLabel1.setForeground(Color.BLACK);
    jXLabel1.setText(pMessage);
}
 
Example 19
Source Project: dsworkbench   Source File: DSWorkbenchDistanceFrame.java    License: Apache License 2.0 4 votes vote down vote up
public void showSuccess(String pMessage) {
    infoPanel.setCollapsed(false);
    jXLabel1.setBackgroundPainter(new MattePainter(Color.GREEN));
    jXLabel1.setForeground(Color.BLACK);
    jXLabel1.setText(pMessage);
}
 
Example 20
Source Project: dsworkbench   Source File: DSWorkbenchDistanceFrame.java    License: Apache License 2.0 4 votes vote down vote up
public void showInfo(String pMessage) {
    infoPanel.setCollapsed(false);
    jXLabel1.setBackgroundPainter(new MattePainter(getBackground()));
    jXLabel1.setForeground(Color.BLACK);
    jXLabel1.setText(pMessage);
}
 
Example 21
Source Project: dsworkbench   Source File: DSWorkbenchSOSRequestAnalyzer.java    License: Apache License 2.0 4 votes vote down vote up
private void showInfo(String pMessage) {
    infoPanel.setCollapsed(false);
    jXInfoLabel.setBackgroundPainter(new MattePainter(getBackground()));
    jXInfoLabel.setForeground(Color.BLACK);
    jXInfoLabel.setText(pMessage);
}
 
Example 22
Source Project: dsworkbench   Source File: DSWorkbenchSOSRequestAnalyzer.java    License: Apache License 2.0 4 votes vote down vote up
private void showSuccess(String pMessage) {
    infoPanel.setCollapsed(false);
    jXInfoLabel.setBackgroundPainter(new MattePainter(Color.GREEN));
    jXInfoLabel.setForeground(Color.BLACK);
    jXInfoLabel.setText(pMessage);
}
 
Example 23
Source Project: dsworkbench   Source File: DSWorkbenchSOSRequestAnalyzer.java    License: Apache License 2.0 4 votes vote down vote up
private void showError(String pMessage) {
    infoPanel.setCollapsed(false);
    jXInfoLabel.setBackgroundPainter(new MattePainter(Color.RED));
    jXInfoLabel.setForeground(Color.WHITE);
    jXInfoLabel.setText(pMessage);
}
 
Example 24
Source Project: dsworkbench   Source File: DSWorkbenchConquersFrame.java    License: Apache License 2.0 4 votes vote down vote up
public void showInfo(String pMessage) {
    infoPanel.setCollapsed(false);
    jXLabel1.setBackgroundPainter(new MattePainter(getBackground()));
    jXLabel1.setForeground(Color.BLACK);
    jXLabel1.setText(pMessage);
}
 
Example 25
Source Project: dsworkbench   Source File: DSWorkbenchConquersFrame.java    License: Apache License 2.0 4 votes vote down vote up
public void showSuccess(String pMessage) {
    infoPanel.setCollapsed(false);
    jXLabel1.setBackgroundPainter(new MattePainter(Color.GREEN));
    jXLabel1.setForeground(Color.BLACK);
    jXLabel1.setText(pMessage);
}
 
Example 26
Source Project: dsworkbench   Source File: DSWorkbenchFarmManager.java    License: Apache License 2.0 4 votes vote down vote up
public void showInfo(String pMessage) {
    infoPanel.setCollapsed(false);
    jXLabel1.setBackgroundPainter(new MattePainter(getBackground()));
    jXLabel1.setForeground(Color.BLACK);
    jXLabel1.setText(pMessage);
}
 
Example 27
Source Project: dsworkbench   Source File: DSWorkbenchChurchFrame.java    License: Apache License 2.0 4 votes vote down vote up
public void showInfo(String pMessage) {
    infoPanel.setCollapsed(false);
    jXLabel1.setBackgroundPainter(new MattePainter(getBackground()));
    jXLabel1.setForeground(Color.BLACK);
    jXLabel1.setText(pMessage);
}
 
Example 28
Source Project: dsworkbench   Source File: DSWorkbenchChurchFrame.java    License: Apache License 2.0 4 votes vote down vote up
public void showError(String pMessage) {
    infoPanel.setCollapsed(false);
    jXLabel1.setBackgroundPainter(new MattePainter(Color.RED));
    jXLabel1.setForeground(Color.WHITE);
    jXLabel1.setText(pMessage);
}
 
Example 29
Source Project: dsworkbench   Source File: DSWorkbenchChurchFrame.java    License: Apache License 2.0 4 votes vote down vote up
public void showSuccess(String pMessage) {
    infoPanel.setCollapsed(false);
    jXLabel1.setBackgroundPainter(new MattePainter(Color.GREEN));
    jXLabel1.setForeground(Color.BLACK);
    jXLabel1.setText(pMessage);
}
 
Example 30
Source Project: dsworkbench   Source File: DSWorkbenchSelectionFrame.java    License: Apache License 2.0 4 votes vote down vote up
public void showInfo(String pMessage) {
    infoPanel.setCollapsed(false);
    jXInfoLabel.setBackgroundPainter(new MattePainter(getBackground()));
    jXInfoLabel.setForeground(Color.BLACK);
    jXInfoLabel.setText(pMessage);
}