-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e059ad0
commit 6db645c
Showing
8 changed files
with
3,775 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions
57
src/org/nschmidt/ldparteditor/dialog/infographic/InfographicDesign.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* MIT - License | ||
Copyright (c) 2012 - this year, Nils Schmidt | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), | ||
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR | ||
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE | ||
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ | ||
package org.nschmidt.ldparteditor.dialog.infographic; | ||
|
||
import org.eclipse.jface.dialogs.Dialog; | ||
import org.eclipse.swt.SWT; | ||
import org.eclipse.swt.layout.GridData; | ||
import org.eclipse.swt.layout.GridLayout; | ||
import org.eclipse.swt.widgets.Composite; | ||
import org.eclipse.swt.widgets.Control; | ||
import org.eclipse.swt.widgets.Shell; | ||
import org.nschmidt.ldparteditor.resource.ResourceManager; | ||
import org.nschmidt.ldparteditor.widget.NButton; | ||
|
||
class InfographicDesign extends Dialog { | ||
|
||
private static final String CHEAT_SHEET_IMAGE = "ldparteditor_cheat_sheet_100dpi.png"; //$NON-NLS-1$ | ||
|
||
InfographicDesign(Shell parentShell) { | ||
super(parentShell); | ||
this.setShellStyle(SWT.RESIZE | this.getShellStyle()); | ||
} | ||
|
||
/** | ||
* Create contents of the dialog. | ||
* | ||
* @param parent | ||
*/ | ||
@Override | ||
protected Control createDialogArea(Composite parent) { | ||
Composite cmpContainer = (Composite) super.createDialogArea(parent); | ||
GridLayout gridLayout = (GridLayout) cmpContainer.getLayout(); | ||
gridLayout.verticalSpacing = 10; | ||
gridLayout.horizontalSpacing = 10; | ||
|
||
NButton btnCheatSheet = new NButton(cmpContainer, SWT.NONE); | ||
btnCheatSheet.setImage(ResourceManager.getImage(CHEAT_SHEET_IMAGE)); | ||
btnCheatSheet.setEnabled(false); | ||
btnCheatSheet.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true, 1, 1)); | ||
|
||
cmpContainer.pack(); | ||
return cmpContainer; | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
src/org/nschmidt/ldparteditor/dialog/infographic/InfographicDialog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* MIT - License | ||
Copyright (c) 2012 - this year, Nils Schmidt | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), | ||
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR | ||
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE | ||
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ | ||
package org.nschmidt.ldparteditor.dialog.infographic; | ||
|
||
import org.eclipse.jface.dialogs.IDialogConstants; | ||
import org.eclipse.swt.widgets.Shell; | ||
import org.nschmidt.ldparteditor.i18n.I18n; | ||
import org.nschmidt.ldparteditor.resource.ResourceManager; | ||
|
||
public class InfographicDialog extends InfographicDesign { | ||
|
||
public static final String CHEAT_SHEET_PDF = "ldparteditor_cheat_sheet.pdf"; //$NON-NLS-1$ | ||
|
||
/** | ||
* Create the dialog. | ||
* | ||
* @param parentShell | ||
*/ | ||
public InfographicDialog(Shell parentShell) { | ||
super(parentShell); | ||
} | ||
|
||
@Override | ||
public int open() { | ||
super.create(); | ||
this.getButton(IDialogConstants.OK_ID).setText(I18n.INFOGRAPHIC_HELP_SAVE_AS_PDF); | ||
getShell().setImage(ResourceManager.getImage("imgDuke2.png")); //$NON-NLS-1$ | ||
return super.open(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
HELP_BUTTON_TITLE = ? | ||
HELP_ERROR = Can't export file as PDF. | ||
HELP_PDF_FORMAT = Portable Document Format (*.pdf) | ||
HELP_SAVE_AS_PDF = Save as PDF... | ||
HELP_TOOLTIP = Show Help (Infographic) |
Binary file not shown.
Binary file added
BIN
+204 KB
src/org/nschmidt/ldparteditor/resource/ldparteditor_cheat_sheet_100dpi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters