Trace:
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
vaadin:replace_login [2019/08/05 12:33] admin |
vaadin:replace_login [2024/11/18 10:29] (current) admin |
||
---|---|---|---|
Line 50: | Line 50: | ||
package com.sibvisions.apps.customlogin; | package com.sibvisions.apps.customlogin; | ||
- | import javax.rad.application.genui.UILauncher; | + | import jvx.rad.application.genui.UILauncher; |
import com.sibvisions.apps.projx.ILogin; | import com.sibvisions.apps.projx.ILogin; | ||
Line 61: | Line 61: | ||
super(pLauncher); | super(pLauncher); | ||
} | } | ||
- | + | | |
@Override | @Override | ||
protected ILogin createLogin() throws Throwable | protected ILogin createLogin() throws Throwable | ||
{ | { | ||
if (getLauncher().isWebEnvironment()) | if (getLauncher().isWebEnvironment()) | ||
- | { | + | { |
- | return new MyCustomLogin(); | + | return new MyCustomLogin(); |
- | } | + | } |
- | + | ||
- | return super.createLogin(); | + | return super.createLogin(); |
} | } | ||
} | } | ||
Line 82: | Line 82: | ||
package com.sibvisions.apps.customlogin; | package com.sibvisions.apps.customlogin; | ||
- | import javax.rad.genui.component.UIButton; | + | import jvx.rad.genui.component.UIButton; |
- | import javax.rad.genui.container.UIPanel; | + | import jvx.rad.genui.container.UIPanel; |
- | import javax.rad.genui.layout.UIFormLayout; | + | import jvx.rad.genui.layout.UIFormLayout; |
- | import javax.rad.ui.Style; | + | import jvx.rad.ui.Style; |
import com.sibvisions.apps.vaadin.web.WebLogin; | import com.sibvisions.apps.vaadin.web.WebLogin; | ||
Line 151: | Line 151: | ||
public void doISA() throws Throwable | public void doISA() throws Throwable | ||
{ | { | ||
- | ((RemoteApplication)getApplication()).showInformation(null, "ISA pressed!"); | + | ((RemoteApplication)getApplication()).showInformation(null, "ISA pressed!"); |
} | } | ||
public void doSAM() throws Throwable | public void doSAM() throws Throwable | ||
{ | { | ||
- | ((RemoteApplication)getApplication()).showInformation(null, "SAM pressed!"); | + | ((RemoteApplication)getApplication()).showInformation(null, "SAM pressed!"); |
} | } | ||
} | } | ||
</file> | </file> | ||
Our code adds two new buttons and adds shows an information if one of the two buttons were pressed. | Our code adds two new buttons and adds shows an information if one of the two buttons were pressed. | ||
+ | |||
+ | The stylesheet definition for the new buttons are: | ||
+ | |||
+ | <file css> | ||
+ | .loginwindow .default.v-button.isa | ||
+ | { | ||
+ | background: red; | ||
+ | border-color: darkred; | ||
+ | } | ||
+ | |||
+ | .loginwindow .default.v-button.isa.v-pressed, | ||
+ | .loginwindow .default.v-button.isa:active | ||
+ | { | ||
+ | background: red; | ||
+ | border-color: darkred; | ||
+ | } | ||
+ | |||
+ | .loginwindow .default.v-button.isa:focus | ||
+ | { | ||
+ | border-color: darkred; | ||
+ | box-shadow: 0 0 4px darkred; | ||
+ | } | ||
+ | |||
+ | .v-button.isa:focus:after | ||
+ | { | ||
+ | border-color: darkred; | ||
+ | box-shadow: none; | ||
+ | } | ||
+ | |||
+ | .loginwindow .default.v-button.sam | ||
+ | { | ||
+ | background: green; | ||
+ | border-color: darkgreen; | ||
+ | } | ||
+ | |||
+ | .loginwindow .default.v-button.sam.v-pressed, | ||
+ | .loginwindow .default.v-button.sam:active | ||
+ | { | ||
+ | background: green; | ||
+ | border-color: dargreen; | ||
+ | } | ||
+ | |||
+ | .loginwindow .default.v-button.sam:focus | ||
+ | { | ||
+ | border-color: darkgreen; | ||
+ | box-shadow: 0 0 4px darkgreen; | ||
+ | } | ||
+ | |||
+ | .v-button.sam:focus:after | ||
+ | { | ||
+ | border-color: darkgren; | ||
+ | box-shadow: none; | ||
+ | } | ||
+ | </file> | ||
If you want to create a complete new layout for the login dialog, simply write your own code in **createLogin** method and don't call **super.createLogin()**. | If you want to create a complete new layout for the login dialog, simply write your own code in **createLogin** method and don't call **super.createLogin()**. |